Skip to contentSkip to conversation

f2fs: fix wrong option name printed by parse_options()

PATCH In review Chao Yu 2 participants 4 messages Aug 24, 2021 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix wrong option name printed by parse_options()

It prints below kernel message during mounting w/ checkpoint=disable option:

"F2FS-fs (pmem0): checkpoint=merge cannot be used with checkpoint=disable"

Fix typo "checkpoint=merge" w/ "checkpoint_merge"

---
 fs/f2fs/super.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/f2fs/super.c +6 -0
index 49e153fd8183..88c66e46bd5c 100644
@@ -1289,6 +1289,12 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 		return -EINVAL;
 	}
 
+	if (test_opt(sbi, DISABLE_CHECKPOINT) &&
+			test_opt(sbi, MERGE_CHECKPOINT)) {
+		f2fs_err(sbi, "checkpoint_merge cannot be used with checkpoint=disable\n");
+		return -EINVAL;
+	}
+
 	/* Not pass down write hints if the number of active logs is lesser
 	 * than NR_CURSEG_PERSIST_TYPE.
 	 */
Signature · 1 line
2.32.0
author maintainer
#1 lore raw
Quoted 4 lines · Chao Yu

It prints below kernel message during mounting w/ checkpoint=disable option:

"F2FS-fs (pmem0): checkpoint=merge cannot be used with checkpoint=disable"

Oops, this message should have been removed by

"f2fs: rename checkpoint=merge mount option to checkpoint_merge"

I may used old f2fs module, please ignore this...

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

maintainer
#2 lore raw
In reply to Chao Yu
Quoted 17 lines · Chao Yu

It prints below kernel message during mounting w/ checkpoint=disable option:

"F2FS-fs (pmem0): checkpoint=merge cannot be used with checkpoint=disable"

Fix typo "checkpoint=merge" w/ "checkpoint_merge"

---
 fs/f2fs/super.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/f2fs/super.c +0 -0
index 49e153fd8183..88c66e46bd5c 100644

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

Quoted 7 lines
fs/f2fs/super.c +4 -0
@@ -1289,6 +1289,12 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 		return -EINVAL;
 	}
 
+	if (test_opt(sbi, DISABLE_CHECKPOINT) &&
+			test_opt(sbi, MERGE_CHECKPOINT)) {
+		f2fs_err(sbi, "checkpoint_merge cannot be used with checkpoint=disable\n");
+		return -EINVAL;

What about disabling MERGE_CHECKPOINT autmatically?

Quoted 7 lines
fs/f2fs/super.c +2 -0
+	}
+
 	/* Not pass down write hints if the number of active logs is lesser
 	 * than NR_CURSEG_PERSIST_TYPE.
 	 */
Signature · 1 line
2.32.0

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

author maintainer
#3 lore raw
Quoted 21 lines · Jaegeuk Kim
Quoted 20 lines · Chao Yu

It prints below kernel message during mounting w/ checkpoint=disable option:

"F2FS-fs (pmem0): checkpoint=merge cannot be used with checkpoint=disable"

Fix typo "checkpoint=merge" w/ "checkpoint_merge"

---
  fs/f2fs/super.c | 6 ++++++
  1 file changed, 6 insertions(+)
fs/f2fs/super.c +0 -0
index 49e153fd8183..88c66e46bd5c 100644
@@ -1289,6 +1289,12 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
  		return -EINVAL;
  	}
 
Quoted 6 lines

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

Quoted 4 lines
fs/f2fs/super.c +4 -0
+	if (test_opt(sbi, DISABLE_CHECKPOINT) &&
+			test_opt(sbi, MERGE_CHECKPOINT)) {
+		f2fs_err(sbi, "checkpoint_merge cannot be used with checkpoint=disable\n");
+		return -EINVAL;

What about disabling MERGE_CHECKPOINT autmatically?

checkpoint_merge was introduced separately rather than adding a new "merge" parameter in mount option "checkpoint=%s", so they are compatible.

Please ignore this patch...

Thanks,

Quoted 8 lines
Quoted 8 lines
fs/f2fs/super.c +2 -0
+	}
+
  	/* Not pass down write hints if the number of active logs is lesser
  	 * than NR_CURSEG_PERSIST_TYPE.
  	 */
Signature · 1 line
2.32.0