On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote:
> 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

I think this is correct, but just to declear, SSR allocator on a freed section
will also allocate data block sequentially.

> 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.kawas...@wdc.com>

Reviewed-by: Chao Yu <yuch...@huawei.com>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to