linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building
@ 2023-04-19  8:56 Weizhao Ouyang
  2023-04-19  9:03 ` Gao Xiang
  0 siblings, 1 reply; 4+ messages in thread
From: Weizhao Ouyang @ 2023-04-19  8:56 UTC (permalink / raw)
  To: linux-erofs; +Cc: Weizhao Ouyang

Skip NFSv4 xattrs(system.nfs4_acl/dacl/sacl) to avoid ENODATA error when
compiling AOSP on NFSv4 servers.

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
---
 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;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building
  2023-04-19  8:56 [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building Weizhao Ouyang
@ 2023-04-19  9:03 ` Gao Xiang
  2023-04-19  9:04   ` Gao Xiang
  0 siblings, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2023-04-19  9:03 UTC (permalink / raw)
  To: Weizhao Ouyang, linux-erofs

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@gmail.com>
Thanks for the catch! Could we ignore any prefixes
with identified "system." (but a print warning might be needed...)?

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;
>   }
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building
  2023-04-19  9:03 ` Gao Xiang
@ 2023-04-19  9:04   ` Gao Xiang
  2023-04-19  9:54     ` Weizhao Ouyang
  0 siblings, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2023-04-19  9:04 UTC (permalink / raw)
  To: Weizhao Ouyang, linux-erofs



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@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;
>>   }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building
  2023-04-19  9:04   ` Gao Xiang
@ 2023-04-19  9:54     ` Weizhao Ouyang
  0 siblings, 0 replies; 4+ messages in thread
From: Weizhao Ouyang @ 2023-04-19  9:54 UTC (permalink / raw)
  To: Gao Xiang; +Cc: linux-erofs

On Wed, Apr 19, 2023 at 5:05 PM Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
>
>
>
> 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@gmail.com>
> > Thanks for the catch! Could we ignore any prefixes
> > with identified "system." (but a print warning might be needed...)?
>
>         ^ sorry, unidentified
>

Ok, I will send a patch soon.

Thanks,
Weizhao

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-19  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19  8:56 [PATCH] erofs-utils: xattr: skip NFSv4 xattrs building Weizhao Ouyang
2023-04-19  9:03 ` Gao Xiang
2023-04-19  9:04   ` Gao Xiang
2023-04-19  9:54     ` Weizhao Ouyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).