summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2004-08-23 10:15:13 -0400
committerTrond Myklebust <trond.myklebust@fys.uio.no>2004-08-23 10:15:13 -0400
commit4ea5dc72c1eb79aab3c460296e2aa49913401ec7 (patch)
treefd48191106791e2655b83bf729fbaa96b52d79ea /include/linux
parent7d4e31b1a1704ae6ceffb4ced34153bde028ce1c (diff)
NFS: In 2.4, NFS O_DIRECT used the VFS's O_DIRECT logic to provide
direct I/O support for NFS files. The 2.4 VFS O_DIRECT logic was block based, thus the NFS client had to provide a minimum allowable blocksize for O_DIRECT reads and writes on NFS files. For various reasons we chose 512 bytes. In 2.6, there is no requirement for a minimum blocksize. NFS O_DIRECT reads and writes can go to any byte at any offset in a file. Thus we revert the blocksize setting for NFS file systems to the previous behavior, which was to advertise the "wsize" setting as the optimal I/O block size. This improves the performance of applications like 'cp' which use this value as their transfer size. This patch also exposes the server's reported disk block size in the f_frsize of the vfsstat structure. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs_sb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 428355f8aaf9..a43a38607982 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -18,6 +18,7 @@ struct nfs_server {
unsigned int rpages; /* read size (in pages) */
unsigned int wsize; /* write size */
unsigned int wpages; /* write size (in pages) */
+ unsigned int wtmult; /* server disk block size */
unsigned int dtsize; /* readdir size */
unsigned int bsize; /* server block size */
unsigned int acregmin; /* attr cache timeouts */