f2fs: avoid redundant f2fs_flush after remount
diff mbox

Message ID 1498291039-142563-1-git-send-email-yunlong.song@huawei.com
State New
Headers show

Commit Message

Yunlong Song June 24, 2017, 7:57 a.m. UTC
create_flush_cmd_control will create redundant issue_flush_thread after each
remount with flush_merge option.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chao Yu June 24, 2017, 2:59 p.m. UTC | #1
On 2017/6/24 15:57, Yunlong Song wrote:
> create_flush_cmd_control will create redundant issue_flush_thread after each
> remount with flush_merge option.
> 
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

> ---
>  fs/f2fs/segment.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index a6d7738..57f9edc 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -555,6 +555,8 @@ int create_flush_cmd_control(struct f2fs_sb_info *sbi)
>  
>  	if (SM_I(sbi)->fcc_info) {
>  		fcc = SM_I(sbi)->fcc_info;
> +		if (fcc->f2fs_issue_flush)
> +			return err;
>  		goto init_thread;
>  	}
>  
>

Patch
diff mbox

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a6d7738..57f9edc 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -555,6 +555,8 @@  int create_flush_cmd_control(struct f2fs_sb_info *sbi)
 
 	if (SM_I(sbi)->fcc_info) {
 		fcc = SM_I(sbi)->fcc_info;
+		if (fcc->f2fs_issue_flush)
+			return err;
 		goto init_thread;
 	}