diff options
author | Maxim Patlasov <mpatlasov@parallels.com> | 2012-12-14 10:20:51 -0500 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-04-17 15:50:59 -0400 |
commit | 36cf66ed9f871fc0d0911921fba5873df3ddb2dc (patch) | |
tree | 8a449efaf4eeb9f0044258d926711d5ebb03416f /fs/fuse/fuse_i.h | |
parent | 01e9d11a3e79035ca5cd89b035435acd4ba61ee1 (diff) |
fuse: make fuse_direct_io() aware about AIO
The patch implements passing "struct fuse_io_priv *io" down the stack up to
fuse_send_read/write where it is used to submit request asynchronously.
io->async==0 designates synchronous processing.
Non-trivial part of the patch is changes in fuse_direct_io(): resources
like fuse requests and user pages cannot be released immediately in async
case.
Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index aea072413c47..337169a406c9 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -732,6 +732,11 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc, unsigned npages); | |||
732 | struct fuse_req *fuse_get_req_for_background(struct fuse_conn *fc, | 732 | struct fuse_req *fuse_get_req_for_background(struct fuse_conn *fc, |
733 | unsigned npages); | 733 | unsigned npages); |
734 | 734 | ||
735 | /* | ||
736 | * Increment reference count on request | ||
737 | */ | ||
738 | void __fuse_get_request(struct fuse_req *req); | ||
739 | |||
735 | /** | 740 | /** |
736 | * Get a request, may fail with -ENOMEM, | 741 | * Get a request, may fail with -ENOMEM, |
737 | * useful for callers who doesn't use req->pages[] | 742 | * useful for callers who doesn't use req->pages[] |
@@ -846,7 +851,7 @@ int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid, | |||
846 | 851 | ||
847 | int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, | 852 | int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, |
848 | bool isdir); | 853 | bool isdir); |
849 | ssize_t fuse_direct_io(struct file *file, const struct iovec *iov, | 854 | ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov, |
850 | unsigned long nr_segs, size_t count, loff_t *ppos, | 855 | unsigned long nr_segs, size_t count, loff_t *ppos, |
851 | int write); | 856 | int write); |
852 | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, | 857 | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, |