]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix to allow migrating fully valid segment
authorChao Yu <yuchao0@huawei.com>
Sat, 20 Feb 2021 09:35:40 +0000 (17:35 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 12 Mar 2021 21:16:41 +0000 (13:16 -0800)
commit5bd4bc0aa65e9c4838109852badeca7901ec3067
tree6f1b51ca470ec210cc799f14ff31681fdd202cf1
parent59106dcce90a5020b2e82384ac081c021e1268bf
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 ccfd683d865c ("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: ccfd683d865c ("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>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/super.c