From: Gabriel Krisman Bertazi <krisman@suse.de>
To: linux-fsdevel@vger.kernel.org
Cc: Gabriel Krisman Bertazi <krisman@suse.de>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
"Theodore Ts'o" <tytso@mit.edu>, Hugh Dickins <hughd@google.com>,
Daniel Tang <danielzgtg.opensource@gmail.com>,
linux-ext4@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
Amir Goldstein <amir73il@gmail.com>,
linux-unionfs@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 1/4] shmem: Report casefold setting in mount options
Date: Mon, 28 Sep 2026 17:31:52 -0400 [thread overview]
Message-ID: <20260928213155.2612039-2-krisman@suse.de> (raw)
In-Reply-To: <20260928213155.2612039-1-krisman@suse.de>
For shmem, casefolding is a mount option. Report the current encoding
and casefolding flags in /proc/mounts, so userspace can easily check if
casefolding is supported withour relying on parsing dmesg or trying to
set +F.
Reported-by: Daniel Tang <danielzgtg.opensource@gmail.com>
Link: https://lore.kernel.org/linux-fsdevel/5193732.31r3eYUQgx@daniel-desktop3/#R
Assisted-by: LLM
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
---
mm/shmem.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/mm/shmem.c b/mm/shmem.c
index 897fa2b61346..2b93fcbf5127 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -4916,6 +4916,17 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
if (sbinfo->qlimits.grpquota_ihardlimit)
seq_printf(seq, ",grpquota_inode_hardlimit=%lld",
sbinfo->qlimits.grpquota_ihardlimit);
+#endif
+#if IS_ENABLED(CONFIG_UNICODE)
+ if (root->d_sb->s_encoding) {
+ unsigned int version = root->d_sb->s_encoding->version;
+
+ seq_printf(seq, ",casefold=utf8-%u.%u.%u",
+ unicode_major(version), unicode_minor(version),
+ unicode_rev(version));
+ if (sb_has_strict_encoding(root->d_sb))
+ seq_puts(seq, ",strict_encoding");
+ }
#endif
return 0;
}
--
2.55.0
next prev parent reply other threads:[~2026-09-28 21:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 21:31 [PATCH 0/4] Expose encoding information of volumes Gabriel Krisman Bertazi
2026-09-28 21:31 ` Gabriel Krisman Bertazi [this message]
2026-09-28 21:39 ` [PATCH 1/4] shmem: Report casefold setting in mount options sashiko-bot
2026-09-29 14:00 ` Mohammed EL Kadiri
2026-09-29 15:17 ` Gabriel Krisman Bertazi
2026-09-28 21:31 ` [PATCH 2/4] ext4: Expose the filesystem encoding through sysfs Gabriel Krisman Bertazi
2026-09-28 21:45 ` sashiko-bot
2026-09-29 0:18 ` Gabriel Krisman Bertazi
2026-09-28 21:31 ` [PATCH 3/4] ovl: Add /sys/fs/overlay plumbing Gabriel Krisman Bertazi
2026-09-28 21:38 ` sashiko-bot
2026-09-28 21:31 ` [PATCH 4/4] ovl: Expose the filesystem encoding through sysfs Gabriel Krisman Bertazi
2026-09-28 21:37 ` sashiko-bot
2026-09-29 14:15 ` Amir Goldstein
2026-09-29 14:40 ` Pali Rohár
2026-09-29 15:35 ` Gabriel Krisman Bertazi
2026-09-29 15:35 ` Gabriel Krisman Bertazi
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=20260928213155.2612039-2-krisman@suse.de \
--to=krisman@suse.de \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=danielzgtg.opensource@gmail.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=tytso@mit.edu \
/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