Skip to content

Commit

Permalink
ceph: improving efficiency of syncfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chengguang Xu authored and Ilya Dryomov committed Jan 30, 2018
1 parent affff07 commit 16515a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 16515a6

Please sign in to comment.