From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeremy Allison <jra@samba.org>
Cc: Volker Lendecke <Volker.Lendecke@SerNet.DE>,
linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
samba-technical@lists.samba.org,
Casey Bodley <cbodley@citi.umich.edu>
Subject: Re: [PATCH] locks: breaking read lease should not block read open
Date: Thu, 21 Jul 2011 12:35:20 -0400 [thread overview]
Message-ID: <20110721163520.GC1114@fieldses.org> (raw)
In-Reply-To: <20110721001542.GA15644@samba2>
On Wed, Jul 20, 2011 at 05:15:42PM -0700, Jeremy Allison wrote:
> On Wed, Jul 20, 2011 at 08:07:58PM -0400, J. Bruce Fields wrote:
> > On Fri, Jun 10, 2011 at 09:48:59AM -0400, J. Bruce Fields wrote:
> > > On Fri, Jun 10, 2011 at 09:56:49AM +0200, Volker Lendecke wrote:
> > > > Without having looked too deeply, just let me point out that
> > > > Samba here has a plain flaw. Early Linux Kernel versions
> > > > that we programmed against did not properly support read
> > > > only leases, so we did not implement that initially. If I
> > > > remember correctly we never got around to finally do it once
> > > > it became available. Eventually we will probably, as read
> > > > only leases are a pretty important feature to present to
> > > > CIFS clients.
> > >
> > > Thanks, I didn't know that. (Or I did, and I forgot.)
> > >
> > > When you *do* implement that, is there any chance you'd have this need
> > > to be able to downgrade to a read lease in the case of a conflict?
> >
> > So it's a question about the protocols samba implements:
> >
> > - Do they allow an atomic downgrade from an exclusive to a
> > shared oplock? (Or to a level 2 oplock, or whatever the right
> > term is).
>
> Yes. Exclusive can go to level 2 - in fact that's the default
> downgrade we do (unless an smb.conf option explicity denies it).
>
> > - If so, can that happen as a response to a conflicting open?
> > (So, if you're holding an exclusive oplock, and a conflicting
> > open comes in, can the server-to-client break message say "now
> > you're getting a shared oplock instead"? Or is the client
> > left without any oplock until it requests a new one?)
>
> Yes, this can happen.
>
> In SMB, we only break to no lease when a write request comes
> in on a exclusive or level2 oplock (read-lease) handle.
Ok, thanks, that means we need a more complicated fix here--I'll work on
that....
--b.
next prev parent reply other threads:[~2011-07-21 16:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 23:16 [PATCH] locks: breaking read lease should not block read open J. Bruce Fields
2011-06-10 7:56 ` Volker Lendecke
2011-06-10 13:48 ` J. Bruce Fields
2011-07-21 0:07 ` J. Bruce Fields
2011-07-21 0:15 ` Jeremy Allison
2011-07-21 16:35 ` J. Bruce Fields [this message]
2011-07-29 2:27 ` J. Bruce Fields
2011-07-29 2:29 ` [PATCH 1/3] locks: minor lease cleanup J. Bruce Fields
2011-07-29 2:29 ` [PATCH 2/3] locks: move F_INPROGRESS from fl_type to fl_flags field J. Bruce Fields
2011-07-29 2:30 ` [PATCH 3/3] locks: fix tracking of inprogress lease breaks J. Bruce Fields
2011-08-19 16:04 ` [PATCH] locks: breaking read lease should not block read open J. Bruce Fields
2011-08-19 16:07 ` [PATCH 1/4] locks: minor lease cleanup J. Bruce Fields
2011-08-19 16:07 ` [PATCH 2/4] locks: move F_INPROGRESS from fl_type to fl_flags field J. Bruce Fields
2011-08-19 16:07 ` [PATCH 3/4] locks: fix tracking of inprogress lease breaks J. Bruce Fields
2011-08-19 16:07 ` [PATCH 4/4] locks: setlease cleanup J. Bruce Fields
2011-08-19 19:08 ` [PATCH] locks: breaking read lease should not block read open Jamie Lokier
2011-08-21 16:50 ` J. Bruce Fields
2011-11-21 12:46 ` Jamie Lokier
2011-11-22 21:44 ` J. Bruce Fields
2011-11-23 0:30 ` Jamie Lokier
2011-11-23 19:08 ` J. Bruce Fields
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=20110721163520.GC1114@fieldses.org \
--to=bfields@fieldses.org \
--cc=Volker.Lendecke@SerNet.DE \
--cc=cbodley@citi.umich.edu \
--cc=jra@samba.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
/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;
as well as URLs for NNTP newsgroup(s).