summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 0f8c36a..b8aa2fd 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -211,10 +211,12 @@ newnfs_iosize(struct nfsmount *nmp)
* Calculate the size used for io buffers. Use the larger
* of the two sizes to minimise nfs requests but make sure
* that it is at least one VM page to avoid wasting buffer
- * space.
+ * space. It must also be at least NFS_DIRBLKSIZ, since
+ * that is the buffer size used for directories.
*/
iosize = imax(nmp->nm_rsize, nmp->nm_wsize);
iosize = imax(iosize, PAGE_SIZE);
+ iosize = imax(iosize, NFS_DIRBLKSIZ);
nmp->nm_mountp->mnt_stat.f_iosize = iosize;
return (iosize);
}
OpenPOWER on IntegriCloud