f2fs-tools: fix wrong write pointer check for non-zoned areas
PATCH 1/1 f2fs-tools: fix wrong write pointer check for non-zoned areas
From: Daeho Jeong <[email protected]>
Do not check F2FS_ZONED_HM for the whole device. We need to do this for each area of devices.
Signed-off-by Daeho Jeong <[email protected]>
--- fsck/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fsck/mount.c +3 -3
@@ -2868,9 +2868,6 @@ static bool write_pointer_at_zone_start(struct f2fs_sb_info *sbi,int log_sectors_per_block = sbi->log_blocksize -SECTOR_SHIFT ;int ret, j; -if (c.zoned_model !=F2FS_ZONED_HM ) -return true; -for (j =0 ; j <MAX_DEVICES ; j++) {if (!c.devices[j].path)break ;
@@ -2882,6 +2879,9 @@ static bool write_pointer_at_zone_start(struct f2fs_sb_info *sbi,if (j >=MAX_DEVICES )return false; +if (c.devices[j].zoned_model !=F2FS_ZONED_HM ) +return true; + sector = (block - c.devices[j].start_blkaddr) << log_sectors_per_block; ret =f2fs_report_zone (j, sector, &blkz);if (ret)
Signature · 8 lines
2.41.0.rc0.172.g3f132b7071-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Quoted 6 lines · Daeho Jeong
From: Daeho Jeong <[email protected]>
Do not check
F2FS_ZONED_HMfor the whole device. We need to do this for each area of devices.Signed-off-by Daeho Jeong <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,