Skip to contentSkip to conversation

erofs-utils: xattr: skip NFSv4 xattrs building

PATCH In review Weizhao Ouyang 2 participants 4 messages Apr 19, 2023 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: xattr: skip NFSv4 xattrs building

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

---
 lib/xattr.c | 3 +++
 1 file changed, 3 insertions(+)
lib/xattr.c +3 -0
index 6034e7b6b4eb..748bf2e13408 100644
@@ -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;
 }
 
Signature · 1 line
2.25.1
#1 lore raw

Hi Weizhao,

Quoted 4 lines · Weizhao Ouyang

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

Thanks for the catch! Could we ignore any prefixes
with identified "system." (but a print warning might be needed...)?

Thanks,
Gao Xiang

Quoted 18 lines
---
  lib/xattr.c | 3 +++
  1 file changed, 3 insertions(+)
lib/xattr.c +3 -0
index 6034e7b6b4eb..748bf2e13408 100644
@@ -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 lore raw
Quoted 9 lines · Gao Xiang

Hi Weizhao,

Quoted 4 lines · Weizhao Ouyang

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

Thanks for the catch! Could we ignore any prefixes
with identified "system." (but a print warning might be needed...)?

^ sorry, unidentified

Quoted 22 lines

Thanks,
Gao Xiang

Quoted 17 lines

---
  lib/xattr.c | 3 +++

  1 file changed, 3 insertions(+)
lib/xattr.c +3 -0
index 6034e7b6b4eb..748bf2e13408 100644
@@ -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;
   }
#3 lore raw
Quoted 7 lines · Gao Xiang
Quoted 3 lines · Gao Xiang

Hi Weizhao,

On 2023/4/19 16:56, Weizhao Ouyang wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

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

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