diff mbox series

[f2fs-dev,2/9] f2fs: consolidate unsupported option handling errors

Message ID 20250303172127.298602-3-sandeen@redhat.com (mailing list archive)
State New
Headers show
Series f2fs: first steps towards mount API conversion | expand

Commit Message

Eric Sandeen March 3, 2025, 5:12 p.m. UTC
When certain build-time options are disabled, some mount options are not
accepted. For quota and compression, all related options are dismissed
with a single error message. For xattr, acl, and fault injection, each
option is handled individually. In addition, inline_xattr_size was missed
when CONFIG_F2FS_FS_XATTR was disabled.

Collapse xattr, acl, and fault injection errors into a single string, for
simplicity, and handle the missing inline_xattr_size case.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 fs/f2fs/super.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

Comments

Chao Yu March 12, 2025, 2:54 a.m. UTC | #1
On 3/4/25 01:12, Eric Sandeen wrote:
> When certain build-time options are disabled, some mount options are not
> accepted. For quota and compression, all related options are dismissed
> with a single error message. For xattr, acl, and fault injection, each
> option is handled individually. In addition, inline_xattr_size was missed
> when CONFIG_F2FS_FS_XATTR was disabled.
> 
> Collapse xattr, acl, and fault injection errors into a single string, for
> simplicity, and handle the missing inline_xattr_size case.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,
diff mbox series

Patch

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index dd35d199775a..29b3aa1ee99c 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -772,16 +772,11 @@  static int parse_options(struct super_block *sb, char *options, bool is_remount)
 			break;
 #else
 		case Opt_user_xattr:
-			f2fs_info(sbi, "user_xattr options not supported");
-			break;
 		case Opt_nouser_xattr:
-			f2fs_info(sbi, "nouser_xattr options not supported");
-			break;
 		case Opt_inline_xattr:
-			f2fs_info(sbi, "inline_xattr options not supported");
-			break;
 		case Opt_noinline_xattr:
-			f2fs_info(sbi, "noinline_xattr options not supported");
+		case Opt_inline_xattr_size:
+			f2fs_info(sbi, "xattr options not supported");
 			break;
 #endif
 #ifdef CONFIG_F2FS_FS_POSIX_ACL
@@ -793,10 +788,8 @@  static int parse_options(struct super_block *sb, char *options, bool is_remount)
 			break;
 #else
 		case Opt_acl:
-			f2fs_info(sbi, "acl options not supported");
-			break;
 		case Opt_noacl:
-			f2fs_info(sbi, "noacl options not supported");
+			f2fs_info(sbi, "acl options not supported");
 			break;
 #endif
 		case Opt_active_logs:
@@ -919,11 +912,8 @@  static int parse_options(struct super_block *sb, char *options, bool is_remount)
 			break;
 #else
 		case Opt_fault_injection:
-			f2fs_info(sbi, "fault_injection options not supported");
-			break;
-
 		case Opt_fault_type:
-			f2fs_info(sbi, "fault_type options not supported");
+			f2fs_info(sbi, "fault injection options not supported");
 			break;
 #endif
 		case Opt_lazytime: