Whamcloud - gitweb
LU-10371 ptlrpc: check for posix_acl a_entries 95/30495/4
authorThomas Stibor <t.stibor@gsi.de>
Tue, 12 Dec 2017 14:27:30 +0000 (15:27 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Dec 2017 06:49:47 +0000 (06:49 +0000)
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
Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: If2404c89775a5f9077c7d9379d73c8187b796a3a
Reviewed-on: https://review.whamcloud.com/30495
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 66fcf6c..4d80f79 100644 (file)
@@ -4534,10 +4534,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));
                 (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));
        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 */
 #endif /* CONFIG_FS_POSIX_ACL */
 
        /* Checks for struct link_ea_header */
@@ -5388,4 +5390,3 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
                 (long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
 }
        LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
                 (long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
 }
-
index af3de37..3269c4b 100644 (file)
@@ -2018,7 +2018,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("#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);
        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_entries);
+       printf("#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */\n");
        printf("#endif /* CONFIG_FS_POSIX_ACL */\n");
 }
 
        printf("#endif /* CONFIG_FS_POSIX_ACL */\n");
 }
 
index ee3763f..9518361 100644 (file)
@@ -4555,10 +4555,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));
                 (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));
        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 */
 #endif /* CONFIG_FS_POSIX_ACL */
 
        /* Checks for struct link_ea_header */