[PATCH 003 of 8] knfsd: Fix auto-sizing of nfsd request/reply buffers

From: NeilBrown
Date: Thu Sep 28 2006 - 23:09:44 EST



totalram is measured in pages, not bytes, so PAGE_SHIFT must be used
when trying to find 1/4096 of RAM.

Cc: "J. Bruce Fields" <bfields@xxxxxxxxxxxx>
Signed-off-by: Neil Brown <neilb@xxxxxxx>

### Diffstat output
./fs/nfsd/nfssvc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c
--- .prev/fs/nfsd/nfssvc.c 2006-09-29 11:44:32.000000000 +1000
+++ ./fs/nfsd/nfssvc.c 2006-09-29 11:57:27.000000000 +1000
@@ -209,7 +209,7 @@ int nfsd_create_serv(void)
* Of course, this is only a default.
*/
nfsd_max_blksize = NFSSVC_MAXBLKSIZE;
- i.totalram >>= 12;
+ i.totalram <<= PAGE_SHIFT - 12;
while (nfsd_max_blksize > i.totalram &&
nfsd_max_blksize >= 8*1024*2)
nfsd_max_blksize /= 2;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/