third_party_f2fs-tools/fsck
Shin'ichiro Kawasaki c0ce8e646c fsck: Find free zones instead of blocks to assign to current segments
When fsck needs to assign a new area to a curreng segment, it calls
find_next_free_block() function to find a new block to assign. For zoned
block devices, fsck checks write pointer consistency with current
segments' positions. In case a curseg is inconsistent with the
write pointer of the zone it points to, fsck should assign not a new free
block but a new free zone/section with write pointer at the zone start,
so that next write to the current segment succeeds without error.

To extend find_next_free_block() function's capability to find not only
a block but also a zone/section, add new_sec flag to
find_next_free_block() function. When new_sec flag is true, skip check
for each block's availability so that the check is done with unit of
section. Note that it is ensured that one zone has one section for f2fs
on zoned block devices. Then the logic to find a new free section is good
to find a new free zone.

When fsck target devices have ZONED_HM model, set new_sec flag true to
call find_next_free_block() from move_curseg_info(). Set curseg's
alloc_type not SSR but LFS for the devices with ZONED_HM model, because
SSR block allocation is not allowed for zoned block devices. Also skip
relocate_curseg_offset() for the devices with ZONED_HM model for the
same reason.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-12-09 17:23:19 -08:00
..
common.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
defrag.c fsck: Find free zones instead of blocks to assign to current segments 2019-12-09 17:23:19 -08:00
dict.c fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
dict.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
dir.c f2fs-tools: fix stat update in sload/fsck 2019-08-27 14:51:05 -07:00
dqblk_v2.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
dump.c dump.f2fs: introduce start_bidx_of_node() for cleanup 2019-08-27 14:51:05 -07:00
f2fs.h fsck: Find free zones instead of blocks to assign to current segments 2019-12-09 17:23:19 -08:00
fsck.c f2fs-tools: fix stat update in sload/fsck 2019-08-27 14:51:05 -07:00
fsck.h fsck: Find free zones instead of blocks to assign to current segments 2019-12-09 17:23:19 -08:00
main.c f2fs-tools: Add support for Casefolding 2019-08-27 14:51:05 -07:00
Makefile.am fsck/Makefile.am, mkfs/Makefile.am: fix to make distcheck correctly 2017-11-13 21:04:23 -08:00
mkquota.c fsck.f2fs: fix to propagate error of write_dquots() 2019-08-27 14:51:05 -07:00
mount.c fsck: Find free zones instead of blocks to assign to current segments 2019-12-09 17:23:19 -08:00
node.c f2fs-tools: fix to skip block allocation for fsynced data 2019-08-27 14:51:05 -07:00
node.h f2fs-tools: fix to skip block allocation for fsynced data 2019-08-27 14:51:05 -07:00
quotaio_tree.c f2fs-tools:fix memory leak in write dquot 2019-04-28 06:25:58 -07:00
quotaio_tree.h fsck.f2fs: don't allocate new blocks on unclean shutdown 2018-11-21 11:38:23 -08:00
quotaio_v2.c fsck.f2fs: don't allocate new blocks on unclean shutdown 2018-11-21 11:38:23 -08:00
quotaio_v2.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
quotaio.c fsck.f2fs: don't allocate new blocks on unclean shutdown 2018-11-21 11:38:23 -08:00
quotaio.h fsck.f2fs: add an option to preserve quota limits 2017-11-11 18:01:07 -08:00
resize.c f2fs-tools: relocate chksum_offset for large_nat_bitmap feature 2019-05-20 17:30:16 -07:00
segment.c fsck: Find free zones instead of blocks to assign to current segments 2019-12-09 17:23:19 -08:00
sload.c sload.f2fs: fix error path of build_directory 2019-08-20 11:23:58 -07:00
xattr.c f2fs-tools: fix stat update in sload/fsck 2019-08-27 14:51:05 -07:00
xattr.h f2fs-tools: improve xattr value printing 2019-05-20 17:29:50 -07:00