Skip to content

Commit a8075dc

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: fix to account preflush command for noflush_merge mode
Previously, we only account preflush command for flush_merge mode, so for noflush_merge mode, we can not know in-flight preflush command count, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 9bf1a3f commit a8075dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/f2fs/segment.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
620620
return 0;
621621

622622
if (!test_opt(sbi, FLUSH_MERGE)) {
623+
atomic_inc(&fcc->issing_flush);
623624
ret = submit_flush_wait(sbi, ino);
625+
atomic_dec(&fcc->issing_flush);
624626
atomic_inc(&fcc->issued_flush);
625627
return ret;
626628
}

0 commit comments

Comments
 (0)