Re: [PATCH v4 07/10] tmpfs: Add casefold lookup support
From: Gabriel Krisman Bertazi
Date: Wed Oct 02 2024 - 17:34:20 EST
André Almeida <andrealmeid@xxxxxxxxxx> writes:
> Hey Krisman,
>
> Em 12/09/2024 16:04, Gabriel Krisman Bertazi escreveu:
>> André Almeida <andrealmeid@xxxxxxxxxx> writes:
>>
>
> [...]
>
>>> +#if IS_ENABLED(CONFIG_UNICODE)
>>> + if (ctx->encoding) {
>>> + sb->s_encoding = ctx->encoding;
>>> + sb->s_d_op = &shmem_ci_dentry_ops;
>>> + if (ctx->strict_encoding)
>>> + sb->s_encoding_flags = SB_ENC_STRICT_MODE_FL;
>>> + }
>>> #else
>>> - sb->s_flags |= SB_NOUSER;
>>> + sb->s_d_op = &simple_dentry_operations;
>> Moving simple_dentry_operations to be set at s_d_op should be a
>> separate
>> patch.
>> It is a change that has non-obvious side effects (i.e. the way we
>> treat the root dentry) so it needs proper review by itself. It is
>> also not related to the rest of the case-insensitive patch.
>>
>
> The idea of setting simple_dentry_operations come from my previous
> approach of having our own shmem_lookup(), replacing
> simple_lookup(). Now that we are settled to keep with simple_lookup()
> anyway (that already sets simple_dentry_operations), I think we don't
> need this change anymore, right?
Up to you, really. If you don't need it to support casefold lookup in
tmpfs, it doesn't need to be part of the same patchset.
> This will be set for every dentry that doesn't have a
> dentry->d_sb->s_d_op. Case-insensitive mount points will have this set,
> so we don't risk overwriting it.
I encourage you to send a new version with this. makes sense to me.
--
Gabriel Krisman Bertazi