From: "Aurélien Aptel" <aaptel@suse.com>
To: Shyam Prasad N <nspmangalore@gmail.com>,
Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: Pavel Shilovsky <pshilov@microsoft.com>,
Steve French <sfrench@samba.org>,
kernel@axis.com, CIFS <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] CIFS: Prevent error log on spurious oplock break
Date: Mon, 08 Mar 2021 13:20:51 +0100 [thread overview]
Message-ID: <871rcpx2e4.fsf@suse.com> (raw)
In-Reply-To: <CANT5p=rB2=DvjtpmVy803emWpuzsy-C2+d4wqQ5g_9fJ8+a5Cw@mail.gmail.com>
Shyam Prasad N <nspmangalore@gmail.com> writes:
> So I don't think we should be changing the logic here.
I would tend to agree.
> If SMB v1 had a different behaviour, we should check if that is as per
> the protocol documentation. If not, change it.
I think the main difference is that SMBv1 doesn't have the concept of
lease keys. I think lease keys were added to handle cases like this:
case a)
client: >> send create+lease (key=XYZ). I don't know the file fid yet
server: local open & concurent open (create response not sent yet!)
server: << send oplockbreak key=XYZ
client: dont know the fid, but i can match the lease key with a request
I made, so it's valid
server: << send create response (fid=123)
client: I know the fid now
case b)
client: >> send create+lease (key=XYZ)
server: << open file, send create response (fid=123)
client: >> close file, release file ressources, send close fid=123
server: before receiving close, concurrent open happens
server: << send oplock break (key=XYZ)
server: << send close
client: depending on the order the response are processed, I might not
process oplock because i don't know this file! I already closed
it. But I know this lease key
Without client-generated lease keys you cannot match things you don't
have an FID for (because you haven't received it yet, or because it was
closed). And FIDs can be reused and point to different files.
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
next prev parent reply other threads:[~2021-03-08 12:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 9:41 [PATCH] CIFS: Prevent error log on spurious oplock break Vincent Whitchurch
2021-03-07 10:50 ` Shyam Prasad N
2021-03-08 12:20 ` Aurélien Aptel [this message]
2021-03-09 0:05 ` ronnie sahlberg
2021-03-09 10:04 ` Aurélien Aptel
2021-03-09 13:41 ` Vincent Whitchurch
[not found] ` <CAH2r5mvuQivNXWiG_PmREp0w5qOWGS5WR_4UDQ0nfdz5KxRfzg@mail.gmail.com>
2021-03-12 11:49 ` Vincent Whitchurch
2021-03-12 16:38 ` Tom Talpey
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=871rcpx2e4.fsf@suse.com \
--to=aaptel@suse.com \
--cc=kernel@axis.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=pshilov@microsoft.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=vincent.whitchurch@axis.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