[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2fad5988-b78f-4d48-943a-ec791ce38fb7@igalia.com>
Date: Fri, 15 Aug 2025 13:53:13 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Amir Goldstein <amir73il@...il.com>
Cc: Miklos Szeredi <miklos@...redi.hu>, Theodore Tso <tytso@....edu>,
Gabriel Krisman Bertazi <krisman@...nel.org>, linux-unionfs@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
kernel-dev@...lia.com
Subject: Re: [PATCH v5 4/9] ovl: Create ovl_casefold() to support casefolded
strncmp()
On 8/15/25 13:16, Amir Goldstein wrote:
> On Thu, Aug 14, 2025 at 7:22 PM André Almeida <andrealmeid@...lia.com> wrote:
>> To add overlayfs support casefold layers, create a new function
>> ovl_casefold(), to be able to do case-insensitive strncmp().
>>
>> ovl_casefold() allocates a new buffer and stores the casefolded version
>> of the string on it. If the allocation or the casefold operation fails,
>> fallback to use the original string.
>>
>> The case-insentive name is then used in the rb-tree search/insertion
>> operation. If the name is found in the rb-tree, the name can be
>> discarded and the buffer is freed. If the name isn't found, it's then
>> stored at struct ovl_cache_entry to be used later.
>>
>> Signed-off-by: André Almeida <andrealmeid@...lia.com>
[...]
>> @@ -260,12 +305,38 @@ static bool ovl_fill_merge(struct dir_context *ctx, const char *name,
>> {
>> struct ovl_readdir_data *rdd =
>> container_of(ctx, struct ovl_readdir_data, ctx);
>> + struct ovl_fs *ofs = OVL_FS(rdd->dentry->d_sb);
>> + char *cf_name = NULL;
>> + int c_len = 0;
>> + int ret;
>> +
>> + const char *c_name = NULL;
>> +
> Another nit:
> Pls move up next to cf_name = NULL line in your branch
>
> No need to repost.
Done. Also joined int ret and int c_len to the same declaration;
>
> Thanks,
> Amir.
Powered by blists - more mailing lists