diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-06 03:19:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:56 -0500 |
commit | 1d3d752b471d2a3a1d5e4fe177e5e7d52abb4e4c (patch) | |
tree | 05c6c99ca02118e2c80199c36f4f6263cdf7986b /fs/fuse/fuse_i.h | |
parent | 248d86e87d12da19eee602075f05a49a5215288b (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 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 2d4835e54c90..17fd368559cd 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -21,6 +21,12 @@ | |||
21 | /** If more requests are outstanding, then the operation will block */ | 21 | /** If more requests are outstanding, then the operation will block */ |
22 | #define FUSE_MAX_OUTSTANDING 10 | 22 | #define FUSE_MAX_OUTSTANDING 10 |
23 | 23 | ||
24 | /** Maximum size of data in a write request */ | ||
25 | #define FUSE_MAX_WRITE 4096 | ||
26 | |||
27 | /** It could be as large as PATH_MAX, but would that have any uses? */ | ||
28 | #define FUSE_NAME_MAX 1024 | ||
29 | |||
24 | /** If the FUSE_DEFAULT_PERMISSIONS flag is given, the filesystem | 30 | /** If the FUSE_DEFAULT_PERMISSIONS flag is given, the filesystem |
25 | module will check permissions based on the file mode. Otherwise no | 31 | module will check permissions based on the file mode. Otherwise no |
26 | permission checking is done in the kernel */ | 32 | permission checking is done in the kernel */ |
@@ -108,9 +114,6 @@ struct fuse_out { | |||
108 | struct fuse_arg args[3]; | 114 | struct fuse_arg args[3]; |
109 | }; | 115 | }; |
110 | 116 | ||
111 | struct fuse_req; | ||
112 | struct fuse_conn; | ||
113 | |||
114 | /** | 117 | /** |
115 | * A request to the client | 118 | * A request to the client |
116 | */ | 119 | */ |