From: Paulo Alcantara <pc@manguebit.com>
To: Shyam Prasad N <nspmangalore@gmail.com>
Cc: meetakshisetiyaoss@gmail.com, linux-cifs@vger.kernel.org,
smfrench@gmail.com, bharathsm.hsk@gmail.com, lsahlber@redhat.com,
tom@talpey.com, Meetakshi Setiya <msetiya@microsoft.com>
Subject: Re: [PATCH] cifs: Reuse file lease key in compound operations
Date: Wed, 06 Dec 2023 11:08:14 -0300 [thread overview]
Message-ID: <e9921ba7ff3ec02cf5c0a0adc77d6edc@manguebit.com> (raw)
In-Reply-To: <CANT5p=qnEFJDTTrSRkdBfkE9Kzw9BzGRegtCuW6Hb4xc7PSdaQ@mail.gmail.com>
Shyam Prasad N <nspmangalore@gmail.com> writes:
> That's interesting. I'm assuming that the STATUS_INVALID_PARAMETER is
> due to the server not recognizing the lease id for the file bar.
> I'm not sure that this is a client bug.
> If the server supports hard links, then should it not be aware that
> foo and bar are the same files? AFAIK, file lease is associated with a
> file, and not the dentry.
The patch is doing
+ //if there is an existing lease, reuse it
+ if (dentry) {
+ inode = d_inode(dentry);
+ cinode = CIFS_I(inode);
+ if (cinode->lease_granted) {
+ oplock = SMB2_OPLOCK_LEVEL_LEASE;
+ memcpy(fid.lease_key, cinode->lease_key, SMB2_LEASE_KEY_SIZE);
+ }
+ }
and @inode ends up being the same for foo and bar from reproducer. So,
the client is trying to close bar file by using lease key from foo. The
server then fails to match @cinode->lease_key for bar file.
next prev parent reply other threads:[~2023-12-06 14:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 4:56 [PATCH] cifs: Reuse file lease key in compound operations meetakshisetiyaoss
2023-12-04 12:19 ` Shyam Prasad N
2023-12-04 20:23 ` Steve French
2023-12-05 10:36 ` Shyam Prasad N
2023-12-05 19:32 ` Paulo Alcantara
2023-12-06 5:31 ` Shyam Prasad N
2023-12-06 5:38 ` Meetakshi Setiya
2023-12-06 13:42 ` Tom Talpey
2023-12-08 10:58 ` Shyam Prasad N
2023-12-08 14:02 ` Tom Talpey
2023-12-08 17:45 ` Jeremy Allison
2023-12-06 14:08 ` Paulo Alcantara [this message]
2023-12-08 10:37 ` Meetakshi Setiya
2023-12-08 13:43 ` 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=e9921ba7ff3ec02cf5c0a0adc77d6edc@manguebit.com \
--to=pc@manguebit.com \
--cc=bharathsm.hsk@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=meetakshisetiyaoss@gmail.com \
--cc=msetiya@microsoft.com \
--cc=nspmangalore@gmail.com \
--cc=smfrench@gmail.com \
--cc=tom@talpey.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