Re: [RFC] Imminent death of /proc/locks predicted; film at 11

From: Matthew Wilcox (matthew@wil.cx)
Date: Sat Sep 30 2000 - 21:43:08 EDT

  • Next message: Sandy Harris: "SA_INTERRUPT"

    On Sat, Sep 30, 2000 at 08:23:37PM -0500, Peter Samuelson wrote:
    >
    > [Matthew Wilcox]
    > > if fcntl took a 4th argument specifying the length of the buffer, i'd
    > > recommend a F_GETLKS fcntl. a horrid work around for this would be
    > > that the first 4 bytes of the buffer pointed to by the third argument
    > > of the fcntl is the length of the buffer.
    >
    > Ewwww! You're right, it's horrid. Anyway, I think this one can be
    > solved in userspace -- as long as you don't need atomicity. Untested
    > code with no error checking:

    thanks for snipping the part of my email where i explain this won't work.
    examples:

    process 1 locks bytes 1 to 7 nonexclusively
    process 2 locks bytes 2 to 5 nonexclusively

    you now can't see the second lock.

    and there's no way of seeing the blocked lock. This needs kernel support
    some how.

    -- 
    Revolutions do not require corporate support.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/
    



    This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:46:24 EDT