mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: rajasimandalos@gmail.com
To: Steve French <sfrench@samba.org>,
	Paulo Alcantara <pc@manguebit.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Meetakshi Setiya <meetakshisetiyaoss@gmail.com>,
	Rajasi Mandal <rajasimandal@microsoft.com>
Subject: [PATCH v4 0/7] smb: client: make more mount options take effect on remount
Date: Tue, 16 Jun 2026 05:53:50 +0000	[thread overview]
Message-ID: <20260616055357.3798387-1-rajasimandalos@gmail.com> (raw)

From: Rajasi Mandal <rajasimandal@microsoft.com>

Several mount options are accepted by the remount (reconfigure) path but
silently have no effect: the new value is stored in cifs_sb->ctx but never
propagated to the live server/tcon structures, or the option is simply
ignored.  This is confusing -- the user passes an option on
'mount -o remount' and nothing changes, with no error.

This series makes the reconfigure path honest:

  - It first establishes a correct baseline for comparing old vs new
    options on remount by duplicating the live context (with runtime
    state synced in) instead of rebuilding from init defaults.

  - Options that are genuinely reconfigurable (retrans, rasize, nolease)
    are now applied to the running mount.

  - Options that are connection-tied and cannot take effect without
    tearing down the connection (seal, sign, vers, ip, srcaddr, rdma,
    cache=ro/singleclient, etc.) are now explicitly rejected with a clear
    error message instead of being silently dropped.

Patch 1 is preparatory plumbing (duplicate live ctx + sync runtime
state) that makes the simple != comparisons in the rejection checks
sound.  Patches 2 and 4 add the rejection checks.  Patches 3, 5 and 7
apply the reconfigurable options.  Patch 6 is a small no-functional-change
move of struct tcon_list so the nolease patch can reuse it.

Changes since v3:
  - nolease: moved tcon->no_lease out of the bitfield word into a plain
    bool, so propagating it on remount cannot race (via a bitfield
    read-modify-write) with the lockless need_reconnect/need_reopen_files
    writers on the reconnect/reopen paths.
  - srcaddr remount check now uses cifs_match_ipaddr() instead of a raw
    memcmp over sockaddr_storage, matching the adjacent ip check and
    avoiding port/padding fragility.

Rajasi Mandal (7):
  smb: client: sync runtime state into ctx on reconfigure
  smb: client: block non-reconfigurable option changes on remount
  smb: client: sync retrans on remount
  smb: client: block cache=ro and cache=singleclient on remount
  smb: client: apply rasize on remount
  smb: client: move struct tcon_list to cifsglob.h
  smb: client: allow nolease option to be reconfigured on remount

 fs/smb/client/cached_dir.c |  44 +++++
 fs/smb/client/cached_dir.h |   1 +
 fs/smb/client/cifs_swn.h   |  14 +-
 fs/smb/client/cifsglob.h   |   7 +-
 fs/smb/client/fs_context.c | 332 ++++++++++++++++++++++++++++++++++++-
 fs/smb/client/misc.c       |   5 -
 fs/smb/client/smb1ops.c    |   7 +-
 fs/smb/client/smb2pdu.c    |  11 +-
 fs/smb/client/trace.h      |   2 +
 9 files changed, 411 insertions(+), 12 deletions(-)


base-commit: 0eb17dea51eff940230b5e562df29ce457124d41
-- 
2.43.0


             reply	other threads:[~2026-06-16  5:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  5:53 rajasimandalos [this message]
2026-06-16  5:53 ` [PATCH v4 1/7] smb: client: sync runtime state into ctx on reconfigure rajasimandalos
2026-06-16  6:44   ` Meetakshi Setiya
2026-06-16  5:53 ` [PATCH v4 2/7] smb: client: block non-reconfigurable option changes on remount rajasimandalos
2026-06-16  6:44   ` Meetakshi Setiya
2026-06-16  5:53 ` [PATCH v4 3/7] smb: client: sync retrans " rajasimandalos
2026-06-16  7:37   ` Meetakshi Setiya
2026-06-16  5:53 ` [PATCH v4 4/7] smb: client: block cache=ro and cache=singleclient " rajasimandalos
2026-06-16  7:40   ` Meetakshi Setiya
2026-06-16  5:53 ` [PATCH v4 5/7] smb: client: apply rasize " rajasimandalos
2026-06-16  7:41   ` Meetakshi Setiya
2026-06-16  5:53 ` [PATCH v4 6/7] smb: client: move struct tcon_list to cifsglob.h rajasimandalos
2026-06-16  5:53 ` [PATCH v4 7/7] smb: client: allow nolease option to be reconfigured on remount 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=20260616055357.3798387-1-rajasimandalos@gmail.com \
    --to=rajasimandalos@gmail.com \
    --cc=bharathsm@microsoft.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meetakshisetiyaoss@gmail.com \
    --cc=pc@manguebit.org \
    --cc=rajasimandal@microsoft.com \
    --cc=ronniesahlberg@gmail.com \
    --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

all inboxes | Powered by JetHome®