From 9d92496013df8ada3a6f3b0a0cdca6e02b7848c5 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 3 Oct 2022 13:55:07 -0700 Subject: [PATCH] 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 --- fsck/mount.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index c3b2806..4fe73b3 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1135,6 +1135,14 @@ int init_sb_info(struct f2fs_sb_info *sbi) if (i == 0) 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; MSG(0, "Info: Device[%d] : %s blkaddr = %"PRIx64"--%"PRIx64"\n", i, c.devices[i].path,