Hi Linus,
I found small a bug in the setup of the dtsize (determines how many
bytes we read in per readdir request to the server) which may cause
hangs when using the new directory cache against an NFSv3 server
(NFSv2 should be OK).
Under NFSv3, we try to set the above variable at mount-time using
the FSINFO call to the server. Unfortunately, since we're using the
page cache as a buffer, the readdir request size also has a local
limit of PAGE_CACHE_SIZE bytes.
The following patch implements the above bound on dtsize.
Sorry for not having noticed this earlier.
Cheers,
Trond
--- linux-2.3.99-pre9/fs/nfs/inode.c.orig Tue May 23 12:48:03 2000
+++ linux-2.3.99-pre9/fs/nfs/inode.c Wed May 24 09:05:29 2000
@@ -417,6 +417,8 @@
if (data->wsize == 0)
server->wsize = nfs_block_size(fsinfo.wtpref, NULL);
server->dtsize = nfs_block_size(fsinfo.dtpref, NULL);
+ if (server->dtsize > PAGE_CACHE_SIZE)
+ server->dtsize = PAGE_CACHE_SIZE;
/* NFSv3: we don't have bsize, but rather rtmult and wtmult... */
if (!fsinfo.bsize)
fsinfo.bsize = (fsinfo.rtmult>fsinfo.wtmult) ? fsinfo.rtmult : fsinfo.wtmult;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:11 EST