From: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH RESEND v2 19/25] vfs: Handle case-exact lookup in d_add_ci
Date: Tue, 09 Oct 2018 10:40:39 -0400 [thread overview]
Message-ID: <87va6bmbdk.fsf@collabora.co.uk> (raw)
In-Reply-To: <20181007180953.GA10662@thunk.org> (Theodore Y. Ts'o's message of "Sun, 7 Oct 2018 14:09:53 -0400")
"Theodore Y. Ts'o" <tytso@mit.edu> writes:
> On Mon, Sep 24, 2018 at 05:56:49PM -0400, Gabriel Krisman Bertazi wrote:
>> This prevents a soft hang if called d_add_ci is called from the FS
>> layer, when doing a CI search but the result dentry is the exact match.
>
> This isn't the right way to fix this problem. Take a look at how xfs
> handles this in fs/xfs/xfs_iops.c:xfs_vn_ci_lookup(). This logic
> should be in the file system, not in d_add_ci(). Also, we don't want
> to use d_same_name(), since that is *not* guaranteed to do an exact
> match. It happens to do so for ext4 since we don't provide d_compare,
> but it's better just check for an exact match and call
> d_splice_alias() instead of d_add_ci() in ext4_lookup().
>
> Also note that d_same_name() is *not* guaranteeed to do an exact
> match, in particular if the file system provides d_compare (which
> granted, ext4 doesn't right now). It's simpler to just do a direct
> strcmp in ext4_lookup.
>
> - Ted
>
> P.S. Apologies for not having a chance to look at this series in
> detail until now. It's been a crazy month...
Hey Ted,
No worries. Thanks for the review.
I'm aware of how xfs does it. I was looking for a generic way but I see
its problems now. I will have it addressed in the next iteration.
thanks.
--
Gabriel Krisman Bertazi
next prev parent reply other threads:[~2018-10-09 21:57 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 21:56 [PATCH RESEND v2 00/25] Ext4 Encoding and Case-insensitive support Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 01/25] nls: Wrap uni2char/char2uni callers Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 02/25] nls: Wrap charset field access Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 03/25] nls: Wrap charset hooks in ops structure Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 04/25] nls: Split default charset from NLS core Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 05/25] nls: Split struct nls_charset from struct nls_table Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 06/25] nls: Add support for multiple versions of an encoding Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 07/25] nls: Implement NLS_STRICT_MODE flag Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 08/25] nls: Let charsets define the behavior of tolower/toupper Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 09/25] nls: Add new interface for string comparisons Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 10/25] nls: Add optional normalization and casefold hooks Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 11/25] nls: ascii: Support validation and normalization operations Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 12/25] nls: utf8n: Add unicode character database files Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 13/25] scripts: add trie generator for UTF-8 Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 14/25] nls: utf8: Move nls-utf8{,-core}.c Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 15/25] nls: utf8: Introduce code for UTF-8 normalization Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 16/25] nls: utf8n: reduce the size of utf8data[] Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 17/25] nls: utf8: Integrate utf8 normalization code with utf8 charset Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 18/25] nls: utf8: Introduce test module for normalized utf8 implementation Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 19/25] vfs: Handle case-exact lookup in d_add_ci Gabriel Krisman Bertazi
2018-10-07 18:09 ` Theodore Y. Ts'o
2018-10-09 14:40 ` Gabriel Krisman Bertazi [this message]
2018-09-24 21:56 ` [PATCH RESEND v2 20/25] ext4: Include encoding information in the superblock Gabriel Krisman Bertazi
2018-10-11 22:26 ` Darrick J. Wong
2018-10-12 15:36 ` Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 21/25] ext4: Add encoding mount options Gabriel Krisman Bertazi
2018-10-07 19:22 ` Theodore Y. Ts'o
2018-10-09 14:53 ` Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 22/25] ext4: Support encoding-aware file name lookups Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 23/25] ext4: Implement encoding-aware dcache hooks Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 24/25] ext4: Implement EXT4_CASEFOLD_FL flag Gabriel Krisman Bertazi
2018-09-24 21:56 ` [PATCH RESEND v2 25/25] docs: ext4.rst: Document encoding and case-insensitive lookups Gabriel Krisman Bertazi
2018-10-11 22:23 ` [PATCH RESEND v2 00/25] Ext4 Encoding and Case-insensitive support Darrick J. Wong
2018-10-12 15:29 ` Gabriel Krisman Bertazi
2018-10-12 19:24 ` Theodore Y. Ts'o
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=87va6bmbdk.fsf@collabora.co.uk \
--to=krisman@collabora.co.uk \
--cc=linux-ext4@vger.kernel.org \
--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 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.