Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 22 Mar 2003 11:45:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 22 Mar 2003 11:44:59 -0500 Received: from modemcable092.130-200-24.mtl.mc.videotron.ca ([24.200.130.92]:32325 "EHLO montezuma.mastecende.com") by vger.kernel.org with ESMTP id ; Sat, 22 Mar 2003 11:44:54 -0500 Date: Sat, 22 Mar 2003 11:52:44 -0500 (EST) From: Zwane Mwaikambo X-X-Sender: zwane@montezuma.mastecende.com To: Linux Kernel cc: William Lee Irwin III Subject: Re: RPCSVC_MAXPAGES doesn't account for overhead(?) pages In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1353 Lines: 35 On Sat, 22 Mar 2003, Zwane Mwaikambo wrote: > I got this BUG with a 32k PAGE_SIZE, it looks like we unconditionally > allocate 2 extra pages on top of requested size so we wouldn't be able to > service a maximum payload from nfsd. > > Is there a more suitable/elegant fix? I forgot the patch... Index: linux-2.5.65-pgcl/include/linux/sunrpc/svc.h =================================================================== RCS file: /build/cvsroot/linux-2.5.65/include/linux/sunrpc/svc.h,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 svc.h --- linux-2.5.65-pgcl/include/linux/sunrpc/svc.h 17 Mar 2003 23:08:31 -0000 1.1.1.1 +++ linux-2.5.65-pgcl/include/linux/sunrpc/svc.h 22 Mar 2003 16:22:22 -0000 @@ -73,7 +73,8 @@ struct svc_serv { * This assumes that the non-page part of an rpc reply will fit * in a page - NFSd ensures this. lockd also has no trouble. */ -#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 1) + +#define RPCSVC_MAXPAGES (2+((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE+1)) static inline u32 svc_getu32(struct iovec *iov) { -- function.linuxpower.ca - 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/