The "keep_last_dots" mount option will, in a
subsequent commit, control whether or not trailing periods '.' are stripped
from path components during file lookup or file creation.
Suggested-by: Takashi Iwai <[email protected]>
Signed-off-by: Vasant Karasulli <[email protected]>
Co-developed-by: David Disseldorp <[email protected]>
Signed-off-by: David Disseldorp <[email protected]>
---
fs/exfat/exfat_fs.h | 3 ++-
fs/exfat/super.c | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
index 619e5b4bed10..c6800b880920 100644
--- a/fs/exfat/exfat_fs.h
+++ b/fs/exfat/exfat_fs.h
@@ -203,7 +203,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 */
+ keep_last_dots:1; /* Keep trailing periods in paths */
int time_offset; /* Offset of timestamps from UTC (in minutes) */
};
diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 8c9fb7dcec16..4c3f80ed17b1 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -174,6 +174,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->keep_last_dots)
+ seq_puts(m, ",keep_last_dots");
if (opts->time_offset)
seq_printf(m, ",time_offset=%d", opts->time_offset);
return 0;
@@ -217,6 +219,7 @@ enum {
Opt_charset,
Opt_errors,
Opt_discard,
+ Opt_keep_last_dots,
Opt_time_offset,
/* Deprecated options */
@@ -243,6 +246,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("keep_last_dots", Opt_keep_last_dots),
fsparam_s32("time_offset", Opt_time_offset),
__fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated,
NULL),
@@ -297,6 +301,9 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
case Opt_discard:
opts->discard = 1;
break;
+ case Opt_keep_last_dots:
+ opts->keep_last_dots = 1;
+ break;
case Opt_time_offset:
/*
* Make the limit 24 just in case someone invents something
--
2.32.0
2022-03-11 20:47 GMT+09:00, Vasant Karasulli <[email protected]>:
> The "keep_last_dots" mount option will, in a
> subsequent commit, control whether or not trailing periods '.' are stripped
> from path components during file lookup or file creation.
I don't know why the 1/2 patch should be split from the 2/2 patch.
Wouldn't it be better to combine them? Otherwise it looks good to me.
>
> Suggested-by: Takashi Iwai <[email protected]>
> Signed-off-by: Vasant Karasulli <[email protected]>
> Co-developed-by: David Disseldorp <[email protected]>
> Signed-off-by: David Disseldorp <[email protected]>
> ---
> fs/exfat/exfat_fs.h | 3 ++-
> fs/exfat/super.c | 7 +++++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
> index 619e5b4bed10..c6800b880920 100644
> --- a/fs/exfat/exfat_fs.h
> +++ b/fs/exfat/exfat_fs.h
> @@ -203,7 +203,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 */
> + keep_last_dots:1; /* Keep trailing periods in paths */
> int time_offset; /* Offset of timestamps from UTC (in minutes) */
> };
>
> diff --git a/fs/exfat/super.c b/fs/exfat/super.c
> index 8c9fb7dcec16..4c3f80ed17b1 100644
> --- a/fs/exfat/super.c
> +++ b/fs/exfat/super.c
> @@ -174,6 +174,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->keep_last_dots)
> + seq_puts(m, ",keep_last_dots");
> if (opts->time_offset)
> seq_printf(m, ",time_offset=%d", opts->time_offset);
> return 0;
> @@ -217,6 +219,7 @@ enum {
> Opt_charset,
> Opt_errors,
> Opt_discard,
> + Opt_keep_last_dots,
> Opt_time_offset,
>
> /* Deprecated options */
> @@ -243,6 +246,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("keep_last_dots", Opt_keep_last_dots),
> fsparam_s32("time_offset", Opt_time_offset),
> __fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated,
> NULL),
> @@ -297,6 +301,9 @@ static int exfat_parse_param(struct fs_context *fc,
> struct fs_parameter *param)
> case Opt_discard:
> opts->discard = 1;
> break;
> + case Opt_keep_last_dots:
> + opts->keep_last_dots = 1;
> + break;
> case Opt_time_offset:
> /*
> * Make the limit 24 just in case someone invents something
> --
> 2.32.0
>
>
On So 13-03-22 09:01:32, Namjae Jeon wrote:
> 2022-03-11 20:47 GMT+09:00, Vasant Karasulli <[email protected]>:
> > The "keep_last_dots" mount option will, in a
> > subsequent commit, control whether or not trailing periods '.' are stripped
> > from path components during file lookup or file creation.
> I don't know why the 1/2 patch should be split from the 2/2 patch.
> Wouldn't it be better to combine them? Otherwise it looks good to me.
I just followed the same patch structure as was in the initial version
of the patch.
> >
> > Suggested-by: Takashi Iwai <[email protected]>
> > Signed-off-by: Vasant Karasulli <[email protected]>
> > Co-developed-by: David Disseldorp <[email protected]>
> > Signed-off-by: David Disseldorp <[email protected]>
> > ---
> > fs/exfat/exfat_fs.h | 3 ++-
> > fs/exfat/super.c | 7 +++++++
> > 2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
> > index 619e5b4bed10..c6800b880920 100644
> > --- a/fs/exfat/exfat_fs.h
> > +++ b/fs/exfat/exfat_fs.h
> > @@ -203,7 +203,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 */
> > + keep_last_dots:1; /* Keep trailing periods in paths */
> > int time_offset; /* Offset of timestamps from UTC (in minutes) */
> > };
> >
> > diff --git a/fs/exfat/super.c b/fs/exfat/super.c
> > index 8c9fb7dcec16..4c3f80ed17b1 100644
> > --- a/fs/exfat/super.c
> > +++ b/fs/exfat/super.c
> > @@ -174,6 +174,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->keep_last_dots)
> > + seq_puts(m, ",keep_last_dots");
> > if (opts->time_offset)
> > seq_printf(m, ",time_offset=%d", opts->time_offset);
> > return 0;
> > @@ -217,6 +219,7 @@ enum {
> > Opt_charset,
> > Opt_errors,
> > Opt_discard,
> > + Opt_keep_last_dots,
> > Opt_time_offset,
> >
> > /* Deprecated options */
> > @@ -243,6 +246,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("keep_last_dots", Opt_keep_last_dots),
> > fsparam_s32("time_offset", Opt_time_offset),
> > __fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated,
> > NULL),
> > @@ -297,6 +301,9 @@ static int exfat_parse_param(struct fs_context *fc,
> > struct fs_parameter *param)
> > case Opt_discard:
> > opts->discard = 1;
> > break;
> > + case Opt_keep_last_dots:
> > + opts->keep_last_dots = 1;
> > + break;
> > case Opt_time_offset:
> > /*
> > * Make the limit 24 just in case someone invents something
> > --
> > 2.32.0
> >
> >
--
Vasant Karasulli
Kernel generalist
http://www.suse.com<http://www.suse.com>
[https://www.suse.com/assets/img/social-platforms-suse-logo.png]<http://www.suse.com/>
SUSE - Open Source Solutions for Enterprise Servers & Cloud<http://www.suse.com/>
Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined storage.
http://www.suse.com
On Mi 16-03-22 23:08:32, Namjae Jeon wrote:
> 2022-03-16 22:57 GMT+09:00, David Disseldorp <[email protected]>:
> > On Wed, 16 Mar 2022 10:20:28 +0100, Vasant Karasulli wrote:
> >
> >> On So 13-03-22 09:01:32, Namjae Jeon wrote:
> >> > 2022-03-11 20:47 GMT+09:00, Vasant Karasulli <[email protected]>:
> >> > > The "keep_last_dots" mount option will, in a
> >> > > subsequent commit, control whether or not trailing periods '.' are
> >> > > stripped
> >> > > from path components during file lookup or file creation.
> >> > I don't know why the 1/2 patch should be split from the 2/2 patch.
> >> > Wouldn't it be better to combine them? Otherwise it looks good to me.
> >>
> >> I just followed the same patch structure as was in the initial version
> >> of the patch.
> >
> > I'm fine with having both patches squashed together. @Namjae: should we
> > resubmit as a single patch or can you do the squash on your side before
> > submitting to Linus?
> I would be grateful if you resubmit it to the list after making it one:)
>
Ok, I will resubmit as a single patch in the new version of the patch.
Thanks,
Vasant Karasulli
Kernel generalist
http://www.suse.com<http://www.suse.com>
[https://www.suse.com/assets/img/social-platforms-suse-logo.png]<http://www.suse.com/>
SUSE - Open Source Solutions for Enterprise Servers & Cloud<http://www.suse.com/>
Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined storage.
http://www.suse.com
2022-03-16 22:57 GMT+09:00, David Disseldorp <[email protected]>:
> On Wed, 16 Mar 2022 10:20:28 +0100, Vasant Karasulli wrote:
>
>> On So 13-03-22 09:01:32, Namjae Jeon wrote:
>> > 2022-03-11 20:47 GMT+09:00, Vasant Karasulli <[email protected]>:
>> > > The "keep_last_dots" mount option will, in a
>> > > subsequent commit, control whether or not trailing periods '.' are
>> > > stripped
>> > > from path components during file lookup or file creation.
>> > I don't know why the 1/2 patch should be split from the 2/2 patch.
>> > Wouldn't it be better to combine them? Otherwise it looks good to me.
>>
>> I just followed the same patch structure as was in the initial version
>> of the patch.
>
> I'm fine with having both patches squashed together. @Namjae: should we
> resubmit as a single patch or can you do the squash on your side before
> submitting to Linus?
I would be grateful if you resubmit it to the list after making it one:)
Thanks!
>
> Cheers, David
>
On Wed, 16 Mar 2022 10:20:28 +0100, Vasant Karasulli wrote:
> On So 13-03-22 09:01:32, Namjae Jeon wrote:
> > 2022-03-11 20:47 GMT+09:00, Vasant Karasulli <[email protected]>:
> > > The "keep_last_dots" mount option will, in a
> > > subsequent commit, control whether or not trailing periods '.' are stripped
> > > from path components during file lookup or file creation.
> > I don't know why the 1/2 patch should be split from the 2/2 patch.
> > Wouldn't it be better to combine them? Otherwise it looks good to me.
>
> I just followed the same patch structure as was in the initial version
> of the patch.
I'm fine with having both patches squashed together. @Namjae: should we
resubmit as a single patch or can you do the squash on your side before
submitting to Linus?
Cheers, David