From: Andreas Gruenbacher <agruen@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make POSIX locks compatible with the NPTL thread model
Date: Thu, 24 Jun 2004 13:56:19 +0200 [thread overview]
Message-ID: <200406241356.19925.agruen@suse.de> (raw)
In-Reply-To: <1088010468.5806.52.camel@lade.trondhjem.org>
Hi Trond,
On Wednesday 23 June 2004 19:07, Trond Myklebust wrote:
> Hi,
>
> At some point in 2.5.x we introduced the NPTL thread model at the kernel
> level, and hence redefined the idea of a process: a process appears
> currently to be defined as one or more threads with the same tgid...
> However we failed to completely update the POSIX locking code to reflect
> that change: currently, the POSIX locking code defines the process to be
> a set of one or more threads with the same tgid and a shared file
> table...
>
> As a result we end up with abominations like the steal_locks() function
> that is required in order to move the locks from from one file table to
> another on exec etc.
Nice to see you working on this. I briefly looked into how to fix the same
thing but didn't find the time to finish it. Here is what I thought; maybe
it's useful to you.
There are local and remote locks, and both of them need a pid discriminator.
We have used the files_struct pointer so far which was either a struct
files_struct pointer or a struct nlm_host pointer. By using pointers we had a
host+pid "uniquifier". Now we could change the fields from:
struct file_lock {
[...]
fl_owner_t fl_owner;
unsigned int fl_pid;
[...]
};
to:
struct file_lock {
[...]
struct nlm_host *fl_host; /* NULL for local locks */
unsigned int fl_pid;
[...]
};
There would be no casting of other types into a fl_host here.
Cheers,
--
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX AG
next prev parent reply other threads:[~2004-06-24 11:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-23 17:07 Trond Myklebust
2004-06-23 19:29 ` Chris Wright
2004-06-23 19:50 ` Trond Myklebust
2004-06-23 21:41 ` Chris Wright
2004-06-23 23:02 ` Trond Myklebust
2004-06-24 6:09 ` Chris Wright
2004-06-24 11:56 ` Andreas Gruenbacher [this message]
2004-06-24 21:06 ` 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=200406241356.19925.agruen@suse.de \
--to=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®