Skip to contentSkip to conversation

generic/529: use an ACL that doesn't confuse NFS

PATCH In review J. Bruce Fields 2 participants 2 messages Dec 19, 2019 – Jan 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/529: use an ACL that doesn't confuse NFS

From: "J. Bruce Fields" <[email protected]>

For historical reasons having to do with Solaris ACL behavior, the Linux client treats an ACL like the one used as an example here as equivalent to a mode, causing listxattr to report that no ACL is set on the file.

(See the comment at the top of fs/nfs_common/nfsacl.c in the kernel source for details, and the "bogus ACL_MASK entry" comment in the same source file.) This causes a spurious generic/529 failure on NFS.

As far as I can tell any ACL should trigger the original XFS problem. So, modify it so as not to hit this odd NFS corner case.

---
 src/t_attr_corruption.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/t_attr_corruption.c +1 -1
index e7d435b1791f..b5513d44a288 100644
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
 		.e = {
 			{htole16(1), 0, 0},
 			{htole16(4), 0, 0},
-			{htole16(0x10), 0, 0},
+			{htole16(0x10), htole16(4), 0},
 			{htole16(0x20), 0, 0},
 		},
 	};
Signature · 1 line
2.24.1
#1 lore raw
Quoted 9 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

For historical reasons having to do with Solaris ACL behavior, the Linux client treats an ACL like the one used as an example here as equivalent to a mode, causing listxattr to report that no ACL is set on the file.

(See the comment at the top of fs/nfs_common/nfsacl.c in the kernel source for details, and the "bogus ACL_MASK entry" comment in the same source file.) This causes a spurious generic/529 failure on NFS.

Thanks Bruce very much for the fix!

Murphy

Quoted 25 lines

As far as I can tell any ACL should trigger the original XFS problem. So, modify it so as not to hit this odd NFS corner case.

---
 src/t_attr_corruption.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/t_attr_corruption.c +1 -1
index e7d435b1791f..b5513d44a288 100644
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
 		.e = {
 			{htole16(1), 0, 0},
 			{htole16(4), 0, 0},
-			{htole16(0x10), 0, 0},
+			{htole16(0x10), htole16(4), 0},
 			{htole16(0x20), 0, 0},
 		},
 	};
Signature · 1 line
2.24.1