summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2021-02-20 17:35:40 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-03-12 13:16:41 -0800
commit7dede88659df38f96128ab3922c50dde2d29c574 (patch)
tree6f1b51ca470ec210cc799f14ff31681fdd202cf1 /fs/f2fs/super.c
parentc67c8c0f47eb0bf49d6cf165389554e379443968 (diff)
downloadlinux-stable-7dede88659df38f96128ab3922c50dde2d29c574.tar.gz
linux-stable-7dede88659df38f96128ab3922c50dde2d29c574.tar.bz2
linux-stable-7dede88659df38f96128ab3922c50dde2d29c574.zip
f2fs: fix to allow migrating fully valid segment
F2FS_IOC_FLUSH_DEVICE/F2FS_IOC_RESIZE_FS needs to migrate all blocks of target segment to other place, no matter the segment has partially or fully valid blocks. However, after commit 803e74be04b3 ("f2fs: stop GC when the victim becomes fully valid"), we may skip migration due to target segment is fully valid, result in failing the ioctl interface, fix this. Fixes: 803e74be04b3 ("f2fs: stop GC when the victim becomes fully valid") Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 7069793752f1..a17a4dd8d449 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1865,7 +1865,7 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
while (!f2fs_time_over(sbi, DISABLE_TIME)) {
down_write(&sbi->gc_lock);
- err = f2fs_gc(sbi, true, false, NULL_SEGNO);
+ err = f2fs_gc(sbi, true, false, false, NULL_SEGNO);
if (err == -ENODATA) {
err = 0;
break;