Re: fcntl: F_SETLEASE/F_RDLCK question

From: Michael Kerrisk (mtk-lkml_at_gmx.net)
Date: 05/31/05

  • Next message: Jeff Garzik: "Re: [PATCH] SATA NCQ #3"
    Date:	Tue, 31 May 2005 17:41:51 +0200 (MEST)
    To: "J. Bruce Fields" <bfields@fieldses.org>
    
    

    Bruce,

    > On Tue, May 31, 2005 at 04:53:50PM +0200, Michael Kerrisk wrote:
    > > I applied this against 2.6.12-rc4, and it fixes the problem
    > > (and I've also teasted various other facets of file leases
    > > and this change causes no obvious breakage elsewhere).
    > >
    > > Are you going to push this fix into 2.6.12?
    >
    > Are you sure this is actually a problem?
    >
    > I still have the following questions I had before:
    >
    > > I'm a little confused as to why anyone would have the expectation
    > > that read leases would not conflict with write opens by the same
    > > process, given that break_lease() has never functioned that way, so
    > > later write opens by the same process have always broken any read
    > > lease.
    > >
    > > Are there applications that actually depend on the old behaviour? Is
    > > there any documentation that blesses it? All I can find is the fcntl
    > > man page, and as far as I can tell an implementation that makes read
    > > leases conflict with all write opens (by the same process or not) is
    > > consistent with that man page.

    I believe it is still a problem: primarily because it broke
    old behavior for no apparent reason (Stephen Rothwell, who was
    one of the original implementers seems to agree, since he
    suggested that one line patch). I suspect the change was
    unintentional.

    By the way, I wrote the text in the fcntl() man page
    by looking at the code and experimenting. There was no
    existing documentation of F_SETLEASE. I'm questioning
    the change based on my understanding of how things should
    work (I didn't happen to write up this point because it
    seemed self-evident *to me*); however, I know rather
    little of the workings of SAMBA.

    Cheers,

    Michael

    -- 
    Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
    Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Jeff Garzik: "Re: [PATCH] SATA NCQ #3"

    Relevant Pages

    • Re: [PATCH - EXPERIMENTAL] files with forks in the VFS
      ... an icon for a desktop app, documentation ... >In the first case, the subordinate files should clearly be writable, ... directory compression plugin for directories with lots of small files.... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] Documentation dir is a mess
      ... "fingertip reference" versus "in-depth documentation". ... that exist may not conform themselves well to that sort of division, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix vgacon blanking
      ... This is strange, since according to my documentation, the value should have ... Can you test setting this ... value during initialisation ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix vgacon blanking
      ... Can you test setting this ... I just happen to have some documentation). ... But as the posted patch work as-is, ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: Universal method to start a script at boot
      ... gets this info from filenames. ... documentation, ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)