linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/8] ovl: Enable support for casefold filesystems
@ 2025-08-05  3:09 André Almeida
  2025-08-05  3:09 ` [PATCH RFC v2 1/8] olv: Store casefold name for case-insentive dentries André Almeida
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: André Almeida @ 2025-08-05  3:09 UTC (permalink / raw)
  To: Miklos Szeredi, Amir Goldstein, Theodore Tso,
	Gabriel Krisman Bertazi
  Cc: linux-unionfs, linux-kernel, linux-fsdevel, Alexander Viro,
	Christian Brauner, Jan Kara, kernel-dev, André Almeida

Hi all,

We would like to support the usage of casefold filesystems with
overlayfs to be used with container tools. This use case requires a
simple setup, where every layer will have the same encoding setting
(i.e. Unicode version and flags), using one upper and one lower layer.

* Implementation

When merge layers, ovl uses a red-black tree to check if a given dentry
name from a lower layers already exists in the upper layer. For merging
case-insensitive names, we need to store then in tree casefolded.
However, when displaying to the user the dentry name, we need to respect
the name chosen when the file was created (e.g. Picture.PNG, instead of
picture.png). To achieve this, I create a new field for cache entries
that stores the casefolded names and a function ovl_strcmp() that uses
this name for searching the rb_tree. For composing the layer, ovl uses
the original name, keeping it consistency with whatever name the user
created.

The rest of the patches are mostly for checking if casefold is being
consistently used across the layers and dropping the mount restrictions
that prevented case-insensitive filesystems to be mounted.

Thanks for the feedback!

---
Changes in v2:
- Almost a full rewritten from the v1.
v1: https://lore.kernel.org/lkml/20250409-tonyk-overlayfs-v1-0-3991616fe9a3@igalia.com/

---
André Almeida (8):
      olv: Store casefold name for case-insentive dentries
      ovl: Create ovl_strcmp() with casefold support
      fs: Create sb_same_encoding() helper
      ovl: Ensure that all mount points have the same encoding
      ovl: Set case-insensitive dentry operations for ovl sb
      ovl: Set inode S_CASEFOLD for casefolded dentries
      ovl: Check casefold consistency in ovl stack
      ovl: Drop restrictions for casefolded dentries

 fs/overlayfs/inode.c   |  7 +++++
 fs/overlayfs/namei.c   | 25 ++++++---------
 fs/overlayfs/params.c  |  7 -----
 fs/overlayfs/readdir.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++--
 fs/overlayfs/super.c   | 21 +++++++++++++
 fs/overlayfs/util.c    |  8 ++---
 include/linux/fs.h     | 22 ++++++++++++++
 7 files changed, 143 insertions(+), 29 deletions(-)
---
base-commit: ba04dc6f8768e61d6de2d0c5c5079a8b54e62fbb
change-id: 20250409-tonyk-overlayfs-591f5e4d407a

Best regards,
-- 
André Almeida <andrealmeid@igalia.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-08-05 18:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05  3:09 [PATCH RFC v2 0/8] ovl: Enable support for casefold filesystems André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 1/8] olv: Store casefold name for case-insentive dentries André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 2/8] ovl: Create ovl_strcmp() with casefold support André Almeida
2025-08-05  5:08   ` Al Viro
2025-08-05 13:01     ` André Almeida
2025-08-05 14:56   ` Gabriel Krisman Bertazi
2025-08-05 18:40     ` André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 3/8] fs: Create sb_same_encoding() helper André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 4/8] ovl: Ensure that all mount points have the same encoding André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 5/8] ovl: Set case-insensitive dentry operations for ovl sb André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 6/8] ovl: Set inode S_CASEFOLD for casefolded dentries André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 7/8] ovl: Check casefold consistency in ovl stack André Almeida
2025-08-05  3:09 ` [PATCH RFC v2 8/8] ovl: Drop restrictions for casefolded dentries André Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).