From: Meetakshi Setiya <meetakshisetiyaoss@gmail.com>
To: rajasimandalos@gmail.com
Cc: sfrench@samba.org, linux-cifs@vger.kernel.org, pc@manguebit.org,
ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
metze@samba.org, bharathsm@microsoft.com,
samba-technical@lists.samba.org, linux-kernel@vger.kernel.org,
Rajasi Mandal <rajasimandal@microsoft.com>
Subject: Re: [PATCH 9/9] smb: client: apply rasize on remount
Date: Mon, 13 Apr 2026 06:29:46 -0700 [thread overview]
Message-ID: <CAFTVevXf-sV8Z15Qyb=LtcjDRy64R6pyMwFVtpytqXpOmbR4Qw@mail.gmail.com> (raw)
In-Reply-To: <20260409095926.905020-9-rajasimandalos@gmail.com>
Hi Rajasi,
Before syncing the contexts, you should check if rasize has been
passed during remount at all. Else, we run the risk of overwriting
cifs_sb->ctx->rasize to 0 (the default value).
Please check how rsize and wsize handle this (a few lines above):
/* if rsize or wsize not passed in on remount, use previous values */
ctx->rsize = rsize ? CIFS_ALIGN_RSIZE(fc, rsize) : cifs_sb->ctx->rsize;
ctx->wsize = wsize ? CIFS_ALIGN_WSIZE(fc, wsize) : cifs_sb->ctx->wsize;
Thanks
Meetakshi
On Thu, Apr 9, 2026 at 3:08 AM <rajasimandalos@gmail.com> wrote:
>
> From: Rajasi Mandal <rajasimandal@microsoft.com>
>
> rasize is accepted during remount parsing but sb->s_bdi->ra_pages is
> only set in cifs_read_super() at mount time. A remount with a new
> rasize value silently has no effect on the readahead window.
>
> Update ra_pages in smb3_reconfigure() after the context has been
> duplicated, using the same logic as cifs_read_super(): if rasize is
> set, use it directly; otherwise fall back to 2 * rsize.
>
> Signed-off-by: Rajasi Mandal <rajasimandal@microsoft.com>
> ---
> fs/smb/client/fs_context.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
> index d804e5da578e..bba642442ae3 100644
> --- a/fs/smb/client/fs_context.c
> +++ b/fs/smb/client/fs_context.c
> @@ -1504,6 +1504,12 @@ static int smb3_reconfigure(struct fs_context *fc)
> smb3_cleanup_fs_context_contents(cifs_sb->ctx);
> rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
> smb3_update_mnt_flags(cifs_sb);
> +
> + if (cifs_sb->ctx->rasize)
> + root->d_sb->s_bdi->ra_pages = cifs_sb->ctx->rasize / PAGE_SIZE;
> + else
> + root->d_sb->s_bdi->ra_pages = 2 * (cifs_sb->ctx->rsize / PAGE_SIZE);
> +
> #ifdef CONFIG_CIFS_DFS_UPCALL
> if (!rc)
> rc = dfs_cache_remount_fs(cifs_sb);
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-04-13 13:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:59 [PATCH 1/9] smb: client: block non-reconfigurable option changes on remount rajasimandalos
2026-04-09 9:59 ` [PATCH 2/9] smb: client: allow both 'lease' and 'nolease' mount options rajasimandalos
2026-04-13 13:30 ` Meetakshi Setiya
2026-04-09 9:59 ` [PATCH 3/9] smb: client: sync tcon-level options on remount rajasimandalos
2026-04-17 14:29 ` Meetakshi Setiya
2026-04-09 9:59 ` [PATCH 4/9] smb: client: sync retrans " rajasimandalos
2026-04-09 9:59 ` [PATCH 5/9] smb: client: sync echo_interval " rajasimandalos
2026-04-22 4:42 ` [PATCH v2] " rajasimandalos
2026-04-09 9:59 ` [PATCH 6/9] smb: client: allow nolease option to be reconfigured " rajasimandalos
2026-04-22 5:06 ` [PATCH v2] " rajasimandalos
2026-04-22 8:36 ` Bharath SM
2026-04-22 15:29 ` Steve French
2026-04-09 9:59 ` [PATCH 7/9] smb: client: block cache=ro and cache=singleclient " rajasimandalos
2026-04-13 13:40 ` Meetakshi Setiya
2026-04-22 4:34 ` RAJASI MANDAL
2026-04-09 9:59 ` [PATCH 8/9] smb: client: fix domainauto remount by syncing domainname from session rajasimandalos
2026-04-09 9:59 ` [PATCH 9/9] smb: client: apply rasize on remount rajasimandalos
2026-04-13 13:29 ` Meetakshi Setiya [this message]
2026-04-13 7:32 ` [PATCH v2 1/9] smb: client: block non-reconfigurable option changes " Rajasi Mandal
2026-04-17 14:05 ` Meetakshi Setiya
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='CAFTVevXf-sV8Z15Qyb=LtcjDRy64R6pyMwFVtpytqXpOmbR4Qw@mail.gmail.com' \
--to=meetakshisetiyaoss@gmail.com \
--cc=bharathsm@microsoft.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=rajasimandal@microsoft.com \
--cc=rajasimandalos@gmail.com \
--cc=ronniesahlberg@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).