aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2013-05-01 08:37:21 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2013-05-01 08:37:21 -0400
commit60b9df7a54804a965850db00beec4d3a2c002536 (patch)
treece3519c0708d6dd4113707c36a4ebdc6501542ef /fs/fuse/file.c
parentefb9fa9e911b23c7ea5330215bda778a7c69dba8 (diff)
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.c8
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,
2371 loff_t offset, unsigned long nr_segs) 2371 loff_t offset, unsigned long nr_segs)
2372{ 2372{
2373 ssize_t ret = 0; 2373 ssize_t ret = 0;
2374 struct file *file = NULL; 2374 struct file *file = iocb->ki_filp;
2375 struct fuse_file *ff = file->private_data;
2375 loff_t pos = 0; 2376 loff_t pos = 0;
2376 struct inode *inode; 2377 struct inode *inode;
2377 loff_t i_size; 2378 loff_t i_size;
2378 size_t count = iov_length(iov, nr_segs); 2379 size_t count = iov_length(iov, nr_segs);
2379 struct fuse_io_priv *io; 2380 struct fuse_io_priv *io;
2380 2381
2381 file = iocb->ki_filp;
2382 pos = offset; 2382 pos = offset;
2383 inode = file->f_mapping->host; 2383 inode = file->f_mapping->host;
2384 i_size = i_size_read(inode); 2384 i_size = i_size_read(inode);
@@ -2403,9 +2403,9 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
2403 io->file = file; 2403 io->file = file;
2404 /* 2404 /*
2405 * By default, we want to optimize all I/Os with async request 2405 * By default, we want to optimize all I/Os with async request
2406 * submission to the client filesystem. 2406 * submission to the client filesystem if supported.
2407 */ 2407 */
2408 io->async = 1; 2408 io->async = ff->fc->async_dio;
2409 io->iocb = iocb; 2409 io->iocb = iocb;
2410 2410
2411 /* 2411 /*