apply the patch of bin/61718 (which should include/elimatate kern/61122 also).
It seems to fix a few annoying bugs.
PR: bin/61718, kern/61122
Submitted by: bg@sics.seohartman@mail.physik.uni-mainz.de
has requested the lock in a non-blocking form, instead returning an
immediate failure. This appears to help reduce one of my "locks get
lost" symptoms involving lockf(1), which attempts a non-blocking lock
attempt before actually blocking on the lock. At this point the client
still gets back EACCES, which is an issue we're still working.
Approved by: re (scottl)
Submitted by: Andrew P. Lentvorski, Jr. <bsder@allcaps.org>
Alfred, I took a look at retry_blockingfilelocklist() and the
solution seemed simple enough. Please correct me if I am wrong.
It seems said routine doesn't take into account boundary conditions
when putting back file_lock entries into the blocked lock-list.
Specifically, it fails when the file_lock being put back is the
last element in the list, and when it is the only element in the
list. I've included a patch below.
Basically, it introduces another variable: pfl, which keeps track
of the list item before ifl. That way if nfl is NULL, ifl gets
inserted after pfl. If pfl is also NULL, then it gets inserted
at the head of the list (since it was the only element in the
list).
Submitted by: Mike Makonnen <mike_makonnen@yahoo.com>
Tested by: Thomas Quinot <thomas@cuivre.fr.eu.org>
file is still completely covered by a flock(2) style lock, but we'll tackle
that at a later date.
Submitted by: "Andrew P. Lentvorski" <bsder@allcaps.org>
use LIST_FOREACH,
add prototypes (functions should be made static probably),
change DEBUG=1 to LOCKD_DEBUG,
K&R function instantiation for functions with long args lists,
Move comments about functions from within to above the function,
Simplified some if/else logic and reduced nested blocks.
parens around 'return' argument (return FOO -> return (FOO))
of the rpc.lockd fully compliant with the old file locking semantics.
Andrew will dig into the statd code next and then will attack the split
locking.
This also backs out a lot of the work I've done on making the code
more conformant with non-written style rules, but we'll revisit that
later.
Submitted by: "Andrew P. Lentvorski" <bsder@allcaps.org>