lkml.org 
[lkml]   [2016]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] fuse: relax inode_lock on fsync(2)
From
Date
Sometimes handling FUSE_FSYNC in userspace may take a while. No need
to block incoming writes while userspace processes FUSE_FSYNC.

Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
---
fs/fuse/file.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 2401c5d..9d52a8a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -483,6 +483,8 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
if ((!isdir && fc->no_fsync) || (isdir && fc->no_fsyncdir))
goto out;

+ inode_unlock(inode);
+
memset(&inarg, 0, sizeof(inarg));
inarg.fh = ff->fh;
inarg.fsync_flags = datasync ? 1 : 0;
@@ -499,6 +501,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
fc->no_fsync = 1;
err = 0;
}
+ return err;
out:
inode_unlock(inode);
return err;
\
 
 \ /
  Last update: 2016-12-14 01:44    [W:0.029 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site