On 8/15/25 13:16, Amir Goldstein wrote:
On Thu, Aug 14, 2025 at 7:22 PM André Almeida <andrealmeid@xxxxxxxxxx> 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@xxxxxxxxxx>
[...]
@@ -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.