2024-04-03 14:40:28

by Gabriel Krisman Bertazi

[permalink] [raw]
Subject: Re: [f2fs-dev] [PATCH v15 6/9] ext4: Log error when lookup of encoded dentry fails

Eric Biggers <[email protected]> writes:

> On Tue, Apr 02, 2024 at 06:48:39PM +0300, Eugen Hristev via Linux-f2fs-devel wrote:
>> From: Gabriel Krisman Bertazi <[email protected]>
>>

> I'm seeing this error when the volume is *not* in strict mode and a file has a
> name that is not valid UTF-8. That doesn't seem to be working as
> intended.
>
> mkfs.ext4 -F -O casefold /dev/vdb
> mount /dev/vdb /mnt
> mkdir /mnt/dir
> chattr +F /mnt/dir
> touch /mnt/dir/$'\xff'

Yes. This should work without warnings. When not in strict mode,
/mnt/dir/$'\xff' is just a valid filename which can only be
looked up with an exact-match name-under-lookup.

The issue is that we must propagate errors from utf8_strncasecmp in
generic_ci_match only if we are in strict mode. If not on strict mode, we
need to return not-match on error.

--
Gabriel Krisman Bertazi