From: Thomas Stibor Date: Tue, 12 Dec 2017 14:27:30 +0000 (+0100) Subject: LU-10371 ptlrpc: check for posix_acl a_entries X-Git-Tag: 2.10.3-RC1~2 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=d3ea5a422f15a50b0705dd3049b5af390ae4bc4b;p=fs%2Flustre-release.git LU-10371 ptlrpc: check for posix_acl a_entries Since commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621 posix_acl_xattr_entry a_entries[0] was removed. Make sure the LASSERTF test works with Kernels after this commit. Test-Parameters: trivial Lustre-change: https://review.whamcloud.com/30495 Lustre-commit: 429ad0e18eccd7261011ee2c7c193b822747e732 Signed-off-by: Thomas Stibor Change-Id: If2404c89775a5f9077c7d9379d73c8187b796a3a Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/30691 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index aabcf68..0e74caf 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -4371,7 +4371,7 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(posix_acl_xattr_header, a_entries)); LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, "found %lld\n", (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries)); -#endif +#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */ #endif /* CONFIG_FS_POSIX_ACL */ /* Checks for struct link_ea_header */ diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 5cb3c3f..6fc5d39 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -1988,7 +1988,9 @@ check_posix_acl_xattr_header(void) printf("#ifdef CONFIG_FS_POSIX_ACL\n"); CHECK_STRUCT_TYPEDEF(posix_acl_xattr_header); CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_version); + printf("#ifndef HAVE_STRUCT_POSIX_ACL_XATTR\n"); CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_entries); + printf("#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */\n"); printf("#endif /* CONFIG_FS_POSIX_ACL */\n"); } diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index ac44c40..cd28a60 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -4384,10 +4384,12 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(posix_acl_xattr_header, a_version)); LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_version) == 4, "found %lld\n", (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_version)); +#ifndef HAVE_STRUCT_POSIX_ACL_XATTR LASSERTF((int)offsetof(posix_acl_xattr_header, a_entries) == 4, "found %lld\n", (long long)(int)offsetof(posix_acl_xattr_header, a_entries)); LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, "found %lld\n", (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries)); +#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */ #endif /* CONFIG_FS_POSIX_ACL */ /* Checks for struct link_ea_header */