diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2013-05-01 14:37:21 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-05-01 14:37:21 +0200 |
commit | 60b9df7a54804a965850db00beec4d3a2c002536 (patch) | |
tree | ce3519c0708d6dd4113707c36a4ebdc6501542ef /fs/fuse/file.c | |
parent | efb9fa9e911b23c7ea5330215bda778a7c69dba8 (diff) | |
download | linux-60b9df7a54804a965850db00beec4d3a2c002536.tar.bz2 |
fuse: add flag to turn on async direct IO
Without async DIO write requests to a single file were always serialized.
With async DIO that's no longer the case.
So don't turn on async DIO by default for fear of breaking backward
compatibility.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 1f8e3d60dc07..6ab7ca43f9e0 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2371,14 +2371,14 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) { ssize_t ret = 0; - struct file *file = NULL; + struct file *file = iocb->ki_filp; + struct fuse_file *ff = file->private_data; loff_t pos = 0; struct inode *inode; loff_t i_size; size_t count = iov_length(iov, nr_segs); struct fuse_io_priv *io; - file = iocb->ki_filp; pos = offset; inode = file->f_mapping->host; i_size = i_size_read(inode); @@ -2403,9 +2403,9 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, io->file = file; /* * By default, we want to optimize all I/Os with async request - * submission to the client filesystem. + * submission to the client filesystem if supported. */ - io->async = 1; + io->async = ff->fc->async_dio; io->iocb = iocb; /* |