Bruce Evans wrote:
> The changes are obviously just cleanups for leaf file systems, but I
> wonder why everything wasn't always locked at the top.  Could it have
> been because locking all the way down is harmful?

For a stacked local media FS, you can end up with a deadlock, if
a lower vnode is exposed into the visible namespace, e.g.:

              o                    o
  /usr/myfs2  |      /usr/myfs1    |
,------------------.------------------.
|             |    |              /   |
| quotafs     o    |          /       |
`------------------'      /           |
|                \     /              |
| ffs               o                 |
`-------------------------------------'

Probably, the correct thing to do is to lock at the top, and lock
the lower in all intermediate layers as the top is locked.  This
requires that the operation from the top look the same from the
top and from the bottom of the VFS stacking layer.  This probably
needs a veto-VOP that is a NUL operation for local media FSs that
can't be stacked on something other than the VM system.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to