Re: [PATCH] nfs(5): Update rsize/wsize options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Nov 2024 at 08:25, Seiichi Ikarashi (Fujitsu)
<s.ikarashi@xxxxxxxxxxx> wrote:
>
> The rsize/wsize values are not multiples of 1024 but multiples of PAGE_SIZE
> or powers of 2 if < PAGE_SIZE as defined in fs/nfs/internal.h:nfs_io_size().

This is an implementation bug, NOT a documentation bug.

>
> Signed-off-by: Seiichi Ikarashi <s.ikarashi@xxxxxxxxxxx>

r- (patch rejected)

The rsize/wsize value must not depend on a variable, per-machine
value. For example SPARCv9 can use 8k, 32k, 512k and so on.
AARCH64/ARM64 can use 4k or 64, all selectable at boot parameters.
Better we fix the kernel code to count in 1k for rsize and wsize options.
Only question is whether we "round up", or "round down" to the
machine's page size.

I shudder already at this stupid scenario: Entries in /etc/fstab can
no longer be deployed via puppet, because a script must always use
/usr/bin/pagesize to peel our the machine's default page size, do some
calculations with /bin/bc and do a mount via script.
Sarcastic bonus points go to the person who decided to put
/usr/bin/pagesize into a separate package which is not installed by
default in Debian+RH.

Ced

> ---
> utils/mount/nfs.man | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man
> index 233a717..01fa22c 100644
> --- a/utils/mount/nfs.man
> +++ b/utils/mount/nfs.man
> @@ -215,15 +215,18 @@ or smaller than the
>  setting. The largest read payload supported by the Linux NFS client
>  is 1,048,576 bytes (one megabyte).
>  .IP
> -The
> +The allowed
>  .B rsize
> -value is a positive integral multiple of 1024.
> +value is a positive integral multiple of
> +.BR PAGE_SIZE ,
> +or a power of two if it is less than
> +.BR PAGE_SIZE .
>  Specified
>  .B rsize
>  values lower than 1024 are replaced with 4096; values larger than
>  1048576 are replaced with 1048576. If a specified value is within the supported
> -range but not a multiple of 1024, it is rounded down to the nearest
> -multiple of 1024.
> +range but not such an allowed value, it is rounded down to the nearest
> +allowed value.
>  .IP
>  If an
>  .B rsize
> @@ -257,16 +260,19 @@ setting. The largest write payload supported by the Linux NFS client
>  is 1,048,576 bytes (one megabyte).
>  .IP
>  Similar to
> -.B rsize
> -, the
> +.BR rsize ,
> +the allowed
>  .B wsize
> -value is a positive integral multiple of 1024.
> +value is a positive integral multiple of
> +.BR PAGE_SIZE ,
> +or a power of two if it is less than
> +.BR PAGE_SIZE .
>  Specified
>  .B wsize
>  values lower than 1024 are replaced with 4096; values larger than
>  1048576 are replaced with 1048576. If a specified value is within the supported
> -range but not a multiple of 1024, it is rounded down to the nearest
> -multiple of 1024.
> +range but not such an allowed value, it is rounded down to the nearest
> +allowed value.
>  .IP
>  If a
>  .B wsize
>


-- 
Cedric Blancher <cedric.blancher@xxxxxxxxx>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux