From: rajasimandalos@gmail.com
To: linux-cifs@vger.kernel.org
Cc: smfrench@gmail.com, pc@manguebit.org, sprasad@microsoft.com,
bharathsm@microsoft.com, enzo@kernel.org
Subject: [PATCH v2 0/8] Remount patches v2
Date: Thu, 7 May 2026 13:44:40 +0000 [thread overview]
Message-ID: <20260507134448.168602-1-rajasimandalos@gmail.com> (raw)
From: Rajasi Mandal <rajasimandal@microsoft.com>
This series fixes several long-standing problems with how the SMB
client handles mount options at remount time:
- Options that affect runtime behaviour were silently ignored on
remount because smb3_reconfigure() only updated cifs_sb->ctx and
never propagated the new values to the live tcon / TCP_Server_Info
structures (retrans, echo_interval, the per-tcon options, rasize).
- Options that have no meaningful semantics on a live mount were
accepted by the parser, leading to confusing behaviour where the
user thinks the change took effect (vers, sec, multiuser, UNC,
username, ...). These are now rejected with a clear error.
- Toggling 'lease' / 'nolease' on remount used to leave behind
deferred file handles and cached directory entries that were
obtained under the previous lease setting. This series closes
deferred files and invalidates cached dirs across the superblock
when transitioning to nolease.
- cache=ro and cache=singleclient are special-cased to be rejected
on remount because changing them at runtime would be unsafe.
Patch 5 is a small refactor that moves struct tcon_list out of misc.c
into cifsglob.h so it can be shared between the new
invalidate_all_cached_dirs_sb() helper in cached_dir.c and the
existing cifs_close_all_deferred_files_sb() in misc.c. Patch 6 then
uses the shared struct.
Testing
=======
- Ran xfstests on the patch series.
- A targeted nolease/cached_dir stress test (lease<->nolease toggle
cycles, parallel remounters, concurrent I/O, GET/PUT trace pairing,
deadlock/starvation bounds, hung-task scan).
- A general remount test covering both reconfigurable and rejected
option changes plus repeated mount/umount/remount cycles.
All runs clean, no WARN/BUG/UAF/hung-task in dmesg.
Rajasi Mandal (8):
smb: client: block non-reconfigurable option changes on remount
smb: client: sync tcon-level options on remount
smb: client: sync retrans on remount
smb: client: sync echo_interval on remount
smb: client: move struct tcon_list to cifsglob.h
smb: client: allow nolease option to be reconfigured on remount
smb: client: block cache=ro and cache=singleclient on remount
smb: client: apply rasize on remount
fs/smb/client/cached_dir.c | 44 +++++
fs/smb/client/cached_dir.h | 1 +
fs/smb/client/cifsglob.h | 5 +
fs/smb/client/fs_context.c | 355 ++++++++++++++++++++++++++++++++++++-
fs/smb/client/misc.c | 5 -
fs/smb/client/trace.h | 2 +
6 files changed, 403 insertions(+), 9 deletions(-)
--
2.43.0
next reply other threads:[~2026-05-07 13:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 13:44 rajasimandalos [this message]
2026-05-07 13:44 ` [PATCH v2 1/8] smb: client: block non-reconfigurable option changes on remount rajasimandalos
2026-05-07 13:44 ` [PATCH v2 2/8] smb: client: sync tcon-level options " rajasimandalos
2026-05-07 13:44 ` [PATCH v2 3/8] smb: client: sync retrans " rajasimandalos
2026-05-07 13:44 ` [PATCH v2 4/8] smb: client: sync echo_interval " rajasimandalos
2026-05-07 13:44 ` [PATCH v2 5/8] smb: client: move struct tcon_list to cifsglob.h rajasimandalos
2026-05-07 13:44 ` [PATCH v2 6/8] smb: client: allow nolease option to be reconfigured on remount rajasimandalos
2026-05-07 13:44 ` [PATCH v2 7/8] smb: client: block cache=ro and cache=singleclient " rajasimandalos
2026-05-07 13:44 ` [PATCH v2 8/8] smb: client: apply rasize " rajasimandalos
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=20260507134448.168602-1-rajasimandalos@gmail.com \
--to=rajasimandalos@gmail.com \
--cc=bharathsm@microsoft.com \
--cc=enzo@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.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