From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A9FC28A72F for ; Thu, 21 May 2026 13:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779371680; cv=none; b=txdBJkgBWVk6DG+Rf3ZVQkDv0+spqdEBwb7YhXC5Fcrj4VtP4IhIPfBOLtpyMZdqDfPgyYT6vkWSE79PRm2oSVva1+ofYnB0ohAeWmkLiXwI4KuWWVzgix4TzojvVSevgp+8hFS6apXX5D6xiWAxF491X+aSGnPwQchRR7UXTuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779371680; c=relaxed/simple; bh=aJXcUe96mYNYpMc7nreTsMLl5qNEWscVW0C0ZqUYfg8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=NpluaJgxvUJWC+ob08qf5ooxDHKCKn4ExBCcQWt2xBA4S4vFWno+IJA45Ixlw4bRsVnJX/+HchBjYUmH5Qlozri7eMR9vzHC9ChP25LmdXyos6o446qhLngPz+PB4xEnqZc0zLnCEI3K5+5WybSiWPW/aLgOFKgGqW6AlJt66Uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IJBijoB7; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJBijoB7" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-c7980c060cfso2727115a12.2 for ; Thu, 21 May 2026 06:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779371679; x=1779976479; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+VMZum6rbvcq8SNvCs1usF5qoZjgULqc5UsCB3krkjA=; b=IJBijoB7GW5jjrYMk/D45zcu1b7f4Gw8wGKy43UyZVuoFovXPdgRl7VUP9m5WNWayU V8XfuR1q7tt8cVd3Crm3MXMZeNTtKifATn5jMTbuLa5zFNN/wCoPOI56zFa3yOqc1iTD guTJR7RiE/eEfNmCiH/1y83v9c7QFq3Thz82luf5uBKsVPF4aiJ/YCeQKM0mBYyVhRtL r4WYDBdIx5MYpVW4JXr7b5GWqXRlg833H0hiLatPG6KBqc1WMuK1E0F31m40Lg33Dys/ L/Q4cT3YqvrQtKk1t/RbK7td/fKnIWv0WiE+L5tF9wyxkeu6SGMdVQmxkfAewZdYgSWG zCyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779371679; x=1779976479; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+VMZum6rbvcq8SNvCs1usF5qoZjgULqc5UsCB3krkjA=; b=FOH5t+qPxw0GDGmP7kidZP4VkIXrpQeDfF+Lj+f7txj5DVLOB9XF3/msui5Nz9PEcR A5L+x5OOKvuBtChmMuCIgkxcThM0/wWo83HjdasKA/qp+aIwH5tJHsVGR3LWhJFjczNy 156Td9MXSlZ7PdKEtRQoqO7GHf2LSlEuJPnsrGm7xAK7nMF6NoIB87UnJNyjrNYj0q3i qAh8IopassgqhW86PGA4kRXgrhFfbuHwxCe6sH/nJazM06jFu14a3dhA2Nxlu6RymLzZ mroiEMGpK4WxopT1HuWFfJrSCXFcbQlMtOSTRT/0E7/J0UUuclSzzQwzrMVe8nNobMRX Vlzg== X-Forwarded-Encrypted: i=1; AFNElJ+0rrVTJbKsJRTBmyxT/H400onVanrdFSJNuQ1jprsabzgWDZTOOIpo49unbvGGqd0CXgqPGziLlIb2ZXg=@vger.kernel.org X-Gm-Message-State: AOJu0YzkzTX1/EM2Xftkq60RA2fzNduAGqqaiYuswn49jDv6lpeAk7JD 3BapkV981JG1VZU0tpToitH42jwyY07cDs+Vgm9i7ecGG0NyYHqlmYVu X-Gm-Gg: Acq92OFlNNVsGAovzyokuYtUdRlEUxot7iPUkLlyd4+HnVEpVsNZJ/Regd/XWJ68WsQ jkQiiSbMgG1hEmAcxxugH2zqrc4RmBl+UOSQ7VMnglVlWXC8Ce8SJqapB5848hj+y0bepDi/4tU 8OF5pKZSlxfNYUlbf9lzI93RU6FQWUOCLCsvETD6WsihgrLFNUbWiZySOMDKbuqZzXon4qyMFC9 AqEyL6WjgbeuqBdyrqgwfK/0uzfSZCi8CSyZda3I04m6P62GRoYD8Fn/iQcvzAyXHyVJFvVtb2N gaYIY9MA5tiKOz87OCJ6nji42bxQWAUgkwfKizY+1CrxZY4IgsRrj55IT2T6qHgEADOuevsR5/0 ZrnqiEOuSqsXEKxZszr5/D/VeJsOp2OuOZWSV7LqA+4aIJ7KWVXwpzUKHjnvIjvpc5Ii+1F2sfH b7IdIz9uO7nTGdXTVZ1KVHWCC6roMgv2saJwgrVByJ8+bu9CaKY40jTAfbbtZyrzwSFy2qPIa8a r3MELahQSji2k4jL6gSSmzKQSgDNpeMzA== X-Received: by 2002:a05:6a21:329d:b0:3a2:dc51:449 with SMTP id adf61e73a8af0-3b3086e8ec8mr3669926637.12.1779371678713; Thu, 21 May 2026 06:54:38 -0700 (PDT) Received: from dev-vm-rm.hzz4ddxqtfeetjrh00qlbgyytb.rx.internal.cloudapp.net ([20.197.52.255]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c85197c72b3sm455378a12.4.2026.05.21.06.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 06:54:38 -0700 (PDT) From: rajasimandalos@gmail.com To: Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Meetakshi Setiya Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, Rajasi Mandal Subject: [PATCH v3 0/9] smb: client: make remount option handling correct and consistent Date: Thu, 21 May 2026 13:54:06 +0000 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Rajasi Mandal 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 (9): smb: client: sync runtime state into ctx on reconfigure 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/cifs_swn.h | 14 +- fs/smb/client/cifsglob.h | 5 + fs/smb/client/fs_context.c | 355 ++++++++++++++++++++++++++++++++++++- 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, 431 insertions(+), 13 deletions(-) base-commit: 19d8c94787da866318eead464fb9c9d70815af56 -- 2.43.0