• Trond Myklebust's avatar
    NFS: In 2.4, NFS O_DIRECT used the VFS's O_DIRECT logic to provide · 4ea5dc72
    Trond Myklebust authored
       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: default avatarChuck Lever <cel@netapp.com>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
    4ea5dc72
nfs_fs_sb.h 1.78 KB