Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 04:09:48 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Don Lewis <dl-freebsd@catspoiler.org>, rwatson@FreeBSD.ORG, current@FreeBSD.ORG, jeff@FreeBSD.ORG
Subject:   Re: vnode lock assertion problem in nfs_link()
Message-ID:  <3D7DD2FC.A559730E@mindspring.com>
References:  <20020910182523.D367-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D7DD2FC.A559730E>