mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "William A.(Andy) Adamson" <andros@citi.umich.edu>
To: "Michael Kerrisk" <michael.kerrisk@gmx.net>
Cc: "William A.(Andy) Adamson" <andros@citi.umich.edu>,
	matthew@wil.cx, sfr@canb.auug.org.au, mtk-lkml@gmx.net,
	heiko.carstens@de.ibm.com, linux-kernel@vger.kernel.org,
	schwidefsky@de.ibm.com, andros@citi.umich.edu
Subject: Re: fcntl: F_SETLEASE/F_RDLCK question
Date: Tue, 03 May 2005 12:21:24 -0400	[thread overview]
Message-ID: <20050503162124.500F01BB40@citi.umich.edu> (raw)
In-Reply-To: <5531.1115131813@www41.gmx.net>

> > > On Tue, May 03, 2005 at 09:55:42AM -0400, William A.(Andy) Adamson
> > > wrote:
> > > > i believe the current implementation is correct. opening a file for
> > > > write 
> > > > means that you can not have a read lease, caller included.
> > > 
> > > Why not?  Certainly, others will not be able to take out a read lease,
> > > so there's very little point to only having a read lease, but I don't
> > > see why we should deny it.
> > > 
> > 
> > by definition: a read lease means there are no writers. so, the question
> > is 
> > not 'why not', the question is why? why hand out a read lease to an open
> > for write?
> 
> Andy,
> 
> Look more closely at my earlier table. 
> 
> Regardless of what the answer to your question is, the 
> current semantics are bizarre.  As things stand, a process
> can open a file O_RDWR, and and can place a WRITE lease 
> but not a READ lease.  That can't be right.

yes - i was being too strict. looking at NFSv4 delegations; a read lease does 
not mean there are no writers, it means there are no other clients (fl_owners) 
writing.

the other side of the coin would be break_lease. it should not break a read 
lease on an open for write in the case where the fl_owner of the read lease is 
also the owner of the open for write.

-->Andy 

> 
> FWIW it's worth, I think the read lease should be allowed.
> Oplocks are concerned with what other processes are doing, 
> not what the caller is doing.  Also, the current semantcis
> break backward compatibility.
> 
> Cheers,
> 
> Michael
> 
> -- 
> +++ Neu: Echte DSL-Flatrates von GMX - Surfen ohne Limits +++
> Always online ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl



  reply	other threads:[~2005-05-03 16:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-02  9:15 Heiko Carstens
2005-05-02 11:04 ` Stephen Rothwell
2005-05-02 12:10   ` Heiko Carstens
2005-05-03 10:00   ` Michael Kerrisk
2005-05-03 13:14     ` Stephen Rothwell
2005-05-03 13:55       ` William A.(Andy) Adamson
2005-05-03 13:59         ` Matthew Wilcox
2005-05-03 14:15           ` William A.(Andy) Adamson
2005-05-03 14:50             ` Michael Kerrisk
2005-05-03 16:21               ` William A.(Andy) Adamson [this message]
2005-05-03 16:36                 ` J. Bruce Fields
2005-05-31 14:53       ` Michael Kerrisk
2005-05-31 15:23         ` J. Bruce Fields
2005-05-31 15:41           ` Michael Kerrisk
2005-05-31 15:34       ` File leases and fork() Michael Kerrisk

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=20050503162124.500F01BB40@citi.umich.edu \
    --to=andros@citi.umich.edu \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=michael.kerrisk@gmx.net \
    --cc=mtk-lkml@gmx.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=sfr@canb.auug.org.au \
    /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®