diff mbox series

exfat: add the dummy mount options to be backward compatible with staging/exfat

Message ID 20200521122034.2254-1-namjae.jeon@samsung.com (mailing list archive)
State New, archived
Headers show
Series exfat: add the dummy mount options to be backward compatible with staging/exfat | expand

Commit Message

Namjae Jeon May 21, 2020, 12:20 p.m. UTC
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 Torvalds reported 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 <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
---
 fs/exfat/super.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Al Viro May 21, 2020, 5:32 p.m. UTC | #1
On Thu, May 21, 2020 at 09:20:34PM +0900, Namjae Jeon wrote:
> 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 Torvalds reported 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 <torvalds@linux-foundation.org>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>

Do you want that to go via vfs.git #fixes, or would you rather have Linus
apply it straight to mainline?
Namjae Jeon May 21, 2020, 11:28 p.m. UTC | #2
> On Thu, May 21, 2020 at 09:20:34PM +0900, Namjae Jeon wrote:
> > 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 Torvalds reported 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 <torvalds@linux-foundation.org>
> > Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> 
> Do you want that to go via vfs.git #fixes, or would you rather have Linus apply it straight to
> mainline?
I would really appreciate if Linus apply it directly to mainline.

Thanks!
Linus Torvalds May 21, 2020, 11:41 p.m. UTC | #3
On Thu, May 21, 2020 at 4:28 PM Namjae Jeon <namjae.jeon@samsung.com> wrote:
>
> I would really appreciate if Linus apply it directly to mainline.

v3 applied. Thanks,

               Linus
diff mbox series

Patch

diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 0565d5539d57..26b0db5b20de 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -203,6 +203,12 @@  enum {
 	Opt_errors,
 	Opt_discard,
 	Opt_time_offset,
+
+	/* Deprecated options */
+	Opt_utf8,
+	Opt_debug,
+	Opt_namecase,
+	Opt_codepage,
 };
 
 static const struct constant_table exfat_param_enums[] = {
@@ -223,6 +229,10 @@  static const struct fs_parameter_spec exfat_parameters[] = {
 	fsparam_enum("errors",			Opt_errors, exfat_param_enums),
 	fsparam_flag("discard",			Opt_discard),
 	fsparam_s32("time_offset",		Opt_time_offset),
+	fsparam_flag("utf8",			Opt_utf8),
+	fsparam_flag("debug",			Opt_debug),
+	fsparam_u32("namecase",			Opt_namecase),
+	fsparam_u32("codepage",			Opt_codepage),
 	{}
 };
 
@@ -278,6 +288,18 @@  static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
 			return -EINVAL;
 		opts->time_offset = result.int_32;
 		break;
+	case Opt_utf8:
+		pr_warn("exFAT-fs: 'utf8' mount option is deprecated and has no effect\n");
+		break;
+	case Opt_debug:
+		pr_warn("exFAT-fs: 'debug' mount option is deprecated and has no effect\n");
+		break;
+	case Opt_namecase:
+		pr_warn("exFAT-fs: 'namecase' mount option is deprecated and has no effect\n");
+		break;
+	case Opt_codepage:
+		pr_warn("exFAT-fs: 'codepage' mount option is deprecated and has no effect\n");
+		break;
 	default:
 		return -EINVAL;
 	}