Skip to contentSkip to conversation

f2fs: zoned device does not support ATGC

PATCH In review Jaegeuk Kim 2 participants 4 messages Aug 11, 2022 – Aug 20, 2022 F2FS file system

lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: zoned device does not support ATGC

ATGC is using SSR which violates zoned device.

---
 fs/f2fs/super.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/f2fs/super.c +4 -0
index 2451623c05a7..212ec2b4926b 100644
@@ -1298,6 +1298,10 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 			F2FS_OPTION(sbi).discard_unit =
 					DISCARD_UNIT_SECTION;
 		}
+		if (test_opt(sbi, ATGC)) {
+			f2fs_err(sbi, "Zoned block device doesn't support ATGC.");
+			return -EINVAL;
+		}
 	}
 
 #ifdef CONFIG_F2FS_FS_COMPRESSION
Signature · 1 line
2.37.1.559.g78731f0fdb-goog
maintainer
#1 lore raw
Quoted 11 lines · Jaegeuk Kim

ATGC is using SSR which violates zoned device. >

---
  fs/f2fs/super.c | 4 ++++
  1 file changed, 4 insertions(+)
fs/f2fs/super.c +0 -0
index 2451623c05a7..212ec2b4926b 100644

fs/f2fs/super.c static int parse_options(struct super_block *sb, char *options, bool is_remount) · line 1304

Quoted 7 lines
fs/f2fs/super.c +4 -0
@@ -1298,6 +1298,10 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
  			F2FS_OPTION(sbi).discard_unit =
  					DISCARD_UNIT_SECTION;
  		}
+		if (test_opt(sbi, ATGC)) {
+			f2fs_err(sbi, "Zoned block device doesn't support ATGC.");
+			return -EINVAL;
+		}

ATGC is incompatible with LFS mode, we can check f2fs_lfs_mode() and ATGC mountoption instead, as zoned device depends on LFS mode.

Thanks,

Quoted 3 lines
fs/f2fs/super.c +0 -0
  	}
 
  #ifdef CONFIG_F2FS_FS_COMPRESSION
author maintainer
#2 lore raw

Re: [PATCH v2] f2fs: LFS mode does not support ATGC

In reply to Jaegeuk Kim

ATGC is using SSR which violates LFS mode used by zoned device.

---

Change log from v1:
- check LFS mode

 fs/f2fs/super.c | 5 +++++
 1 file changed, 5 insertions(+)
fs/f2fs/super.c +5 -0
index 2451623c05a7..fe462484f5fa 100644
@@ -1342,6 +1342,11 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 		return -EINVAL;
 	}
 
+	if (test_opt(sbi, ATGC) && f2fs_lfs_mode(sbi)) {
+		f2fs_err(sbi, "LFS not compatible with ATGC");
+		return -EINVAL;
+	}
+
 	if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) {
 		f2fs_err(sbi, "Allow to mount readonly mode only");
 		return -EROFS;
Signature · 8 lines
2.37.1.595.g718a3a8f04-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel