From 3d894362ae0b8d346f29e9c3ea98e325d83a083a Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 14 Aug 2009 15:51:37 -0700 Subject: fuse: switch off direct I/O mode if big writes are supported --- xlators/mount/fuse/src/fuse-bridge.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index d2c08b57eb9..d78de0dd29f 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -2635,7 +2635,13 @@ fuse_init (xlator_t *this, fuse_in_header_t *finh, void *msg) fino.minor = FUSE_KERNEL_MINOR_VERSION; fino.max_readahead = 1 << 17; fino.max_write = 1 << 17; - fino.flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_BIG_WRITES; + fino.flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS; + if (fini->minor >= 6 /* fuse_init_in has flags */ && + fini->flags & FUSE_BIG_WRITES) { + /* no need for direct I/O mode if big writes are supported */ + priv->direct_io_mode = 0; + fino.flags |= FUSE_BIG_WRITES; + } ret = send_fuse_obj (this, finh, &fino); if (ret == 0) -- cgit