diff mbox series

[f2fs-dev] fsck.f2fs: don't call report_zone on normal partition

Message ID 20230321000001.1793472-1-jaegeuk@kernel.org (mailing list archive)
State New
Headers show
Series [f2fs-dev] fsck.f2fs: don't call report_zone on normal partition | expand

Commit Message

Jaegeuk Kim March 21, 2023, midnight UTC
Report_zone is not supported on normal partition.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fsck/fsck.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fsck/fsck.c b/fsck/fsck.c
index 1b6f2c20b2b3..324c3d5d9304 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2462,6 +2462,9 @@  static int check_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
 	if (i >= MAX_DEVICES)
 		return -EINVAL;
 
+	if (c.devices[i].zoned_model != F2FS_ZONED_HM)
+		return 0;
+
 	/* get write pointer position of the zone the curseg points to */
 	cs_sector = (cs_block - c.devices[i].start_blkaddr)
 		<< log_sectors_per_block;