Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2003 13:19:43 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "Andrew P. Lentvorski, Jr." <bsder@allcaps.org>
Cc:        Steve Sizemore <steve@ls.berkeley.edu>, Dan Nelson <dnelson@allantgroup.com>, Alfred Perlstein <bright@mu.org>, current@FreeBSD.ORG
Subject:   Re: NFS file unlocking problem
Message-ID:  <3E778D6F.F4599EE6@mindspring.com>
References:  <Pine.LNX.4.44.0303180018130.18118-100000@mail.allcaps.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Andrew P. Lentvorski, Jr." wrote:
> On Mon, 17 Mar 2003, Terry Lambert wrote:
> Please don't speculate without having reviewed the code.  It works because
> I rewrote rpc.lockd so that it does the required housekeeping itself.
> The FreeBSD lockd is the only open-source locking daemon that actually
> passes the Connectathon interoperability tests.

I already knew this was the answer, actually.


> When rpc.lockd gets a lock request, it immediately attempts to lock the
> *entire* underlying file on the NFS server (or fails).  It then keeps
> internal track of the partial lock requests so that they *don't* coalesce
> (including l_pid from the target system).  rpc.lockd only releases the
> underlying file when all NFS locks go away.
> 
> Yes, it does create extra contention if someone tries to do partial file
> locking via both NFS and the local filesystem simultaneously.  I deemed
> this an acceptable compromise in order to cover up for the problems in the
> FreeBSD locking space since most people who truly need locking generally
> have dedicated file servers.

So then the first question that should have been asked is "are there
local server clients?".

If there are local server clients, then the problem is obviously
there.


Out of curiosity, why didn't you use my F_RSETLK/F_RGETLK and l_rsysid
and delayed coelescing patches for lockmgr, so that you could support
host lock coherency?  Was the issue F_RSETLKW requiring a blocking
context?  It's fairly easy to make this async-but-FIFO-ordered.

If you want, I can update them (they old ones are currently available
on http://www.freebsd.org/~terry ).  They do not break binary
compatability.  I'm even willing to do the F_RSETLKW queue insertion
management for the async part...

-- 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?3E778D6F.F4599EE6>