From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Shreeya Patel <shreeya.patel@collabora.com>,
viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH 2/2] fs: ext4: Fix the inconsistent name exposed by /proc/self/cwd
Date: Thu, 14 Oct 2021 18:54:31 -0300 [thread overview]
Message-ID: <8735p3gtm0.fsf@collabora.com> (raw)
In-Reply-To: <YVe0HS8HM48LDUDS@mit.edu> (Theodore Ts'o's message of "Fri, 1 Oct 2021 21:21:33 -0400")
"Theodore Ts'o" <tytso@mit.edu> writes:
> On Fri, Oct 01, 2021 at 03:11:30PM -0400, Gabriel Krisman Bertazi wrote:
>>
>> The dcache name is exposed in more places, like /proc/mounts. We have a
>> bug reported against flatpak where its initialization code bind mounts a
>> directory that was previously touched with a different case combination,
>> and then checks /proc/mounts in a case-sensitive way to see if the mount
>> succeeded. This code now regresses on CI directories because the name
>> it asked to bind mount is not found in /proc/mounts.
>
> Ah, thanks for the context. That makes sense.
>
>> I think the more reasonable approach is to save the disk exact name on
>> the dcache, because that is the only version that doesn't change based
>> on who won the race for the first lookup.
>
> What about the alternative of storing the casefolded name? The
> advantage of using the casefolded name is that we can always casefold
> the name, where as in the case of a negative dentry, there is no disk
> exact name to use (since by definition there is no on-disk name).
That would work. The casefolded version is always predictable (since
unicode is stable) and even though is not as easily available as the
disk name function (getdents), it solves the issue.
It would also allow us to use utf8_strncasecmp_folded in the d_compare
hook, which is nice.
Do you have an implementation suggestion to solve the dcache issue
pointed by Viro?
--
Gabriel Krisman Bertazi
next prev parent reply other threads:[~2021-10-14 21:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 10:53 [PATCH 0/2] Handle a soft hang and the inconsistent name issue Shreeya Patel
2021-09-29 10:53 ` [PATCH 1/2] fs: dcache: Handle case-exact lookup in d_alloc_parallel Shreeya Patel
2021-10-01 18:35 ` Gabriel Krisman Bertazi
2021-10-03 13:52 ` Al Viro
2021-10-03 13:38 ` Al Viro
2021-10-05 13:09 ` Shreeya Patel
2021-09-29 10:53 ` [PATCH 2/2] fs: ext4: Fix the inconsistent name exposed by /proc/self/cwd Shreeya Patel
2021-10-01 18:41 ` Theodore Ts'o
2021-10-01 19:11 ` Gabriel Krisman Bertazi
2021-10-02 1:21 ` Theodore Ts'o
2021-10-14 21:54 ` Gabriel Krisman Bertazi [this message]
2021-10-01 18:16 ` [PATCH 0/2] Handle a soft hang and the inconsistent name issue 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=8735p3gtm0.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=adilger.kernel@dilger.ca \
--cc=kernel@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shreeya.patel@collabora.com \
--cc=tytso@mit.edu \
--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 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).