[PATCH] erofs-utils: xattr: skip NFSv4 xattrs building

Gao Xiang hsiangkao at linux.alibaba.com
Wed Apr 19 19:04:54 AEST 2023



On 2023/4/19 17:03, Gao Xiang wrote:
> Hi Weizhao,
> 
> On 2023/4/19 16:56, Weizhao Ouyang wrote:
>> Skip NFSv4 xattrs(system.nfs4_acl/dacl/sacl) to avoid ENODATA error when
>> compiling AOSP on NFSv4 servers.
>>
>> Signed-off-by: Weizhao Ouyang <o451686892 at gmail.com>
> Thanks for the catch! Could we ignore any prefixes
> with identified "system." (but a print warning might be needed...)?

        ^ sorry, unidentified

> 
> Thanks,
> Gao Xiang
> 
> 
>> ---
>>   lib/xattr.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/xattr.c b/lib/xattr.c
>> index 6034e7b6b4eb..748bf2e13408 100644
>> --- a/lib/xattr.c
>> +++ b/lib/xattr.c
>> @@ -288,6 +288,9 @@ static bool erofs_is_skipped_xattr(const char *key)
>>       if (cfg.sehnd && !strcmp(key, XATTR_SECURITY_PREFIX "selinux"))
>>           return true;
>>   #endif
>> +    /* skip xattr nfs4_acl/dacl/sacl */
>> +    if (!strncmp(key, "system.nfs4_", strlen("system.nfs4_")))
>> +        return true;
>>       return false;
>>   }


More information about the Linux-erofs mailing list