Re: [PATCH] ceph: improving efficiency of syncfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 30 Jan 2018, at 10:02, Chengguang Xu <cgxu519@xxxxxxxxxx> wrote:
> 
> 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@xxxxxxxxxx>
> ---
> fs/ceph/caps.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
> index a14b2c9..fd6ce29 100644
> --- a/fs/ceph/caps.c
> +++ b/fs/ceph/caps.c
> @@ -2160,7 +2160,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) {
> -- 
> 1.8.3.1
> 

Applied, thanks

Yan, Zheng

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux