fsck.f2fs: fix missing to assign c.zoned_model

We need to set the c.zoned_model appropriately for further usages.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2022-10-03 13:55:07 -07:00 committed by sunshenshen
parent b98aab471a
commit 9d92496013

View File

@ -1135,6 +1135,14 @@ int init_sb_info(struct f2fs_sb_info *sbi)
if (i == 0) if (i == 0)
c.devices[i].end_blkaddr += get_sb(segment0_blkaddr); c.devices[i].end_blkaddr += get_sb(segment0_blkaddr);
if (c.zoned_model == F2FS_ZONED_NONE) {
if (c.devices[i].zoned_model == F2FS_ZONED_HM)
c.zoned_model = F2FS_ZONED_HM;
else if (c.devices[i].zoned_model == F2FS_ZONED_HA &&
c.zoned_model != F2FS_ZONED_HM)
c.zoned_model = F2FS_ZONED_HA;
}
c.ndevs = i + 1; c.ndevs = i + 1;
MSG(0, "Info: Device[%d] : %s blkaddr = %"PRIx64"--%"PRIx64"\n", MSG(0, "Info: Device[%d] : %s blkaddr = %"PRIx64"--%"PRIx64"\n",
i, c.devices[i].path, i, c.devices[i].path,