mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-27 12:10:26 +00:00
c0ce8e646c
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> |
||
---|---|---|
.. | ||
common.h | ||
defrag.c | ||
dict.c | ||
dict.h | ||
dir.c | ||
dqblk_v2.h | ||
dump.c | ||
f2fs.h | ||
fsck.c | ||
fsck.h | ||
main.c | ||
Makefile.am | ||
mkquota.c | ||
mount.c | ||
node.c | ||
node.h | ||
quotaio_tree.c | ||
quotaio_tree.h | ||
quotaio_v2.c | ||
quotaio_v2.h | ||
quotaio.c | ||
quotaio.h | ||
resize.c | ||
segment.c | ||
sload.c | ||
xattr.c | ||
xattr.h |