From: Olaf Kirch <okir@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nhorman@redhat.com, nfs@lists.sourceforge.net
Subject: Re: [RFC] implementing BSD style locks on NLM (flocks)
Date: Wed, 2 Mar 2005 19:44:41 +0100 [thread overview]
Message-ID: <20050302184441.GA8609@suse.de> (raw)
In-Reply-To: <1109787034.12460.7.camel@lade.trondhjem.org>
On Wed, Mar 02, 2005 at 10:10:34AM -0800, Trond Myklebust wrote:
> http://client.linux-nfs.org/Linux-2.6.x/2.6.11-rc5/linux-2.6.11-17-flock.dif
+ /* We're simulating flock() locks using posix locks on the server */
+ fl->fl_owner = (fl_owner_t)filp;
+ fl->fl_start = 0;
+ fl->fl_end = OFFSET_MAX;
Will this work as expected? Right now, the code sets fl_pid to the thread
group ID (tgid) - but every forked process gets a new tgid, unless you
use CLONE_THREAD, right? So the standard BSD behavior of opening a file
in process A, calling flock, forking and doing the final close in process
B will leave a stale lock, because the unlock call with have a different
pid value.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@suse.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2005-03-02 18:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-27 19:21 [RFC] implementing BSD style locks on NLM (flocks) nhorman
2005-03-02 15:56 ` Olaf Kirch
2005-03-02 18:10 ` Trond Myklebust
2005-03-02 18:44 ` Olaf Kirch [this message]
2005-03-02 18:55 ` Trond Myklebust
2005-03-03 18:24 ` nhorman
2005-03-03 21:19 ` Trond Myklebust
2005-03-14 15:29 ` Trond Myklebust
2005-03-04 15:02 ` statd -o change G. Allen Morris III
2005-03-04 15:34 ` G. Allen Morris III
2005-03-04 19:48 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050302184441.GA8609@suse.de \
--to=okir@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=nhorman@redhat.com \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.