#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... */
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));
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));
}