Discussion:
snapdir_lookup()
k***@cflinux.hu
2014-02-10 14:49:21 UTC
Permalink
Dear All,

I was fixing some issues in FreeBSD port of ZFS. While reading, and
comparing code found that in illumos, in
zfs/zfs_ctldir.c the snapdir_lookup() function has a branch where it
founds a cached snapshot mount point which just got unmounted in line
845.
The branch contains a single 'goto domount' statement, where it simply
skips initializing the snapname variable. That does seem to me like a
bug, and the freebsd port contains an additional
statement in that branch to initialize the named variable.

I ask: is there any possibility in illumos to have that case happen at
all?

Or do I misunderstand the code?

Thanks in advance,
Matthew Ahrens
2014-02-10 18:32:50 UTC
Permalink
Post by k***@cflinux.hu
Dear All,
I was fixing some issues in FreeBSD port of ZFS. While reading, and
comparing code found that in illumos, in
zfs/zfs_ctldir.c the snapdir_lookup() function has a branch where it
founds a cached snapshot mount point which just got unmounted in line 845.
The branch contains a single 'goto domount' statement, where it simply
skips initializing the snapname variable. That does seem to me like a bug,
and the freebsd port contains an additional
statement in that branch to initialize the named variable.
I ask: is there any possibility in illumos to have that case happen at all?
Your assessment sounds correct to me. I think it could happen on illumos
but I'm not super familiar with the zfsctl code so I would have to try it
out.

--matt



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

Loading...