linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: Ronnie Sahlberg <lsahlber@redhat.com>,
	linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] cifs: create a helper to find a writeable handle by path name
Date: Wed, 11 Sep 2019 15:22:48 -0500	[thread overview]
Message-ID: <CAH2r5msQoQnv1-N1Qv8Y3b=g3KUL84kZeVWRR039QeBzHmk_Fg@mail.gmail.com> (raw)
In-Reply-To: <CAKywueR3VUUJT_VqM=FVLGnzqx1whKOBCNAbKS2Gm7tmjaEQWw@mail.gmail.com>

Even so ... we shouldn't ask for open/query/close or
open/setinfo/close if just a query-info or set-info (no open/close) is
possible - it will make server's lives much easier ...

On Wed, Sep 11, 2019 at 3:06 PM Pavel Shilovsky <piastryyy@gmail.com> wrote:
>
> чт, 29 авг. 2019 г. в 15:26, Ronnie Sahlberg <lsahlber@redhat.com>:
> >
> > rename() takes a path for old_file and in SMB2 we used to just create
> > a compound for create(old_path)/rename/close().
> > If we already have a writable handle we can avoid the create() and close()
> > altogether and just use the existing handle.
> >
> > For this situation, as we avoid doing the create()
> > we also avoid triggering an oplock break for the existing handle.
>
> Hi Ronnie,
>
> Another SMB2_CREATE from the same client shouldn't cause a lease break
> if we ask for a lease with the same lease key. The lease key is
> associated with the inode, all opens that can cause a break should ask
> for the lease with the lease key.
>
> Currently smb2_compound_op doesn't ask for a lease: see at the
> beginning of the function:
>
> oplock = SMB2_OPLOCK_LEVEL_NONE
>
> What we need to do is to change this to SMB2_OPLOCK_LEVEL_BATCH for
> operation that modifies the file like SET_EOF and SET_INFO. In this
> case the lower layer will map it to the appropriate lease state. Note
> that parms->fid->lease_key should be populated.
>
> --
> Best regards,
> Pavel Shilovsky



-- 
Thanks,

Steve

  reply	other threads:[~2019-09-11 20:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 22:25 [PATCH] cifs: create a helper to find a writeable handle by path name Ronnie Sahlberg
2019-09-11 20:06 ` Pavel Shilovsky
2019-09-11 20:22   ` Steve French [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-29  5:54 Ronnie Sahlberg
2019-08-27  2:11 Ronnie Sahlberg

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='CAH2r5msQoQnv1-N1Qv8Y3b=g3KUL84kZeVWRR039QeBzHmk_Fg@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=piastryyy@gmail.com \
    /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).