diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-09 16:10:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:45 -0400 |
commit | e5e5558e923f35839108a12718494ecb73fb782f (patch) | |
tree | c410d6826e9df13f7ea9e382a26589b66ec0989c /fs/fuse/dev.c | |
parent | 334f485df85ac7736ebe14940bf0a059c5f26d7d (diff) |
[PATCH] FUSE - read-only operations
This patch adds the read-only filesystem operations of FUSE.
This contains the following files:
o dir.c
- directory, symlink and file-inode operations
The following operations are added:
o lookup
o getattr
o readlink
o follow_link
o directory open
o readdir
o directory release
o permission
o dentry revalidate
o statfs
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/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 9aaf10a6588f..e8f3170946f1 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -691,6 +691,13 @@ static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique) | |||
691 | return NULL; | 691 | return NULL; |
692 | } | 692 | } |
693 | 693 | ||
694 | /* fget() needs to be done in this context */ | ||
695 | static void process_getdir(struct fuse_req *req) | ||
696 | { | ||
697 | struct fuse_getdir_out_i *arg = req->out.args[0].value; | ||
698 | arg->file = fget(arg->fd); | ||
699 | } | ||
700 | |||
694 | static int copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, | 701 | static int copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, |
695 | unsigned nbytes) | 702 | unsigned nbytes) |
696 | { | 703 | { |
@@ -770,6 +777,8 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov, | |||
770 | if (!err) { | 777 | if (!err) { |
771 | if (req->interrupted) | 778 | if (req->interrupted) |
772 | err = -ENOENT; | 779 | err = -ENOENT; |
780 | else if (req->in.h.opcode == FUSE_GETDIR && !oh.error) | ||
781 | process_getdir(req); | ||
773 | } else if (!req->interrupted) | 782 | } else if (!req->interrupted) |
774 | req->out.h.error = -EIO; | 783 | req->out.h.error = -EIO; |
775 | request_end(fc, req); | 784 | request_end(fc, req); |