Text based mount options ignoring the preferred rwsize?

James Pearson
2009-09-08T17:16:17Z

I've noticed a difference in the rsize used when mounting a file system
between using text and binary mount options.

The client is running a CentOS5 based distro with a 2.6.32-rc8 kernel

The server has a preferred rsize of 128kb and maximum rsize of 512kb

When I use mount.nfs from CentOS5/RHEL5 nfs-utils (based on v1.0.9) and
don't give any rsize option, it mounts the file system with a rsize of
128kb. This uses binary mount options

But, when using mount.nfs from nfs-utils 1.2.0, the file system is
mounted with an rsize of 512kb

Looking at the nfs-utils and kernel source, it appears that for binary
options, rsize is set to 0 if not given by mount.nfs, and the kernel
eventually, in this case, increases this to preferred size.

But for text mount options, if not set by mount.nfs, the default size is
set to NFS_MAX_FILE_IO_SIZE in the kernel, which, in this case, gets
reduced to the server maximum size.

Should the kernel be setting rsize (and wsize) to 0 by default?

Thanks

James Pearson