aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-06 03:19:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:56 -0500
commit1d3d752b471d2a3a1d5e4fe177e5e7d52abb4e4c (patch)
tree05c6c99ca02118e2c80199c36f4f6263cdf7986b /include
parent248d86e87d12da19eee602075f05a49a5215288b (diff)
[PATCH] fuse: clean up request size limit checking
Change the way a too large request is handled. Until now in this case the device read returned -EINVAL and the operation returned -EIO. Make it more flexibible by not returning -EINVAL from the read, but restarting it instead. Also remove the fixed limit on setxattr data and let the filesystem provide as large a read buffer as it needs to handle the extended attribute data. The symbolic link length is already checked by VFS to be less than PATH_MAX, so the extra check against FUSE_SYMLINK_MAX is not needed. The check in fuse_create_open() against FUSE_NAME_MAX is not needed, since the dentry has already been looked up, and hence the name already checked. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fuse.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 9d5177c356cc..8f64cc2205b0 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -108,12 +108,8 @@ enum fuse_opcode {
108 FUSE_CREATE = 35 108 FUSE_CREATE = 35
109}; 109};
110 110
111/* Conservative buffer size for the client */ 111/* The read buffer is required to be at least 8k, but may be much larger */
112#define FUSE_MAX_IN 8192 112#define FUSE_MIN_READ_BUFFER 8192
113
114#define FUSE_NAME_MAX 1024
115#define FUSE_SYMLINK_MAX 4096
116#define FUSE_XATTR_SIZE_MAX 4096
117 113
118struct fuse_entry_out { 114struct fuse_entry_out {
119 __u64 nodeid; /* Inode ID */ 115 __u64 nodeid; /* Inode ID */