[PATCH v7 1/2] erofs-utils: lib: expose erofs_match_prefix()
Hongzhen Luo
hongzhen at linux.alibaba.com
Thu Sep 12 20:02:02 AEST 2024
On 2024/9/12 17:50, Gao Xiang wrote:
>
>
> On 2024/9/6 17:58, Hongzhen Luo wrote:
>> Prepare for the feature of exporting extended attributes for
>> `fsck.erofs`.
>>
>> Signed-off-by: Hongzhen Luo <hongzhen at linux.alibaba.com>
>> ---
>> v2: Expose erofs_match_prefix() directly instead of introducing
>> another helper function.
>> v1:
>> https://lore.kernel.org/all/20240906083849.3090392-1-hongzhen@linux.alibaba.com/
>> ---
>> include/erofs/xattr.h | 3 +++
>> lib/xattr.c | 11 ++++++-----
>> 2 files changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/erofs/xattr.h b/include/erofs/xattr.h
>> index 7643611..e89172e 100644
>> --- a/include/erofs/xattr.h
>> +++ b/include/erofs/xattr.h
>> @@ -61,6 +61,9 @@ void erofs_clear_opaque_xattr(struct erofs_inode
>> *inode);
>> int erofs_set_origin_xattr(struct erofs_inode *inode);
>> int erofs_read_xattrs_from_disk(struct erofs_inode *inode);
>> +bool erofs_match_prefix(const char *key, unsigned int *index,
>> + unsigned int *len);
>
> better to add `xattr` in the function name too,
>
> erofs_xattr_prefix_matches?
>
Agree. I will send a new patch soon.
Thanks,
Hongzhen
> Thanks,
> Gao Xiang
More information about the Linux-erofs
mailing list