# include <liblustre.h>
#endif
+#ifdef __KERNEL__
+# ifndef AUTOCONF_INCLUDED
+# include <linux/config.h>
+# endif
+# ifdef CONFIG_FS_POSIX_ACL
+# include <linux/fs.h>
+# ifdef HAVE_XATTR_ACL
+# include <linux/xattr_acl.h>
+# else
+# define xattr_acl_entry posix_acl_xattr_entry
+# define xattr_acl_header posix_acl_xattr_header
+# endif
+# ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
+# include <linux/posix_acl_xattr.h>
+# endif
+# endif
+#endif
+
#include <obd_support.h>
#include <obd_class.h>
#include <lustre_net.h>
void lustre_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
- * (make -C lustre/utils newwirecheck)
- * running on Linux vmbuild 2.6.9-build #1 SMP Sat Apr 7 11:21:22 MDT 2007 i686 i686 i386 GNU
- * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-4) */
+ * (make -C lustre/utils newwiretest)
+ * running on Linux xlab.hostel 2.6.23.12-52.fc7 #1 SMP Tue Dec 18 21:18:02 EST 2007 i686 i68
+ * with gcc версия 3.4.6 20060404 (Red Hat 3.4.6-7) */
/* Constants... */
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllg) == 4, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllg));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_transno) == 40, " found %lld\n",
- (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
+ (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_transno) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_transno));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_group) == 48, " found %lld\n",
CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
- CLASSERT(OBD_CKSUM_CRC32 == (0x00000001));
- CLASSERT(OBD_CKSUM_ADLER == (0x00000002));
+ CLASSERT(OBD_CKSUM_CRC32 == 1);
+ CLASSERT(OBD_CKSUM_ADLER == 2);
/* Checks for struct lov_mds_md_v1 */
LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
(long long)(int)offsetof(struct lustre_disk_data, ldd_params));
LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
(long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
+#ifdef LIBLUSTRE_POSIX_ACL
+
+ /* Checks for type posix_acl_xattr_entry */
+ LASSERTF((int)sizeof(xattr_acl_entry) == 8, " found %lld\n",
+ (long long)(int)sizeof(xattr_acl_entry));
+ LASSERTF((int)offsetof(xattr_acl_entry, e_tag) == 0, " found %lld\n",
+ (long long)(int)offsetof(xattr_acl_entry, e_tag));
+ LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_tag) == 2, " found %lld\n",
+ (long long)(int)sizeof(((xattr_acl_entry *)0)->e_tag));
+ LASSERTF((int)offsetof(xattr_acl_entry, e_perm) == 2, " found %lld\n",
+ (long long)(int)offsetof(xattr_acl_entry, e_perm));
+ LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_perm) == 2, " found %lld\n",
+ (long long)(int)sizeof(((xattr_acl_entry *)0)->e_perm));
+ LASSERTF((int)offsetof(xattr_acl_entry, e_id) == 4, " found %lld\n",
+ (long long)(int)offsetof(xattr_acl_entry, e_id));
+ LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_id) == 4, " found %lld\n",
+ (long long)(int)sizeof(((xattr_acl_entry *)0)->e_id));
+
+ /* Checks for type posix_acl_xattr_header */
+ LASSERTF((int)sizeof(xattr_acl_header) == 4, " found %lld\n",
+ (long long)(int)sizeof(xattr_acl_header));
+ LASSERTF((int)offsetof(xattr_acl_header, a_version) == 0, " found %lld\n",
+ (long long)(int)offsetof(xattr_acl_header, a_version));
+ LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_version) == 4, " found %lld\n",
+ (long long)(int)sizeof(((xattr_acl_header *)0)->a_version));
+ LASSERTF((int)offsetof(xattr_acl_header, a_entries) == 4, " found %lld\n",
+ (long long)(int)offsetof(xattr_acl_header, a_entries));
+ LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_entries) == 0, " found %lld\n",
+ (long long)(int)sizeof(((xattr_acl_header *)0)->a_entries));
+#endif
}
CHECK_CDEFINE(OBD_FL_TRUNCLOCK);
CHECK_CDEFINE(OBD_FL_CKSUM_CRC32);
CHECK_CDEFINE(OBD_FL_CKSUM_ADLER);
- CHECK_CDEFINE(OBD_CKSUM_CRC32);
- CHECK_CDEFINE(OBD_CKSUM_ADLER);
+ CHECK_CVALUE(OBD_CKSUM_CRC32);
+ CHECK_CVALUE(OBD_CKSUM_ADLER);
}
static void
printf ("void lustre_assert_wire_constants(void)\n"
"{\n"
" /* Wire protocol assertions generated by 'wirecheck'\n"
- " * (make -C lustre/utils newwirecheck)\n"
+ " * (make -C lustre/utils newwiretest)\n"
" * running on %s\n"
" * with %s */\n"
"\n", unameinfo, gccinfo);
CHECK_VALUE(LCK_NL);
CHECK_VALUE(LCK_GROUP);
CHECK_VALUE(LCK_MAXMODE);
+ CHECK_VALUE(LCK_MODE_NUM);
CHECK_CVALUE(LDLM_PLAIN);
CHECK_CVALUE(LDLM_EXTENT);
check_quota_adjust_qunit();
check_mgs_target_info();
check_lustre_disk_data();
-#ifdef LIBLUSTRE_POSIX_ACL
+ printf("#ifdef LIBLUSTRE_POSIX_ACL\n");
check_posix_acl_xattr_entry();
check_posix_acl_xattr_header();
-#endif
+ printf("#endif\n");
printf("}\n\n");
void lustre_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
- * (make -C lustre/utils newwirecheck)
- * running on Linux vmbuild 2.6.9-build #1 SMP Sat Apr 7 11:21:22 MDT 2007 i686 i686 i386 GNU
- * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-4) */
+ * (make -C lustre/utils newwiretest)
+ * running on Linux xlab.hostel 2.6.23.12-52.fc7 #1 SMP Tue Dec 18 21:18:02 EST 2007 i686 i68
+ * with gcc версия 3.4.6 20060404 (Red Hat 3.4.6-7) */
/* Constants... */
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllg) == 4, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllg));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_transno) == 40, " found %lld\n",
- (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
+ (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_transno) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_transno));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_group) == 48, " found %lld\n",
CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
- CLASSERT(OBD_CKSUM_CRC32 == (0x00000001));
- CLASSERT(OBD_CKSUM_ADLER == (0x00000002));
+ CLASSERT(OBD_CKSUM_CRC32 == 1);
+ CLASSERT(OBD_CKSUM_ADLER == 2);
/* Checks for struct lov_mds_md_v1 */
LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
(long long)(int)offsetof(struct lustre_disk_data, ldd_params));
LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
(long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
-
#ifdef LIBLUSTRE_POSIX_ACL
+
/* Checks for type posix_acl_xattr_entry */
LASSERTF((int)sizeof(xattr_acl_entry) == 8, " found %lld\n",
(long long)(int)sizeof(xattr_acl_entry));