make NFS work with 64KB page-size

David Mosberger (davidm@napali.hpl.hp.com)
Wed, 18 Jun 2003 15:56:31 -0700


NFS currently bugs out on kernels with a page size of 64KB. The
reason is a mismatch between RPCSVC_MAXPAGES and a calculation in
svc_init_buffer(). I'm not entirely certain which calculation is the
right one, but if I understand the code correctly, RPCSVC_MAXPAGES is
right and svc_init_buffer() is wrong. The patch below fixes the
latter.

If the patch looks right, could you make sure it finds its way into
Linus' tree?

Thanks,

--david

===== net/sunrpc/svc.c 1.20 vs edited =====
--- 1.20/net/sunrpc/svc.c Fri Feb 7 12:25:20 2003
+++ edited/net/sunrpc/svc.c Wed Jun 18 15:02:19 2003
@@ -111,7 +111,7 @@
static int
svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
{
- int pages = 2 + (size+ PAGE_SIZE -1) / PAGE_SIZE;
+ int pages = 1 + (size+ PAGE_SIZE -1) / PAGE_SIZE;
int arghi;

rqstp->rq_argused = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/