@@ -204,7 +204,8 @@ struct exfat_mount_options {
/* on error: continue, panic, remount-ro */
enum exfat_error_mode errors;
unsigned utf8:1, /* Use of UTF-8 character set */
- discard:1; /* Issue discard requests on deletions */
+ discard:1, /* Issue discard requests on deletions */
+ keeptail:1; /* Keep trailing periods in paths */
int time_offset; /* Offset of timestamps from UTC (in minutes) */
};
@@ -173,6 +173,8 @@ static int exfat_show_options(struct seq_file *m, struct dentry *root)
seq_puts(m, ",errors=remount-ro");
if (opts->discard)
seq_puts(m, ",discard");
+ if (opts->keeptail)
+ seq_puts(m, ",keeptail");
if (opts->time_offset)
seq_printf(m, ",time_offset=%d", opts->time_offset);
return 0;
@@ -216,6 +218,7 @@ enum {
Opt_charset,
Opt_errors,
Opt_discard,
+ Opt_keeptail,
Opt_time_offset,
/* Deprecated options */
@@ -242,6 +245,7 @@ static const struct fs_parameter_spec exfat_parameters[] = {
fsparam_string("iocharset", Opt_charset),
fsparam_enum("errors", Opt_errors, exfat_param_enums),
fsparam_flag("discard", Opt_discard),
+ fsparam_flag("keeptail", Opt_keeptail),
fsparam_s32("time_offset", Opt_time_offset),
__fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated,
NULL),
@@ -296,6 +300,9 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
case Opt_discard:
opts->discard = 1;
break;
+ case Opt_keeptail:
+ opts->keeptail = 1;
+ break;
case Opt_time_offset:
/*
* Make the limit 24 just in case someone invents something
The "keeptail" mount option will, in a subsequent commit, control whether or not trailing periods '.' are stripped from path components. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David Disseldorp <ddiss@suse.de> --- fs/exfat/exfat_fs.h | 3 ++- fs/exfat/super.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-)