#include <obd_class.h>
#include <lustre_net.h>
#include <lustre_disk.h>
-
void lustre_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
* (make -C lustre/utils newwiretest)
- * running on Linux vb1 2.6.18-build.1 #1 SMP Thu Mar 27 14:34:21 MDT 2008 i686 i686 i386 GNU
- * with gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) */
+ * running on Linux lin2 2.6.18-92.1.17-prep #3 Sun Nov 23 14:29:36 IST 2008 i686 i686 i386 G
+ * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-10) */
/* Constants... */
(long long)OST_QUOTACHECK);
LASSERTF(OST_QUOTACTL == 19, " found %lld\n",
(long long)OST_QUOTACTL);
- LASSERTF(OST_LAST_OPC == 20, " found %lld\n",
+ LASSERTF(OST_QUOTA_ADJUST_QUNIT == 20, " found %lld\n",
+ (long long)OST_QUOTA_ADJUST_QUNIT);
+ LASSERTF(OST_LAST_OPC == 21, " found %lld\n",
(long long)OST_LAST_OPC);
LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
(long long)OBD_OBJECT_EOF);
CLASSERT(OBD_CONNECT_JOIN == 0x00002000ULL);
CLASSERT(OBD_CONNECT_ATTRFID == 0x00004000ULL);
CLASSERT(OBD_CONNECT_NODEVOH == 0x00008000ULL);
- CLASSERT(OBD_CONNECT_LCL_CLIENT == 0x00010000ULL);
- CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x00020000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x00010000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x00020000ULL);
CLASSERT(OBD_CONNECT_BRW_SIZE == 0x00040000ULL);
CLASSERT(OBD_CONNECT_QUOTA64 == 0x00080000ULL);
CLASSERT(OBD_CONNECT_MDS_CAPA == 0x00100000ULL);
LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
(long long)(int)sizeof(((struct ll_fid *)0)->f_type));
+ /* Checks for struct lu_fid_pack */
+ LASSERTF((int)sizeof(struct lu_fid_pack) == 17, " found %lld\n",
+ (long long)(int)sizeof(struct lu_fid_pack));
+ LASSERTF((int)offsetof(struct lu_fid_pack, fp_len) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid_pack, fp_len));
+ LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_len) == 1, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_len));
+ LASSERTF((int)offsetof(struct lu_fid_pack, fp_area) == 1, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid_pack, fp_area));
+ LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_area) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_area));
+
/* Checks for struct mds_status_req */
LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
(long long)(int)sizeof(struct mds_status_req));
LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
(long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
+ /* Checks for struct llog_changelog_rec */
+ LASSERTF((int)sizeof(struct llog_changelog_rec) == 88, " found %lld\n",
+ (long long)(int)sizeof(struct llog_changelog_rec));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_hdr) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_hdr));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_hdr) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_hdr));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_flags) == 16, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_flags));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_flags) == 2, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_flags));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_namelen) == 18, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_namelen));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_namelen) == 2, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_namelen));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_type) == 20, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_type));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_type) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_type));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_index) == 24, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_index));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_index) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_index));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_prev) == 32, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_prev));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_prev) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_prev));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_time) == 40, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_time));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_time) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_time));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_tfid) == 48, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_tfid));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_tfid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_tfid));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_pfid) == 64, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_pfid));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_pfid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_pfid));
+ LASSERTF((int)offsetof(struct llog_changelog_rec, cr_tail) == 80, " found %lld\n",
+ (long long)(int)offsetof(struct llog_changelog_rec, cr_tail));
+ LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_tail) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_tail));
+
/* Checks for struct llog_gen */
LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
(long long)(int)sizeof(struct llog_gen));
(long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm));
/* Checks for struct qunit_data */
- LASSERTF((int)sizeof(struct qunit_data) == 16, " found %lld\n",
+ LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n",
(long long)(int)sizeof(struct qunit_data));
LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, " found %lld\n",
(long long)(int)offsetof(struct qunit_data, qd_id));
(long long)(int)offsetof(struct qunit_data, qd_count));
LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 8, " found %lld\n",
(long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
-
- /* Checks for struct qunit_data_old */
- LASSERTF((int)sizeof(struct qunit_data_old) == 16, " found %lld\n",
- (long long)(int)sizeof(struct qunit_data_old));
- LASSERTF((int)offsetof(struct qunit_data_old, qd_id) == 0, " found %lld\n",
- (long long)(int)offsetof(struct qunit_data_old, qd_id));
- LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_id) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_id));
- LASSERTF((int)offsetof(struct qunit_data_old, qd_type) == 4, " found %lld\n",
- (long long)(int)offsetof(struct qunit_data_old, qd_type));
- LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_type) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_type));
- LASSERTF((int)offsetof(struct qunit_data_old, qd_count) == 8, " found %lld\n",
- (long long)(int)offsetof(struct qunit_data_old, qd_count));
- LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_count) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_count));
- LASSERTF((int)offsetof(struct qunit_data_old, qd_isblk) == 12, " found %lld\n",
- (long long)(int)offsetof(struct qunit_data_old, qd_isblk));
- LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_isblk) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_isblk));
+ LASSERTF((int)offsetof(struct qunit_data, qd_qunit) == 16, " found %lld\n",
+ (long long)(int)offsetof(struct qunit_data, qd_qunit));
+ LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_qunit) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct qunit_data *)0)->qd_qunit));
+ LASSERTF((int)offsetof(struct qunit_data, padding) == 24, " found %lld\n",
+ (long long)(int)offsetof(struct qunit_data, padding));
+ LASSERTF((int)sizeof(((struct qunit_data *)0)->padding) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct qunit_data *)0)->padding));
+
+ /* Checks for struct quota_adjust_qunit */
+ LASSERTF((int)sizeof(struct quota_adjust_qunit) == 32, " found %lld\n",
+ (long long)(int)sizeof(struct quota_adjust_qunit));
+ LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_flags) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct quota_adjust_qunit, qaq_flags));
+ LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags));
+ LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_id) == 4, " found %lld\n",
+ (long long)(int)offsetof(struct quota_adjust_qunit, qaq_id));
+ LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id));
+ LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz) == 8, " found %lld\n",
+ (long long)(int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz));
+ LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz));
+ LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz) == 16, " found %lld\n",
+ (long long)(int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz));
+ LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz));
+ LASSERTF((int)offsetof(struct quota_adjust_qunit, padding1) == 24, " found %lld\n",
+ (long long)(int)offsetof(struct quota_adjust_qunit, padding1));
+ LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->padding1) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->padding1));
/* Checks for struct mgs_target_info */
LASSERTF((int)sizeof(struct mgs_target_info) == 4544, " found %lld\n",
LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_entries) == 0, " found %lld\n",
(long long)(int)sizeof(((xattr_acl_header *)0)->a_entries));
#endif
+
+ /* Checks for struct link_ea_header */
+ LASSERTF((int)sizeof(struct link_ea_header) == 24, " found %lld\n",
+ (long long)(int)sizeof(struct link_ea_header));
+ LASSERTF((int)offsetof(struct link_ea_header, leh_magic) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, leh_magic));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->leh_magic) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->leh_magic));
+ LASSERTF((int)offsetof(struct link_ea_header, leh_reccount) == 4, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, leh_reccount));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->leh_reccount) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->leh_reccount));
+ LASSERTF((int)offsetof(struct link_ea_header, leh_len) == 8, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, leh_len));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->leh_len) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->leh_len));
+ LASSERTF((int)offsetof(struct link_ea_header, padding1) == 16, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, padding1));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->padding1) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->padding1));
+ LASSERTF((int)offsetof(struct link_ea_header, padding2) == 20, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, padding2));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->padding2) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->padding2));
+
+ /* Checks for struct link_ea_entry */
+ LASSERTF((int)sizeof(struct link_ea_entry) == 19, " found %lld\n",
+ (long long)(int)sizeof(struct link_ea_entry));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_reclen));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_reclen) == 2, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_reclen));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 2, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 17, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 19, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_name));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_name) == 0, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_name));
}