From owner-freebsd-fs Thu Sep 13 16:28:30 2001 Delivered-To: freebsd-fs@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id DDB5837B401 for ; Thu, 13 Sep 2001 16:28:25 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id A741E81D05; Thu, 13 Sep 2001 18:28:25 -0500 (CDT) Date: Thu, 13 Sep 2001 18:28:25 -0500 From: Alfred Perlstein To: Earsh Nandkeshwar Cc: fs@freebsd.org Subject: Re: vnode locking for nfs Message-ID: <20010913182825.O968@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from earsh@apple.com on Thu, Sep 13, 2001 at 03:14:14PM -0700 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Earsh Nandkeshwar [010913 17:14] wrote: > I was looking thru a snapshot of the freebsd code after hearing rumors > that vnode locking for NFS existed. I can't seem to locate it and wanted > to know if it has been implemented. This is not the same as lockd, but a > lock to protect fields in vnode. > > I see rslock was implemented to handle a particular case. > > If someone could inform me on why nfs_lock was defined out of the > source, that would be great. Was it implemented a long time ago, had > trouble, and pulled out. Or was it more like "work in progress" and code > left around but not used. Hold grain of salt in left hand before proceeding... I think the problem is due to the way that our stateful VFS works, the problem is that locks must be held through certain loookup operations on multiple levels, hence if a server goes down we lock all the way to the root which is bad. Under the SunOS VFS many operations are split into multiple ops where locks are dropped, this avoids the problem but causes some operations to require two (or maybe more) itirations to function properly because they drop locks. Under GFS (mentioned in Vahallia (sp?)) it functions as the BSD model does (or at least close) however one can invalidate a lock forcing the long time lock holder to restart his operation. At least that's what my understanding from reading and hearing Kirk talk about it, I haven't actually explored this code yet. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message