public inbox for ntfs3@lists.linux.dev
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: <ntfs3@lists.linux.dev>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: [PATCH 10/11] fs/ntfs3: Add missed "nocase" in ntfs_show_options
Date: Wed, 15 Feb 2023 17:39:57 +0400	[thread overview]
Message-ID: <6551ad6b-9d90-edc3-920c-347a43216cd3@paragon-software.com> (raw)
In-Reply-To: <d7c91201-5e09-5c06-3283-7887f5a5b7f1@paragon-software.com>

Sort processing ntfs3's mount options in same order they declared.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
---
  fs/ntfs3/super.c | 40 +++++++++++++++++++++-------------------
  1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 6a412826b43d..521ce31d67a1 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -270,11 +270,11 @@ static const struct fs_parameter_spec 
ntfs_fs_parameters[] = {
      fsparam_flag_no("hidden",        Opt_nohidden),
      fsparam_flag_no("hide_dot_files",    Opt_hide_dot_files),
      fsparam_flag_no("windows_names",    Opt_windows_names),
-    fsparam_flag_no("acl",            Opt_acl),
      fsparam_flag_no("showmeta",        Opt_showmeta),
+    fsparam_flag_no("acl",            Opt_acl),
+    fsparam_string("iocharset",        Opt_iocharset),
      fsparam_flag_no("prealloc",        Opt_prealloc),
      fsparam_flag_no("nocase",        Opt_nocase),
-    fsparam_string("iocharset",        Opt_iocharset),
      {}
  };

@@ -364,6 +364,9 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
      case Opt_windows_names:
          opts->windows_names = result.negated ? 0 : 1;
          break;
+    case Opt_showmeta:
+        opts->showmeta = result.negated ? 0 : 1;
+        break;
      case Opt_acl:
          if (!result.negated)
  #ifdef CONFIG_NTFS3_FS_POSIX_ACL
@@ -375,9 +378,6 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
          else
              fc->sb_flags &= ~SB_POSIXACL;
          break;
-    case Opt_showmeta:
-        opts->showmeta = result.negated ? 0 : 1;
-        break;
      case Opt_iocharset:
          kfree(opts->nls_name);
          opts->nls_name = param->string;
@@ -547,34 +547,36 @@ static int ntfs_show_options(struct seq_file *m, 
struct dentry *root)

      seq_printf(m, ",uid=%u", from_kuid_munged(user_ns, opts->fs_uid));
      seq_printf(m, ",gid=%u", from_kgid_munged(user_ns, opts->fs_gid));
-    if (opts->fmask)
-        seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
      if (opts->dmask)
          seq_printf(m, ",dmask=%04o", opts->fs_dmask_inv ^ 0xffff);
-    if (opts->nls)
-        seq_printf(m, ",iocharset=%s", opts->nls->charset);
-    else
-        seq_puts(m, ",iocharset=utf8");
+    if (opts->fmask)
+        seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
      if (opts->sys_immutable)
          seq_puts(m, ",sys_immutable");
      if (opts->discard)
          seq_puts(m, ",discard");
+    if (opts->force)
+        seq_puts(m, ",force");
      if (opts->sparse)
          seq_puts(m, ",sparse");
-    if (opts->showmeta)
-        seq_puts(m, ",showmeta");
      if (opts->nohidden)
          seq_puts(m, ",nohidden");
-    if (opts->windows_names)
-        seq_puts(m, ",windows_names");
      if (opts->hide_dot_files)
          seq_puts(m, ",hide_dot_files");
-    if (opts->force)
-        seq_puts(m, ",force");
-    if (opts->prealloc)
-        seq_puts(m, ",prealloc");
+    if (opts->windows_names)
+        seq_puts(m, ",windows_names");
+    if (opts->showmeta)
+        seq_puts(m, ",showmeta");
      if (sb->s_flags & SB_POSIXACL)
          seq_puts(m, ",acl");
+    if (opts->nls)
+        seq_printf(m, ",iocharset=%s", opts->nls->charset);
+    else
+        seq_puts(m, ",iocharset=utf8");
+    if (opts->prealloc)
+        seq_puts(m, ",prealloc");
+    if (opts->nocase)
+        seq_puts(m, ",nocase");

      return 0;
  }
-- 
2.34.1


  parent reply	other threads:[~2023-02-15 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 13:33 [PATCH 00/11] fs/ntfs3: Bugfix and refactoring Konstantin Komarov
2023-02-15 13:34 ` [PATCH 01/11] fs/ntfs3: Use bh_read to simplify code Konstantin Komarov
2023-02-15 13:34 ` [PATCH 02/11] fs/ntfs3: Remove noacsrules Konstantin Komarov
2023-02-15 13:35 ` [PATCH 03/11] fs/ntfs3: Fix ntfs_create_inode() Konstantin Komarov
2023-02-15 13:36 ` [PATCH 04/11] fs/ntfs3: Optimization in ntfs_set_state() Konstantin Komarov
2023-02-15 13:36 ` [PATCH 05/11] fs/ntfs3: Undo endian changes Konstantin Komarov
2023-02-15 13:37 ` [PATCH 06/11] fs/ntfs3: Undo critial modificatins to keep directory consistency Konstantin Komarov
2023-02-15 13:38 ` [PATCH 07/11] fs/ntfs3: Remove field sbi->used.bitmap.set_tail Konstantin Komarov
2023-02-15 13:38 ` [PATCH 08/11] fs/ntfs3: Changed ntfs_get_acl() to use dentry Konstantin Komarov
2023-02-15 13:39 ` [PATCH 09/11] fs/ntfs3: Code formatting and refactoring Konstantin Komarov
2023-02-15 13:39 ` Konstantin Komarov [this message]
2023-02-15 13:40 ` [PATCH 11/11] fs/ntfs3: Print details about mount fails Konstantin Komarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6551ad6b-9d90-edc3-920c-347a43216cd3@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox