public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: meetakshisetiyaoss@gmail.com, sfrench@samba.org,
	lsahlber@redhat.com, sprasad@microsoft.com, tom@talpey.com,
	linux-cifs@vger.kernel.org, nspmangalore@gmail.com,
	bharathsm.hsk@gmail.com, samba-technical@lists.samba.org
Cc: Meetakshi Setiya <msetiya@microsoft.com>
Subject: Re: [PATCH 2/2] smb: client: retry compound request without reusing lease
Date: Fri, 29 Dec 2023 12:43:08 -0300	[thread overview]
Message-ID: <7e61ce96ef41bdaf26ac765eda224381@manguebit.com> (raw)
In-Reply-To: <20231229143521.44880-2-meetakshisetiyaoss@gmail.com>

meetakshisetiyaoss@gmail.com writes:

> From: Meetakshi Setiya <msetiya@microsoft.com>
>
> There is a shortcoming in the current implementation of the file
> lease mechanism exposed when the lease keys were attempted to be reused
> for unlink, rename and set_path_size operations for a client. As per
> MS-SMB2, lease keys are associated with the file name. Linux cifs client
> maintains lease keys with the inode. If the file has any hardlinks,
> it is possible that the lease for a file be wrongly reused for an
> operation on the hardlink or vice versa. In these cases, the mentioned
> compound operations fail with STATUS_INVALID_PARAMETER.
> This patch adds a fallback to the old mechanism of not sending any
> lease with these compound operations if the request with lease key fails
> with STATUS_INVALID_PARAMETER. Resending the same request without lease
> key should not hurt any functionality, but might impact performance
> especially in cases where the error is not because of the usage of wrong
> lease key and we might end up doing an extra roundtrip.

What's the problem with checking ->i_nlink to decide whether reusing
lease key?

  reply	other threads:[~2023-12-29 15:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29 14:35 [PATCH 1/2] smb: client: reuse file lease key in compound operations meetakshisetiyaoss
2023-12-29 14:35 ` [PATCH 2/2] smb: client: retry compound request without reusing lease meetakshisetiyaoss
2023-12-29 15:43   ` Paulo Alcantara [this message]
2024-01-03  4:35     ` Meetakshi Setiya
2024-01-03 14:37       ` Paulo Alcantara
2024-01-04 21:09         ` Tom Talpey
2024-01-04 23:09           ` Paulo Alcantara
2024-01-05  9:18             ` Shyam Prasad N
2024-01-05  9:39           ` Shyam Prasad N
2024-01-05 10:00             ` Stefan Metzmacher
2024-01-05 10:23               ` Shyam Prasad N
2024-01-05 10:38                 ` Stefan Metzmacher
2024-01-05 10:58                   ` Shyam Prasad N
2024-01-05 18:42                     ` Steve French
2024-01-17 14:15                       ` Meetakshi Setiya
2024-02-02 12:50               ` Meetakshi Setiya
2024-01-03  6:55 ` [PATCH 1/2] smb: client: reuse file lease key in compound operations kernel test robot

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=7e61ce96ef41bdaf26ac765eda224381@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=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.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