>>>>> " " == Matthew Wilcox <[EMAIL PROTECTED]> writes:
> On Thu, May 03, 2001 at 02:10:48PM +0200, Trond Myklebust
> wrote:
>> >>>>> " " == Matthew Wilcox <[EMAIL PROTECTED]> writes:
>>
>> > I'll get to it this weekend then. Should be a relatively
>> > simple patch. Are there any other semantics you want
>> > changing from the POSIX lock? I'm thinking of removing
>> > deadlock detection, for one...
>>
>> What do you mean by `removing' it? Eliminating deadlock
>> detection entirely will get you in deep trouble when you add
>> mandatory locking.
> Huh? (1) I don't intend to have mandatory locking on these new
> locks.
I see. In that case I misread your document.
> (2) how exactly would it get me into trouble?
??? It'll be a completely useless form of lock if programs can end up
blocking forever on a set of (from their perspective) valid
operations.
Furthermore, server processes will want to know whether or not
something deadlocks or not in order to avoid blocking forever. Sure
you can leave it up to them to do all the checking, but then you're
going to lose atomicity.
Ideally the VFS locking manager wants to provide a service to samba,
NFS and their ilk, whereby they ask for a lock. If waiting would
deadlock, send back an immediate answer to the caller. If not, then
the locking manager should be responsible for scheduling a lock
immediately after the blocking lock is released, and notifying the
caller that it can proceed.
Anything less than that would be an unacceptable step backward
wrt. the existing code. We don't want to cram more responsabilities
down on the filesystem-level.
> Another semantic issue I want to tie down. Is it useful for
> different threadsd to be able to share a lock? Or should locks
> from different threads conflict? I'm currently leaning towards
> the latter, but you may be able to convince me I'm wrong.
How about allowing the process to use a cookie to define ownership at
the kernel level?
For normal processes this may or may not include some combination
involving the pid, but kernel level server processes could use this to
save the metadata required to identify the client. I know the NFSv4
people are keen to implement this sort of thing...
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]