From: Theodore Ts'o <tytso@mit.edu>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
david@fromorbit.com, olaf@sgi.com, linux-ext4@vger.kernel.org,
linux-fsdevel@vger.kernel.org, alvaro.soliverez@collabora.co.uk,
kernel@lists.collabora.co.uk
Subject: Re: [PATCH RFC v2 00/13] NLS/UTF-8 Case-Insensitive lookups for ext4 and VFS proposal
Date: Thu, 25 Jan 2018 14:32:39 -0500 [thread overview]
Message-ID: <20180125193239.GA8005@thunk.org> (raw)
In-Reply-To: <20180125031650.GU13338@ZenIV.linux.org.uk>
On Thu, Jan 25, 2018 at 03:16:50AM +0000, Al Viro wrote:
> On Thu, Jan 25, 2018 at 12:53:36AM -0200, Gabriel Krisman Bertazi wrote:
>
> > The second proposal is related to the VFS layer:
> >
> > (2) Enable Insensitive lookup support on a per-mountpoint basis,
> > via a MS_CASEFOLD flag, with the ultimate goal of supporting a
> > case-insensitive bind mount of a subtree, side-by-side with a
> > sensitive version of the filesystem.
>
> First reaction: No. With the side of HELL NO.
>
> Your ultimate goal sounds utterly insane - dcache tree must be shared
> for all mounts. Moreover, "would these two names refer to the same
> object" can not be mount-dependent. Not going to happen.
>
> Please, post the description of what you are planning to do.
> Detailed. I'm not saying that it's 100% impossible to do correctly,
> but I'm _very_ sceptical about the feasibility.
So I can't speak authoratatively about the Collabora's customer
requirements that drove this particular feature, but I can talk about
why I am interested in this feature --- although I understand why it's
hard to do correctly.
Android is currently using a horrible wrapfs scheme to provide case
insesitive lookups. We talked about this last year at LSF/MM[1]. It
is using separate dentry entries for the upper and lower layers, and
it is *definitely* prone to races. Running fsstress on the top and
lower layers simultaneously is a pretty simple way to induce hilarity,
although my understanding is that the developers working on it having
been hammering on it for a while so that the races that cause kernel
panicks or file system damage are rare. I don't believe they have
been completely elimniated, because it's not clear to me that any
wrapfs solution can ever be made race-free.
[1] https://lwn.net/Articles/718640/
The problem is that both the case insensitive and case sensitive
directory trees are made available to userspace, and for backwards
compatibility reasons, they can't just make it disappear. Although
they don't have a Linus Torvalds going all Mr. Shouty about breaking
userspace, the combined whinging from the App developer ecosystem
probably can be a fairly good substitute for Linus when they complain
about compatibility breakages visible to the Android application
programmer. :-)
So my hope has been to find a way to (a) make wrapfs go away, and (b)
allow the functionality of case sensitive and case insensitive bind
mounts of the same underlying file system directories be *somehow*
supported.
If the answer is that if two files that differ only in case are
created via the case sensitive mount results in it being undefined
which file you get when you open, rename, or delete that file via the
case insensitive mount, that's fine. I think that's what happpens in
the wrapfs implementation today anyway. It would probably be fine if
the answer was you get the file with an exact match if it is present,
but if the two files created on the case sensitive side are "makefile"
and "Makefile", and you try open/delete "MaKeFiLe" via the case
insensitive mount, it's undefined which file you get --- that's fine.
Anyone who does that will get everything they deserve, and they get
that today anyway with the wrapfs or the previous fuse hack anyway.
This may indeed be an O_PONIES style request. And in the worst case,
Android will continue using an out-of-tree wrapfs solution, and
hopefully I can fend off people asking me for help when the wrapfs
code blows up in various not-so-entertainng ways. Which is,
admittedly, a purely selfish reason for why I would like to see if we
can give Android folks equivalent functionality to the wrapfs hack in
a sane, safe, and consensual way. :-)
Cheers,
- Ted
next prev parent reply other threads:[~2018-01-25 19:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 2:53 [PATCH RFC v2 00/13] NLS/UTF-8 Case-Insensitive lookups for ext4 and VFS proposal Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 01/13] charsets: Introduce middle-layer for character encoding Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 02/13] charsets: ascii: Wrap ascii functions to charsets library Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 03/13] charsets: utf8: Add unicode character database files Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 04/13] scripts: add trie generator for UTF-8 Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 05/13] charsets: utf8: Introduce code for UTF-8 normalization Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 06/13] charsets: utf8: reduce the size of utf8data[] Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 07/13] charsets: utf8: Hook-up utf-8 code to charsets library Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 08/13] charsets: utf8: Introduce test module for kernel UTF-8 implementation Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 09/13] ext4: Add ignorecase mount option Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 10/13] ext4: Include encoding information on the superblock Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 11/13] fscrypt: Introduce charset-based matching functions Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 12/13] ext4: Support charset name matching Gabriel Krisman Bertazi
2018-01-25 2:53 ` [PATCH RFC v2 13/13] ext4: Implement ext4 dcache hooks for custom charsets Gabriel Krisman Bertazi
2018-01-25 3:16 ` [PATCH RFC v2 00/13] NLS/UTF-8 Case-Insensitive lookups for ext4 and VFS proposal Al Viro
2018-01-25 19:32 ` Theodore Ts'o [this message]
2018-01-26 2:52 ` Gaoxiang (OS)
2018-03-05 12:10 ` Greg KH
2018-02-06 2:24 ` Gabriel Krisman Bertazi
2018-02-06 3:21 ` Gao Xiang
2018-02-12 19:56 ` Gabriel Krisman Bertazi
2018-02-12 22:43 ` Gao Xiang
2018-02-13 22:20 ` Gabriel Krisman Bertazi
2018-02-14 12:27 ` Gao Xiang
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=20180125193239.GA8005@thunk.org \
--to=tytso@mit.edu \
--cc=alvaro.soliverez@collabora.co.uk \
--cc=david@fromorbit.com \
--cc=kernel@lists.collabora.co.uk \
--cc=krisman@collabora.co.uk \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=olaf@sgi.com \
--cc=viro@ZenIV.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.