Skip to content

Commit 907fa89

Browse files
namjaejeontorvalds
authored andcommitted
exfat: add the dummy mount options to be backward compatible with staging/exfat
As Ubuntu and Fedora release new version used kernel version equal to or higher than v5.4, They started to support kernel exfat filesystem. Linus reported a mount error with new version of exfat on Fedora: exfat: Unknown parameter 'namecase' This is because there is a difference in mount option between old staging/exfat and new exfat. And utf8, debug, and codepage options as well as namecase have been removed from new exfat. This patch add the dummy mount options as deprecated option to be backward compatible with old one. Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Al Viro <[email protected]> Cc: Eric Sandeen <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d2f8825 commit 907fa89

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

fs/exfat/super.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ enum {
203203
Opt_errors,
204204
Opt_discard,
205205
Opt_time_offset,
206+
207+
/* Deprecated options */
208+
Opt_utf8,
209+
Opt_debug,
210+
Opt_namecase,
211+
Opt_codepage,
206212
};
207213

208214
static const struct constant_table exfat_param_enums[] = {
@@ -223,6 +229,14 @@ static const struct fs_parameter_spec exfat_parameters[] = {
223229
fsparam_enum("errors", Opt_errors, exfat_param_enums),
224230
fsparam_flag("discard", Opt_discard),
225231
fsparam_s32("time_offset", Opt_time_offset),
232+
__fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated,
233+
NULL),
234+
__fsparam(NULL, "debug", Opt_debug, fs_param_deprecated,
235+
NULL),
236+
__fsparam(fs_param_is_u32, "namecase", Opt_namecase,
237+
fs_param_deprecated, NULL),
238+
__fsparam(fs_param_is_u32, "codepage", Opt_codepage,
239+
fs_param_deprecated, NULL),
226240
{}
227241
};
228242

@@ -278,6 +292,11 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
278292
return -EINVAL;
279293
opts->time_offset = result.int_32;
280294
break;
295+
case Opt_utf8:
296+
case Opt_debug:
297+
case Opt_namecase:
298+
case Opt_codepage:
299+
break;
281300
default:
282301
return -EINVAL;
283302
}

0 commit comments

Comments
 (0)