After more investigation, this looks like it might be an fuser bug, but I may be
missing something. Thanks to mdb & dtrace for making this fairly easy to
analyze....
It turns out that we never actually get as far as calling dofusers() in my
failing test case. We exit early from uts_fusers, when we realize that the
reference count of /export/home is 0:
http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/syscall/utssys.c#891
Since the reference count is 0 (the logic goes), nobody can possibly be
referring to this vnode, so why look through all the processes?
This appears to be wrong for a "contained" search (the -c option); it
assumes that if vnode X is in use, then the root vnode of its filesystem must be
in use as well.
For UFS, TMPFS, and most other file systems, this is true, since they keep a
reference to the root vnode in their private mount table. It''s not
true for ZFS, which looks up its root vnode on any call to zfs_root.
I believe that the early-exit test in uts_fusers should be made conditional on
doing an exact (rather than contained) search.
Sound right? If so, I''ll go ahead & write up a bug.
This message posted from opensolaris.org