All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kNFSd 3 of 4] Allow larger NFSd MAXBLKSIZE on architectures with larger PAGE_SIZE
  2004-08-16  3:58 [PATCH kNFSd 0 of 4] Introduction NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 2 of 4] mark NFS/TCP not EXPERIMENTAL NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking NeilBrown
@ 2004-08-16  3:58 ` NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31 NeilBrown
  3 siblings, 0 replies; 9+ messages in thread
From: NeilBrown @ 2004-08-16  3:58 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs


This patch makes NFSSVC_MAXBLKSIZE depend on PAGE_SIZE so that machines
with large page sizes can take advantage of that feature to serve NFS
with larger blocksizes, increasing performance and avoiding a fallback
to synchronous traffic between machines with page sizes greater than 8K.
Also, documents the actual constraints on NFSSVC_MAXBLKSIZE.

From: Greg Banks <gnb@sgi.com>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./include/linux/nfsd/const.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff ./include/linux/nfsd/const.h~current~ ./include/linux/nfsd/const.h
--- ./include/linux/nfsd/const.h~current~	2004-08-16 09:53:48.000000000 +1000
+++ ./include/linux/nfsd/const.h	2004-08-16 09:53:48.000000000 +1000
@@ -12,6 +12,7 @@
 #include <linux/nfs.h>
 #include <linux/nfs2.h>
 #include <linux/nfs3.h>
+#include <asm/page.h>
 
 /*
  * Maximum protocol version supported by knfsd
@@ -19,9 +20,16 @@
 #define NFSSVC_MAXVERS		3
 
 /*
- * Maximum blocksize supported by daemon currently at 8K
+ * Maximum blocksize supported by daemon.  We want the largest
+ * value which 1) fits in a UDP datagram less some headers
+ * 2) is a multiple of page size 3) can be successfully kmalloc()ed
+ * by each nfsd.   
  */
-#define NFSSVC_MAXBLKSIZE	(8*1024)
+#if PAGE_SIZE > (16*1024)
+#define NFSSVC_MAXBLKSIZE	(32*1024)
+#else
+#define NFSSVC_MAXBLKSIZE	(2*PAGE_SIZE)
+#endif
 
 #ifdef __KERNEL__
 


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH kNFSd 0 of 4] Introduction
@ 2004-08-16  3:58 NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 2 of 4] mark NFS/TCP not EXPERIMENTAL NeilBrown
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: NeilBrown @ 2004-08-16  3:58 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs

4 patches for knfsd.  in 2.4.28-pre1

 1/ improve checking of out-of-range lengths, particularly in write requests.
 2/ make CONFIG_NFSD_TCP non-EXPERIMENTAL and select it by default.
 3/ Allow a larger blocksize on arch's with large page size.
 4/ use llseek instead of explicitly setting f_pos in NFS i/o requests.

Thank,
NeilBrown


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH kNFSd 2 of 4] mark NFS/TCP not EXPERIMENTAL
  2004-08-16  3:58 [PATCH kNFSd 0 of 4] Introduction NeilBrown
@ 2004-08-16  3:58 ` NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking NeilBrown
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: NeilBrown @ 2004-08-16  3:58 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs



NFS/TCP has been used widely for a long time now, and is now
enabled by many distros and typically recommended for lossy or
congested networks.  This patch removes the EXPERIMENTAL tag,
updates the help text, and changes arch defconfigs to set it
by default (note that several already did so).

From: Greg Banks <gnb@sgi.com>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./Documentation/Configure.help |    7 ++++---
 ./arch/i386/defconfig          |    2 +-
 ./arch/ia64/defconfig          |    2 +-
 ./arch/mips/defconfig          |    2 +-
 ./arch/mips64/defconfig        |    2 +-
 ./arch/ppc/defconfig           |    2 +-
 ./arch/ppc64/defconfig         |    2 +-
 ./arch/s390/defconfig          |    2 +-
 ./arch/s390x/defconfig         |    2 +-
 ./arch/sh64/defconfig          |    2 +-
 ./fs/Config.in                 |    2 +-
 11 files changed, 14 insertions(+), 13 deletions(-)

diff ./Documentation/Configure.help~current~ ./Documentation/Configure.help
--- ./Documentation/Configure.help~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./Documentation/Configure.help	2004-08-16 09:53:43.000000000 +1000
@@ -17229,10 +17229,11 @@ CONFIG_NFSD_V3
   If you would like to include the NFSv3 server as well as the NFSv2
   server, say Y here.  If unsure, say Y.
 
-Provide NFS over TCP server support EXPERIMENTAL
+Provide NFS over TCP server support
 CONFIG_NFSD_TCP
-  Enable NFS service over TCP connections.  This the officially
-  still experimental, but seems to work well.
+  If you want your NFS server to support TCP connections, say Y here.
+  TCP connections usually perform better than the default UDP when
+  the network is lossy or congested.  If unsure, say Y.
 
 OS/2 HPFS file system support
 CONFIG_HPFS_FS

diff ./arch/i386/defconfig~current~ ./arch/i386/defconfig
--- ./arch/i386/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/i386/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -758,7 +758,7 @@ CONFIG_NFS_FS=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 # CONFIG_SMB_FS is not set

diff ./arch/ia64/defconfig~current~ ./arch/ia64/defconfig
--- ./arch/ia64/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/ia64/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -755,7 +755,7 @@ CONFIG_NFS_V3=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./arch/mips/defconfig~current~ ./arch/mips/defconfig
--- ./arch/mips/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/mips/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -607,7 +607,7 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 # CONFIG_SMB_FS is not set

diff ./arch/mips64/defconfig~current~ ./arch/mips64/defconfig
--- ./arch/mips64/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/mips64/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -563,7 +563,7 @@ CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./arch/ppc/defconfig~current~ ./arch/ppc/defconfig
--- ./arch/ppc/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/ppc/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -812,7 +812,7 @@ CONFIG_NFS_FS=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 # CONFIG_SMB_FS is not set

diff ./arch/ppc64/defconfig~current~ ./arch/ppc64/defconfig
--- ./arch/ppc64/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/ppc64/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -668,7 +668,7 @@ CONFIG_NFS_V3=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./arch/s390/defconfig~current~ ./arch/s390/defconfig
--- ./arch/s390/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/s390/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -351,7 +351,7 @@ CONFIG_NFS_V3=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./arch/s390x/defconfig~current~ ./arch/s390x/defconfig
--- ./arch/s390x/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/s390x/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -291,7 +291,7 @@ CONFIG_NFS_V3=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./arch/sh64/defconfig~current~ ./arch/sh64/defconfig
--- ./arch/sh64/defconfig~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./arch/sh64/defconfig	2004-08-16 09:53:43.000000000 +1000
@@ -386,7 +386,7 @@ CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y

diff ./fs/Config.in~current~ ./fs/Config.in
--- ./fs/Config.in~current~	2004-08-16 09:53:43.000000000 +1000
+++ ./fs/Config.in	2004-08-16 09:53:43.000000000 +1000
@@ -121,7 +121,7 @@ if [ "$CONFIG_NET" = "y" ]; then
 
    dep_tristate 'NFS server support' CONFIG_NFSD $CONFIG_INET
    dep_mbool '  Provide NFSv3 server support' CONFIG_NFSD_V3 $CONFIG_NFSD
-   dep_mbool '  Provide NFS server over TCP support (EXPERIMENTAL)' CONFIG_NFSD_TCP $CONFIG_NFSD $CONFIG_EXPERIMENTAL
+   dep_mbool '  Provide NFS server over TCP support' CONFIG_NFSD_TCP $CONFIG_NFSD
 
    if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" ]; then
       define_tristate CONFIG_SUNRPC y


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking.
  2004-08-16  3:58 [PATCH kNFSd 0 of 4] Introduction NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 2 of 4] mark NFS/TCP not EXPERIMENTAL NeilBrown
@ 2004-08-16  3:58 ` NeilBrown
  2004-08-16  9:21   ` Christoph Hellwig
  2004-08-16  3:58 ` [PATCH kNFSd 3 of 4] Allow larger NFSd MAXBLKSIZE on architectures with larger PAGE_SIZE NeilBrown
  2004-08-16  3:58 ` [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31 NeilBrown
  3 siblings, 1 reply; 9+ messages in thread
From: NeilBrown @ 2004-08-16  3:58 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs


nfsd currently just sets f_pos when seeking in a directory.
This bypasses any checking and other handling that a filesystem
might want to do.

So instead, we use 'llseek' copied out of fs/read_write.c
use that, both to seek at the start, and the find the new position at
the end.

If it were not  too intrusive, would could export llseek as vfs_llseek as was
done in 2.6....

Thanks to
    "Derrick Schommer" <dschommer@acopia.com>
    "Trond Myklebust" <trond.myklebust@fys.uio.no>


Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./fs/nfsd/vfs.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff ./fs/nfsd/vfs.c~current~ ./fs/nfsd/vfs.c
--- ./fs/nfsd/vfs.c~current~	2004-08-16 09:54:04.000000000 +1000
+++ ./fs/nfsd/vfs.c	2004-08-16 09:54:28.000000000 +1000
@@ -586,6 +586,22 @@ found:
 	return ra;
 }
 
+/* copied from fs/read_write.c */
+static inline loff_t llseek(struct file *file, loff_t offset, int origin)
+{
+	loff_t (*fn)(struct file *, loff_t, int);
+	loff_t retval;
+
+	fn = default_llseek;
+	if (file->f_op && file->f_op->llseek)
+		fn = file->f_op->llseek;
+	lock_kernel();
+	retval = fn(file, offset, origin);
+	unlock_kernel();
+	return retval;
+}
+
+
 /*
  * Read data from a file. count must contain the requested read count
  * on entry. On return, *count contains the number of bytes actually read.
@@ -621,7 +637,7 @@ nfsd_read(struct svc_rqst *rqstp, struct
 		file.f_ralen = ra->p_ralen;
 		file.f_rawin = ra->p_rawin;
 	}
-	file.f_pos = offset;
+	llseek(&file, offset, 0);
 
 	oldfs = get_fs(); set_fs(KERNEL_DS);
 	err = file.f_op->read(&file, buf, *count, &file.f_pos);
@@ -706,7 +722,8 @@ nfsd_write(struct svc_rqst *rqstp, struc
 	if (stable && !EX_WGATHER(exp))
 		file.f_flags |= O_SYNC;
 
-	file.f_pos = offset;		/* set write offset */
+
+	llseek(&file, offset, 0);
 
 	/* Write the data. */
 	oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -1398,10 +1415,12 @@ nfsd_readdir(struct svc_rqst *rqstp, str
 	err = nfsd_open(rqstp, fhp, S_IFDIR, MAY_READ, &file);
 	if (err)
 		goto out;
-	if (offset > ~(u32) 0)
-		goto out_close;
 
-	file.f_pos = offset;
+	offset = llseek(&file, offset, 0);
+	if (offset < 0) {
+		err = nfserrno((int)offset);
+		goto out_close;
+	}
 
 	/* Set up the readdir context */
 	memset(&cd, 0, sizeof(cd));
@@ -1429,11 +1448,13 @@ nfsd_readdir(struct svc_rqst *rqstp, str
 	/* If we didn't fill the buffer completely, we're at EOF */
 	eof = !cd.eob;
 
+
+	offset = llseek(&file, 0LL, 1);
 	if (cd.offset) {
 		if (rqstp->rq_vers == 3)
-			(void)xdr_encode_hyper(cd.offset, file.f_pos);
+			(void)xdr_encode_hyper(cd.offset, offset);
 		else
-			*cd.offset = htonl(file.f_pos);
+			*cd.offset = htonl(offset);
 	}
 
 	p = cd.buffer;


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31
  2004-08-16  3:58 [PATCH kNFSd 0 of 4] Introduction NeilBrown
                   ` (2 preceding siblings ...)
  2004-08-16  3:58 ` [PATCH kNFSd 3 of 4] Allow larger NFSd MAXBLKSIZE on architectures with larger PAGE_SIZE NeilBrown
@ 2004-08-16  3:58 ` NeilBrown
  2005-07-11  9:50   ` Olaf Kirch
  3 siblings, 1 reply; 9+ messages in thread
From: NeilBrown @ 2004-08-16  3:58 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs


xdr_argsize_check needs to cope with the possibility that the
pointer has wrapped and could be below buf->base.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./fs/nfsd/nfs3xdr.c         |    2 +-
 ./include/linux/nfsd/xdr3.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff ./fs/nfsd/nfs3xdr.c~current~ ./fs/nfsd/nfs3xdr.c
--- ./fs/nfsd/nfs3xdr.c~current~	2004-08-14 13:21:52.000000000 +1000
+++ ./fs/nfsd/nfs3xdr.c	2004-08-14 13:23:06.000000000 +1000
@@ -273,7 +273,7 @@ xdr_argsize_check(struct svc_rqst *rqstp
 {
 	struct svc_buf	*buf = &rqstp->rq_argbuf;
 
-	return p - buf->base <= buf->buflen;
+	return p >= buf->base && p <= buf->base + buf->buflen ;
 }
 
 static inline int

diff ./include/linux/nfsd/xdr3.h~current~ ./include/linux/nfsd/xdr3.h
--- ./include/linux/nfsd/xdr3.h~current~	2004-08-14 13:17:07.000000000 +1000
+++ ./include/linux/nfsd/xdr3.h	2004-08-16 09:48:43.000000000 +1000
@@ -41,7 +41,7 @@ struct nfsd3_writeargs {
 	__u32			count;
 	int			stable;
 	__u8 *			data;
-	int			len;
+	__u32			len;
 };
 
 struct nfsd3_createargs {


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking.
  2004-08-16  3:58 ` [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking NeilBrown
@ 2004-08-16  9:21   ` Christoph Hellwig
  2004-08-16  9:23     ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2004-08-16  9:21 UTC (permalink / raw)
  To: NeilBrown; +Cc: Marcelo Tosatti, nfs

On Mon, Aug 16, 2004 at 01:58:43PM +1000, NeilBrown wrote:
> 
> nfsd currently just sets f_pos when seeking in a directory.
> This bypasses any checking and other handling that a filesystem
> might want to do.
> 
> So instead, we use 'llseek' copied out of fs/read_write.c
> use that, both to seek at the start, and the find the new position at
> the end.

llseek from fs/read_write.c has been renamed to vfs_llseek and you can
just use it now.



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking.
  2004-08-16  9:21   ` Christoph Hellwig
@ 2004-08-16  9:23     ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2004-08-16  9:23 UTC (permalink / raw)
  To: NeilBrown; +Cc: Marcelo Tosatti, nfs

On Mon, Aug 16, 2004 at 10:21:02AM +0100, Christoph Hellwig wrote:
> > So instead, we use 'llseek' copied out of fs/read_write.c
> > use that, both to seek at the start, and the find the new position at
> > the end.
> 
> llseek from fs/read_write.c has been renamed to vfs_llseek and you can
> just use it now.

Sorry for the noise, I see this is 2.4.  But I think the 2.6 variant would be
preferable for 2.4 aswell.



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31
  2004-08-16  3:58 ` [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31 NeilBrown
@ 2005-07-11  9:50   ` Olaf Kirch
  2005-07-12  6:42     ` Marcelo Tosatti
  0 siblings, 1 reply; 9+ messages in thread
From: Olaf Kirch @ 2005-07-11  9:50 UTC (permalink / raw)
  To: NeilBrown; +Cc: Marcelo Tosatti, nfs

Hi all,

what happened to this patch? It never seems to have made it
upstream.

Olaf

On Mon, Aug 16, 2004 at 01:58:43PM +1000, NeilBrown wrote:
> 
> xdr_argsize_check needs to cope with the possibility that the
> pointer has wrapped and could be below buf->base.
> 
> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
> 
> ### Diffstat output
>  ./fs/nfsd/nfs3xdr.c         |    2 +-
>  ./include/linux/nfsd/xdr3.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff ./fs/nfsd/nfs3xdr.c~current~ ./fs/nfsd/nfs3xdr.c
> --- ./fs/nfsd/nfs3xdr.c~current~	2004-08-14 13:21:52.000000000 +1000
> +++ ./fs/nfsd/nfs3xdr.c	2004-08-14 13:23:06.000000000 +1000
> @@ -273,7 +273,7 @@ xdr_argsize_check(struct svc_rqst *rqstp
>  {
>  	struct svc_buf	*buf = &rqstp->rq_argbuf;
>  
> -	return p - buf->base <= buf->buflen;
> +	return p >= buf->base && p <= buf->base + buf->buflen ;
>  }
>  
>  static inline int
> 
> diff ./include/linux/nfsd/xdr3.h~current~ ./include/linux/nfsd/xdr3.h
> --- ./include/linux/nfsd/xdr3.h~current~	2004-08-14 13:17:07.000000000 +1000
> +++ ./include/linux/nfsd/xdr3.h	2004-08-16 09:48:43.000000000 +1000
> @@ -41,7 +41,7 @@ struct nfsd3_writeargs {
>  	__u32			count;
>  	int			stable;
>  	__u8 *			data;
> -	int			len;
> +	__u32			len;
>  };
>  
>  struct nfsd3_createargs {
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> NFS maillist  -  NFS@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs

-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
okir@suse.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31
  2005-07-11  9:50   ` Olaf Kirch
@ 2005-07-12  6:42     ` Marcelo Tosatti
  0 siblings, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2005-07-12  6:42 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: NeilBrown, nfs

Hi Olaf,

On Mon, Jul 11, 2005 at 11:50:16AM +0200, Olaf Kirch wrote:
> Hi all,
> 
> what happened to this patch? It never seems to have made it
> upstream.

I think it did, long ago:

nfs3xdr.c  	1.10  	CSets  	11 months 	neilb 	Fixed possibly xdr parsing error if write size exceed 2^31

> 
> Olaf
> 
> On Mon, Aug 16, 2004 at 01:58:43PM +1000, NeilBrown wrote:
> > 
> > xdr_argsize_check needs to cope with the possibility that the
> > pointer has wrapped and could be below buf->base.
> > 
> > Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
> > 
> > ### Diffstat output
> >  ./fs/nfsd/nfs3xdr.c         |    2 +-
> >  ./include/linux/nfsd/xdr3.h |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff ./fs/nfsd/nfs3xdr.c~current~ ./fs/nfsd/nfs3xdr.c
> > --- ./fs/nfsd/nfs3xdr.c~current~	2004-08-14 13:21:52.000000000 +1000
> > +++ ./fs/nfsd/nfs3xdr.c	2004-08-14 13:23:06.000000000 +1000
> > @@ -273,7 +273,7 @@ xdr_argsize_check(struct svc_rqst *rqstp
> >  {
> >  	struct svc_buf	*buf = &rqstp->rq_argbuf;
> >  
> > -	return p - buf->base <= buf->buflen;
> > +	return p >= buf->base && p <= buf->base + buf->buflen ;
> >  }
> >  
> >  static inline int
> > 
> > diff ./include/linux/nfsd/xdr3.h~current~ ./include/linux/nfsd/xdr3.h
> > --- ./include/linux/nfsd/xdr3.h~current~	2004-08-14 13:17:07.000000000 +1000
> > +++ ./include/linux/nfsd/xdr3.h	2004-08-16 09:48:43.000000000 +1000
> > @@ -41,7 +41,7 @@ struct nfsd3_writeargs {
> >  	__u32			count;
> >  	int			stable;
> >  	__u8 *			data;
> > -	int			len;
> > +	__u32			len;
> >  };
> >  
> >  struct nfsd3_createargs {


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-07-12 16:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-16  3:58 [PATCH kNFSd 0 of 4] Introduction NeilBrown
2004-08-16  3:58 ` [PATCH kNFSd 2 of 4] mark NFS/TCP not EXPERIMENTAL NeilBrown
2004-08-16  3:58 ` [PATCH kNFSd 4 of 4] Use llseek instead of f_pos= for directory seeking NeilBrown
2004-08-16  9:21   ` Christoph Hellwig
2004-08-16  9:23     ` Christoph Hellwig
2004-08-16  3:58 ` [PATCH kNFSd 3 of 4] Allow larger NFSd MAXBLKSIZE on architectures with larger PAGE_SIZE NeilBrown
2004-08-16  3:58 ` [PATCH kNFSd 1 of 4] Fixed possibly xdr parsing error if write size exceed 2^31 NeilBrown
2005-07-11  9:50   ` Olaf Kirch
2005-07-12  6:42     ` Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.