From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 1D79D3D349C for ; Tue, 16 Jun 2026 05:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781589265; cv=none; b=ACqV7qRVhIUS0Xt+hr8S51pBDxqrrCoF0/IXnPu+q6hzHj8wLFhNL/287J6HzdVNTb3iKaN0CN1tVoVcLygi1PnDoAaxBeNpv5+bQTtJooZ5PRuPfOTVPzWtBGPv3u3qqP4lL1sDot4BCTdclThcQ2cpP/X4qfE/u80UYK/DCJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781589265; c=relaxed/simple; bh=toEDa8c8Bw1Ro5e+rhuh7ud8Sa//Wl/ICccogwCsZVg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nADbSyEnpAZa8rHPSI2neoJgMOwBnLbxo+PsSnZtfW3jGppTS20gJ1/fL2HEfO5PHYNOdTfP5lAJGG8os8nDyrh02qkl8Jj8uek4JvoHSgA0tTOOp0FijF7jfAtlXGgGCuyzEteZ8I/33A3/UBVGNmMYLg4Y5t6Tr3qlMVPlOU4= 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=nPT07+Ru; arc=none smtp.client-ip=209.85.214.176 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="nPT07+Ru" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-2bf30d530bdso41065225ad.3 for ; Mon, 15 Jun 2026 22:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781589263; x=1782194063; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bNRVcjrSmFHfVTPq3R+9IcQ/n8NpuhmUFL1A95VvlLE=; b=nPT07+Ru1Z+PiUdKmCq2D0AR9BJOKjYNYtNI4zaczg59BnuqG0BOKetgLXhkioFSUC QdVf59MABYowUIxG0yhmJRIBLyTbOJM3mIHWkRTy6E9CabiB38NPTUpESGQP+GXsMhhv JYnwz+Pg1o8ImSPi8qhIgnOV+kfVYHfMM5WcAHryEXx4PVMNtZuwU6n/zqhPLGnixuMg CNr8cnvbZ3Wi1CcmChMeTrxjfYkMFt9DgNBYw2ODzq6n5hXd5vq8U5U5RIapPq2BiY+i MiZ0drqrmYrd9w1H7ciXOIdWELXL4qJi2IYQdY7TVZnON5afY/v8B3vjRaNEvOJHQoyI 3a2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781589263; x=1782194063; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bNRVcjrSmFHfVTPq3R+9IcQ/n8NpuhmUFL1A95VvlLE=; b=YvZ3mO+H5OjkW220/tVtNYVw8ngTEK2l1+knkyeaWxW4YrmhR6EfBaG2aixqoTbFMY gLQwnmLW1dN3aHmi7ovsx3VmQlK/gysryTZeexRm/mDx+ab8+yYukJ+61C8CtwCENtNC W1TTSuh9BMQN8MdXOFfOwyGZWXTw8wy2QCvvU2+KdB+O471nNCaDZV4+bJs40TqtV1Yc YMfWAhgCvEz6oRB1O+3rll4o6ZPFvWOdptK26cvytXHNLAExG7Ac/ng7tB0hkvKmTASn LK4C/I6KCDv8R5yLRU/tYAJdMgm4sT64EYUiIwZ5cB1BEKp2dAMy+BL0gxNzSjNIAy8Z extw== X-Forwarded-Encrypted: i=1; AFNElJ/bjpLoNaybprUMsjTCMDAo9OplbSLuGlYl5Vo3tdCDkThAUKbYa4lfvTClAcU/NvTnTjZDTy6zwoohhKc=@vger.kernel.org X-Gm-Message-State: AOJu0YzGgWgLA/0wj1KgpL+4U/oe3kRPC28NkyGe904pzKSv4TcZwYbQ b/WiH3mJI+pe4yhQz/P0Fy4oS5HSjkjWd3vOEt1/9B7da4YVVhThaQRO X-Gm-Gg: Acq92OEY/iP4iqcLYRZar808zRF7SDg03dpPtECVqTUjVmtezHZGVOWdqFe7UEnB1Md MggOX2mIHtTZuCaChvWZRniYDtftdLQ2ENcn1jJkmbrU5qN0STLtoRp5R9tP3xBF1GYc0T8aAAZ 6fmzwJiuBEYcBKdpkrDj6UxeAhieFS+5gyADsUdZ2zJu/a1c+B4GskWEEi29zha+555Ew5mB+sa VTvG8+EP4Zu1wva3h2qxvKgwuRvrQD5oiRyePT43hEKK569dYlwzzT3pavLns3yB8qqs710JGzr PZzVYiv2SC/v6T9K9C19gEFPODTaXP0+hnenAZCO6ZNjvMMrgVP2Mbliq4Y86PHsUqAG72eczDX jAD0IN0iiOXmbMWxNIxpmuR29uZL/KwH3VPMcFJjqL6/dTz5uk1laQ4ROMQ4h68fTnzvSEwkQcF BFsDRf44I80t8NM5LpclGIeKFqquxQwC8Y83f4T2GNuoitVUEXRJxEfrlaJ4wPgx63AnloZ7c+Y q2Il/ofoMnxZAnqKiztiR4= X-Received: by 2002:a17:902:ce82:b0:2bf:379b:53d2 with SMTP id d9443c01a7336-2c6641bb17amr147686655ad.15.1781589263441; Mon, 15 Jun 2026 22:54:23 -0700 (PDT) Received: from dev-vm-rm.hzz4ddxqtfeetjrh00qlbgyytb.rx.internal.cloudapp.net ([20.197.52.255]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c42f2e52b5sm120805275ad.7.2026.06.15.22.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 22:54:23 -0700 (PDT) From: rajasimandalos@gmail.com To: Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, Meetakshi Setiya , Rajasi Mandal , Meetakshi Setiya Subject: [PATCH v4 5/7] smb: client: apply rasize on remount Date: Tue, 16 Jun 2026 05:53:55 +0000 Message-ID: <20260616055357.3798387-6-rajasimandalos@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260616055357.3798387-1-rajasimandalos@gmail.com> References: <20260616055357.3798387-1-rajasimandalos@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Rajasi Mandal 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 Reviewed-by: Meetakshi Setiya --- fs/smb/client/fs_context.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 659fb0adb528..0a72e1089ff7 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -1313,7 +1313,7 @@ static int smb3_reconfigure(struct fs_context *fc) struct dentry *root = fc->root; struct cifs_sb_info *cifs_sb = CIFS_SB(root->d_sb); struct cifs_ses *ses = cifs_sb_master_tcon(cifs_sb)->ses; - unsigned int rsize = ctx->rsize, wsize = ctx->wsize; + unsigned int rsize = ctx->rsize, wsize = ctx->wsize, rasize = ctx->rasize; char *new_password = NULL, *new_password2 = NULL; bool need_recon = false; bool need_mchan_update; @@ -1379,9 +1379,10 @@ static int smb3_reconfigure(struct fs_context *fc) STEAL_STRING_SENSITIVE(cifs_sb, ctx, password2); } - /* if rsize or wsize not passed in on remount, use previous values */ + /* if rsize, wsize, or rasize 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; + ctx->rasize = rasize ? rasize : cifs_sb->ctx->rasize; new_ctx = kzalloc_obj(*new_ctx); if (!new_ctx) { @@ -1470,6 +1471,12 @@ static int smb3_reconfigure(struct fs_context *fc) smb3_cleanup_fs_context(old_ctx); old_ctx = NULL; 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