diff options
author | Chengguang Xu <cgxu519@icloud.com> | 2018-01-30 10:02:30 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-30 21:10:15 +0100 |
commit | 16515a6d54183349b858b9c05e483afc55fa7948 (patch) | |
tree | 97269e7e300a465eadae920907e5a8f5758315d8 /fs/ceph | |
parent | affff07739392920d3d2095212c72af220481b95 (diff) |
ceph: improving efficiency of syncfs
write_inode() could be called variety of reasons, in the case of syncfs(2)
there is no need to wait for flush getting completed in write_inode(),
->sync_fs is for guaranteeing flush completion for all inodes at that point.
Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 8e66fb0e743d..6582c4507e6c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2207,7 +2207,7 @@ int ceph_write_inode(struct inode *inode, struct writeback_control *wbc) u64 flush_tid; int err = 0; int dirty; - int wait = wbc->sync_mode == WB_SYNC_ALL; + int wait = (wbc->sync_mode == WB_SYNC_ALL && !wbc->for_sync); dout("write_inode %p wait=%d\n", inode, wait); if (wait) { |