[PATCH 0/1] NFSv4.1: Apply session size limits on clone path

Tushar Sariya posted 1 patch 2 months, 1 week ago
There is a newer version of this series
fs/nfs/internal.h   | 2 ++
fs/nfs/nfs4client.c | 4 ++--
fs/nfs/nfs4proc.c   | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
[PATCH 0/1] NFSv4.1: Apply session size limits on clone path
Posted by Tushar Sariya 2 months, 1 week ago
From: Tushar Sariya <tushar.97@hotmail.com>

The NFS automount clone path (nfs4_clone_server) is missing the
session-size clamping that top-level mounts get in
nfs4_server_common_setup(). This was exposed by 2b092175f5e3 which
changed submounts to no longer unconditionally inherit the parent's
already-clamped rsize/wsize. On servers that enforce tight
max_request_size budgets (reported on Dell EMC Isilon/OneFS), the
child mount ends up with raw unclamped values that exceed the session
channel limits, resulting in NFS4ERR_REQ_TOO_BIG and user-visible EIO.

Note: I was unable to reproduce the exact failure locally as it appears
to require a server that enforces tight max_request_size budgets. The
fix is based on code analysis — the clone path is missing the same
session-limit clamping that top-level mounts apply in
nfs4_server_common_setup(). Tested that the kernel builds and boots
successfully.

Tushar Sariya (1):
  NFSv4.1: Apply session size limits on clone path

 fs/nfs/internal.h   | 2 ++
 fs/nfs/nfs4client.c | 4 ++--
 fs/nfs/nfs4proc.c   | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

--
2.43.0

Re: [PATCH 0/1] NFSv4.1: Apply session size limits on clone path
Posted by Tushar Sariya 2 months, 1 week ago
Superseded. Reposting as a reply to the original regression report:

https://lore.kernel.org/all/177349021750.3039212.10211295677877269201@eldamar.lan/

On Fri, Apr 3, 2026 at 11:30 PM Tushar Sariya <tushar.sariya77@gmail.com> wrote:
>
> From: Tushar Sariya <tushar.97@hotmail.com>
>
> The NFS automount clone path (nfs4_clone_server) is missing the
> session-size clamping that top-level mounts get in
> nfs4_server_common_setup(). This was exposed by 2b092175f5e3 which
> changed submounts to no longer unconditionally inherit the parent's
> already-clamped rsize/wsize. On servers that enforce tight
> max_request_size budgets (reported on Dell EMC Isilon/OneFS), the
> child mount ends up with raw unclamped values that exceed the session
> channel limits, resulting in NFS4ERR_REQ_TOO_BIG and user-visible EIO.
>
> Note: I was unable to reproduce the exact failure locally as it appears
> to require a server that enforces tight max_request_size budgets. The
> fix is based on code analysis — the clone path is missing the same
> session-limit clamping that top-level mounts apply in
> nfs4_server_common_setup(). Tested that the kernel builds and boots
> successfully.
>
> Tushar Sariya (1):
>   NFSv4.1: Apply session size limits on clone path
>
>  fs/nfs/internal.h   | 2 ++
>  fs/nfs/nfs4client.c | 4 ++--
>  fs/nfs/nfs4proc.c   | 3 +++
>  3 files changed, 7 insertions(+), 2 deletions(-)
>
> --
> 2.43.0
>