From owner-freebsd-current Tue Sep 10 4:11: 3 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AE9137B400; Tue, 10 Sep 2002 04:10:59 -0700 (PDT) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 104A843E3B; Tue, 10 Sep 2002 04:10:59 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0024.cvx22-bradley.dialup.earthlink.net ([209.179.198.24] helo=mindspring.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17oiuv-00018O-00; Tue, 10 Sep 2002 04:10:50 -0700 Message-ID: <3D7DD2FC.A559730E@mindspring.com> Date: Tue, 10 Sep 2002 04:09:48 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Evans Cc: Don Lewis , rwatson@FreeBSD.ORG, current@FreeBSD.ORG, jeff@FreeBSD.ORG Subject: Re: vnode lock assertion problem in nfs_link() References: <20020910182523.D367-100000@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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