]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
f2fs: change segment to section in f2fs_ioc_gc_range
authorYunlong Song <yunlong.song@huawei.com>
Tue, 30 Oct 2018 12:37:55 +0000 (20:37 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 26 Nov 2018 23:53:56 +0000 (15:53 -0800)
f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves
blocks of section each time, so fix it from segment to section.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c

index a114eacc0d7e816d99d48f4cf1a3b8c0196cf9aa..c25228a1593c159c240b056b3731fe596ae6194f 100644 (file)
@@ -2155,7 +2155,7 @@ do_more:
        }
 
        ret = f2fs_gc(sbi, range.sync, true, GET_SEGNO(sbi, range.start));
-       range.start += sbi->blocks_per_seg;
+       range.start += BLKS_PER_SEC(sbi);
        if (range.start <= end)
                goto do_more;
 out: