*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <stdio.h>
#include <string.h>
-#include <lustre/lustre_idl.h>
-#include <lustre/lustre_lfsck_user.h>
-#include <lustre_disk.h>
+#include <linux/lustre/lustre_idl.h>
+#include <linux/lustre/lustre_lfsck_user.h>
+#include <linux/lustre/lustre_disk.h>
-#undef LASSERT
-#undef LASSERTF
#define LASSERT(cond) if (!(cond)) { printf("failed " #cond "\n"); ret = 1; }
#define LASSERTF(cond, fmt, ...) if (!(cond)) { printf("failed '" #cond "'" fmt, ## __VA_ARGS__);ret = 1;}
+/*
+ * Compile-time LASSERT, which verifies correctness at compile-time rather
+ * than runtime. If "cond" is true, then there are two different cases
+ * ("(non-zero)" and "0"). If "cond" is false, then there are two identical
+ * cases ("0" and "0"), which is an error that causes the compiler to complain.
+ */
+#define CLASSERT(cond) do {switch (1) {case (cond): case 0: break; } } while (0)
int ret;
return ret;
}
+
void lustre_assert_wire_constants(void)
{
- /* Wire protocol assertions generated by 'wirecheck'
- * (make -C lustre/utils newwiretest)
- * running on Linux centss05 2.6.32.431.29.2.el6_lustre #1 SMP Tue Sep 23 16:06:38 CDT 2014 x
- * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) */
-
+ /* Wire protocol assertions generated by 'wirecheck'
+ * (make -C lustre/utils newwiretest)
+ */
/* Constants... */
LASSERTF(PTL_RPC_MSG_REQUEST == 4711, "found %lld\n",
(long long)MDS_ATTR_FROM_OPEN);
LASSERTF(MDS_ATTR_BLOCKS == 0x0000000000008000ULL, "found 0x%.16llxULL\n",
(long long)MDS_ATTR_BLOCKS);
+ LASSERTF(MDS_ATTR_PROJID == 0x0000000000010000ULL, "found 0x%.16llxULL\n",
+ (long long)MDS_ATTR_PROJID);
LASSERTF(FLD_QUERY == 900, "found %lld\n",
(long long)FLD_QUERY);
LASSERTF(FLD_READ == 901, "found %lld\n",
(long long)(int)offsetof(struct lustre_mdt_attrs, lma_self_fid));
LASSERTF((int)sizeof(((struct lustre_mdt_attrs *)0)->lma_self_fid) == 16, "found %lld\n",
(long long)(int)sizeof(((struct lustre_mdt_attrs *)0)->lma_self_fid));
+ LASSERTF(LMAC_HSM == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)LMAC_HSM);
+ LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)LMAC_NOT_IN_OI);
+ LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)LMAC_FID_ON_OST);
+ LASSERTF(LMAC_STRIPE_INFO == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)LMAC_STRIPE_INFO);
+ LASSERTF(LMAC_COMP_INFO == 0x00000020UL, "found 0x%.8xUL\n",
+ (unsigned)LMAC_COMP_INFO);
LASSERTF(LMAI_RELEASED == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)LMAI_RELEASED);
LASSERTF(LMAI_AGENT == 0x00000002UL, "found 0x%.8xUL\n",
(unsigned)LMAI_STRIPED);
LASSERTF(LMAI_ORPHAN == 0x00000010UL, "found 0x%.8xUL\n",
(unsigned)LMAI_ORPHAN);
- LASSERTF(LMAC_HSM == 0x00000001UL, "found 0x%.8xUL\n",
- (unsigned)LMAC_HSM);
- LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n",
- (unsigned)LMAC_NOT_IN_OI);
- LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n",
- (unsigned)LMAC_FID_ON_OST);
+
+ /* Checks for struct lustre_ost_attrs */
+ LASSERTF((int)sizeof(struct lustre_ost_attrs) == 64, "found %lld\n",
+ (long long)(int)sizeof(struct lustre_ost_attrs));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_lma) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_lma));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_lma) == 24, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_lma));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_parent_fid) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_parent_fid));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_parent_fid) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_parent_fid));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_stripe_size) == 40, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_stripe_size));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_stripe_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_stripe_size));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_id) == 44, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_id));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_id));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_start) == 48, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_start));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_start) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_start));
+ LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_end) == 56, "found %lld\n",
+ (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_end));
+ LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_end) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_end));
LASSERTF(OUT_CREATE == 1, "found %lld\n",
(long long)OUT_CREATE);
LASSERTF(OUT_DESTROY == 2, "found %lld\n",
LASSERTF((int)sizeof(union lu_page) == 4096, "found %lld\n",
(long long)(int)sizeof(union lu_page));
+ /* Checks for struct lu_ladvise */
+ LASSERTF((int)sizeof(struct lu_ladvise) == 32, "found %lld\n",
+ (long long)(int)sizeof(struct lu_ladvise));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_advice) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_advice));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_advice) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_advice));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_value1) == 2, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_value1));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value1) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value1));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_value2) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_value2));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value2) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value2));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_start) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_start));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_start) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_start));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_end) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_end));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_end) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_end));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_value3) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_value3));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value3) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value3));
+ LASSERTF((int)offsetof(struct lu_ladvise, lla_value4) == 28, "found %lld\n",
+ (long long)(int)offsetof(struct lu_ladvise, lla_value4));
+ LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value4) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value4));
+ LASSERTF(LU_LADVISE_WILLREAD == 1, "found %lld\n",
+ (long long)LU_LADVISE_WILLREAD);
+ LASSERTF(LU_LADVISE_DONTNEED == 2, "found %lld\n",
+ (long long)LU_LADVISE_DONTNEED);
+
+ /* Checks for struct ladvise_hdr */
+ LASSERTF((int)sizeof(struct ladvise_hdr) == 32, "found %lld\n",
+ (long long)(int)sizeof(struct ladvise_hdr));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_magic) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_magic));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_magic) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_magic));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_count) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_count));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_count));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_flags) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_flags));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_flags) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_flags));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_value1) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_value1));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value1) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value1));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_value2) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_value2));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value2) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value2));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_value3) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_value3));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value3) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value3));
+ LASSERTF((int)offsetof(struct ladvise_hdr, lah_advise) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct ladvise_hdr, lah_advise));
+ LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_advise) == 0, "found %lld\n",
+ (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_advise));
+ LASSERTF(LF_ASYNC == 1, "found %lld\n",
+ (long long)LF_ASYNC);
+ LASSERTF(LADVISE_MAGIC == 450829536, "found %lld\n",
+ (long long)LADVISE_MAGIC);
+
/* Checks for struct lustre_handle */
LASSERTF((int)sizeof(struct lustre_handle) == 8, "found %lld\n",
(long long)(int)sizeof(struct lustre_handle));
OBD_CONNECT_ACL);
LASSERTF(OBD_CONNECT_XATTR == 0x100ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_XATTR);
- LASSERTF(OBD_CONNECT_CROW == 0x200ULL, "found 0x%.16llxULL\n",
- OBD_CONNECT_CROW);
+ LASSERTF(OBD_CONNECT_LARGE_ACL == 0x200ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_LARGE_ACL);
LASSERTF(OBD_CONNECT_TRUNCLOCK == 0x400ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_TRUNCLOCK);
LASSERTF(OBD_CONNECT_TRANSNO == 0x800ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_TRANSNO);
LASSERTF(OBD_CONNECT_IBITS == 0x1000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_IBITS);
- LASSERTF(OBD_CONNECT_JOIN == 0x2000ULL, "found 0x%.16llxULL\n",
- OBD_CONNECT_JOIN);
+ LASSERTF(OBD_CONNECT_BARRIER == 0x2000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_BARRIER);
LASSERTF(OBD_CONNECT_ATTRFID == 0x4000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_ATTRFID);
LASSERTF(OBD_CONNECT_NODEVOH == 0x8000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_DIR_STRIPE);
LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_SUBTREE);
- LASSERTF(OBD_CONNECT_LOCK_AHEAD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
- OBD_CONNECT_LOCK_AHEAD);
+ LASSERTF(OBD_CONNECT_LOCKAHEAD_OLD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_LOCKAHEAD_OLD);
LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_BULK_MBITS);
LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_OBDOPACK);
LASSERTF(OBD_CONNECT_FLAGS2 == 0x8000000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_FLAGS2);
+ LASSERTF(OBD_CONNECT2_FILE_SECCTX == 0x1ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_FILE_SECCTX);
+ LASSERTF(OBD_CONNECT2_LOCKAHEAD == 0x2ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_LOCKAHEAD);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
LASSERTF(OBD_CKSUM_CRC32C == 0x00000004UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32C);
+ /* Checks for struct ost_layout */
+ LASSERTF((int)sizeof(struct ost_layout) == 28, "found %lld\n",
+ (long long)(int)sizeof(struct ost_layout));
+ LASSERTF((int)offsetof(struct ost_layout, ol_stripe_size) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct ost_layout, ol_stripe_size));
+ LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_stripe_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ost_layout *)0)->ol_stripe_size));
+ LASSERTF((int)offsetof(struct ost_layout, ol_stripe_count) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct ost_layout, ol_stripe_count));
+ LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_stripe_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ost_layout *)0)->ol_stripe_count));
+ LASSERTF((int)offsetof(struct ost_layout, ol_comp_start) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ost_layout, ol_comp_start));
+ LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_start) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_start));
+ LASSERTF((int)offsetof(struct ost_layout, ol_comp_end) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct ost_layout, ol_comp_end));
+ LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_end) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_end));
+ LASSERTF((int)offsetof(struct ost_layout, ol_comp_id) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct ost_layout, ol_comp_id));
+ LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_id));
+
/* Checks for struct obdo */
LASSERTF((int)sizeof(struct obdo) == 208, "found %lld\n",
(long long)(int)sizeof(struct obdo));
(long long)(int)offsetof(struct obdo, o_handle));
LASSERTF((int)sizeof(((struct obdo *)0)->o_handle) == 8, "found %lld\n",
(long long)(int)sizeof(((struct obdo *)0)->o_handle));
- LASSERTF((int)offsetof(struct obdo, o_lcookie) == 136, "found %lld\n",
- (long long)(int)offsetof(struct obdo, o_lcookie));
- LASSERTF((int)sizeof(((struct obdo *)0)->o_lcookie) == 32, "found %lld\n",
- (long long)(int)sizeof(((struct obdo *)0)->o_lcookie));
+ LASSERTF((int)offsetof(struct obdo, o_layout) == 136, "found %lld\n",
+ (long long)(int)offsetof(struct obdo, o_layout));
+ LASSERTF((int)sizeof(((struct obdo *)0)->o_layout) == 28, "found %lld\n",
+ (long long)(int)sizeof(((struct obdo *)0)->o_layout));
+ LASSERTF((int)offsetof(struct obdo, o_padding_3) == 164, "found %lld\n",
+ (long long)(int)offsetof(struct obdo, o_padding_3));
+ LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct obdo *)0)->o_padding_3));
LASSERTF((int)offsetof(struct obdo, o_uid_h) == 168, "found %lld\n",
(long long)(int)offsetof(struct obdo, o_uid_h));
LASSERTF((int)sizeof(((struct obdo *)0)->o_uid_h) == 4, "found %lld\n",
(long long)(int)offsetof(struct obdo, o_data_version));
LASSERTF((int)sizeof(((struct obdo *)0)->o_data_version) == 8, "found %lld\n",
(long long)(int)sizeof(((struct obdo *)0)->o_data_version));
- LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, "found %lld\n",
+ LASSERTF((int)offsetof(struct obdo, o_projid) == 184, "found %lld\n",
+ (long long)(int)offsetof(struct obdo, o_projid));
+ LASSERTF((int)sizeof(((struct obdo *)0)->o_projid) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct obdo *)0)->o_projid));
+ LASSERTF((int)offsetof(struct obdo, o_padding_4) == 188, "found %lld\n",
(long long)(int)offsetof(struct obdo, o_padding_4));
- LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 8, "found %lld\n",
+ LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 4, "found %lld\n",
(long long)(int)sizeof(((struct obdo *)0)->o_padding_4));
LASSERTF((int)offsetof(struct obdo, o_padding_5) == 192, "found %lld\n",
(long long)(int)offsetof(struct obdo, o_padding_5));
OBD_MD_FLXATTRRM);
LASSERTF(OBD_MD_FLACL == (0x0000008000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLACL);
- LASSERTF(OBD_MD_FLRMTPERM == (0x0000010000000000ULL), "found 0x%.16llxULL\n",
- OBD_MD_FLRMTPERM);
LASSERTF(OBD_MD_FLMDSCAPA == (0x0000020000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLMDSCAPA);
LASSERTF(OBD_MD_FLOSSCAPA == (0x0000040000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLCROSSREF);
LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLGETATTRLOCK);
- LASSERTF(OBD_MD_FLRMTLSETFACL == (0x0001000000000000ULL), "found 0x%.16llxULL\n",
- OBD_MD_FLRMTLSETFACL);
- LASSERTF(OBD_MD_FLRMTLGETFACL == (0x0002000000000000ULL), "found 0x%.16llxULL\n",
- OBD_MD_FLRMTLGETFACL);
- LASSERTF(OBD_MD_FLRMTRSETFACL == (0x0004000000000000ULL), "found 0x%.16llxULL\n",
- OBD_MD_FLRMTRSETFACL);
- LASSERTF(OBD_MD_FLRMTRGETFACL == (0x0008000000000000ULL), "found 0x%.16llxULL\n",
- OBD_MD_FLRMTRGETFACL);
LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLDATAVERSION);
+ LASSERTF(OBD_MD_CLOSE_INTENT_EXECED == (0x0020000000000000ULL), "found 0x%.16llxULL\n",
+ OBD_MD_CLOSE_INTENT_EXECED);
+ LASSERTF(OBD_MD_DEFAULT_MEA == (0x0040000000000000ULL), "found 0x%.16llxULL\n",
+ OBD_MD_DEFAULT_MEA);
+ LASSERTF(OBD_MD_FLOSTLAYOUT == (0x0080000000000000ULL), "found 0x%.16llxULL\n",
+ OBD_MD_FLOSTLAYOUT);
+ LASSERTF(OBD_MD_FLPROJID == (0x0100000000000000ULL), "found 0x%.16llxULL\n",
+ OBD_MD_FLPROJID);
CLASSERT(OBD_FL_INLINEDATA == 0x00000001);
CLASSERT(OBD_FL_OBDMDEXISTS == 0x00000002);
CLASSERT(OBD_FL_DELORPHAN == 0x00000004);
CLASSERT(OBD_FL_NOSPC_BLK == 0x00100000);
CLASSERT(OBD_FL_FLUSH == 0x00200000);
CLASSERT(OBD_FL_SHORT_IO == 0x00400000);
- CLASSERT(OBD_FL_LOCAL_MASK == 0xf0000000);
/* Checks for struct lov_ost_data_v1 */
LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n",
LASSERTF(LOV_PATTERN_CMOBD == 0x00000200UL, "found 0x%.8xUL\n",
(unsigned)LOV_PATTERN_CMOBD);
+ /* Checks for struct lov_comp_md_entry_v1 */
+ LASSERTF((int)sizeof(struct lov_comp_md_entry_v1) == 48, "found %lld\n",
+ (long long)(int)sizeof(struct lov_comp_md_entry_v1));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_id) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_id));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_id));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_flags) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_flags));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_flags));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_extent) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_extent));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_extent) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_extent));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_offset) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_offset));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_offset) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_offset));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_size) == 28, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_size));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding));
+ LASSERTF(LCME_FL_INIT == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)LCME_FL_INIT);
+
+ /* Checks for struct lov_comp_md_v1 */
+ LASSERTF((int)sizeof(struct lov_comp_md_v1) == 32, "found %lld\n",
+ (long long)(int)sizeof(struct lov_comp_md_v1));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_magic) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_magic));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_magic) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_magic));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_size) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_size));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_size));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_layout_gen) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_layout_gen));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_layout_gen) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_layout_gen));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_flags) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_flags));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_flags) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_flags));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_entry_count) == 14, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_entry_count));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entry_count) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entry_count));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_padding1) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_padding1));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding1));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_padding2) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_padding2));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding2) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding2));
+ LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_entries[0]) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_v1, lcm_entries[0]));
+ LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]) == 48, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]));
+ CLASSERT(LOV_MAGIC_COMP_V1 == (0x0BD60000 | 0x0BD0));
+
/* Checks for struct lmv_mds_md_v1 */
LASSERTF((int)sizeof(struct lmv_mds_md_v1) == 56, "found %lld\n",
(long long)(int)sizeof(struct lmv_mds_md_v1));
(long long)(int)offsetof(struct mdt_body, mbo_gid_h));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid_h) == 4, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid_h));
- LASSERTF((int)offsetof(struct mdt_body, mbo_padding_5) == 172, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, mbo_padding_5));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_5) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_5));
+ LASSERTF((int)offsetof(struct mdt_body, mbo_projid) == 172, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, mbo_projid));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_projid) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->mbo_projid));
LASSERTF((int)offsetof(struct mdt_body, mbo_padding_6) == 176, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, mbo_padding_6));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_6) == 8, "found %lld\n",
LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_padding) == 4, "found %lld\n",
(long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_padding));
- /* Checks for struct mdt_remote_perm */
- LASSERTF((int)sizeof(struct mdt_remote_perm) == 32, "found %lld\n",
- (long long)(int)sizeof(struct mdt_remote_perm));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_uid) == 0, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_uid));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_uid) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_uid));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_gid) == 4, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_gid));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_gid) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_gid));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsuid) == 8, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_fsuid));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsgid) == 16, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_fsgid));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_access_perm) == 24, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_access_perm));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm));
- LASSERTF((int)offsetof(struct mdt_remote_perm, rp_padding) == 28, "found %lld\n",
- (long long)(int)offsetof(struct mdt_remote_perm, rp_padding));
- LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_padding) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_padding));
- LASSERTF(CFS_SETUID_PERM == 0x00000001UL, "found 0x%.8xUL\n",
- (unsigned)CFS_SETUID_PERM);
- LASSERTF(CFS_SETGID_PERM == 0x00000002UL, "found 0x%.8xUL\n",
- (unsigned)CFS_SETGID_PERM);
- LASSERTF(CFS_SETGRP_PERM == 0x00000004UL, "found 0x%.8xUL\n",
- (unsigned)CFS_SETGRP_PERM);
- LASSERTF(CFS_RMTACL_PERM == 0x00000008UL, "found 0x%.8xUL\n",
- (unsigned)CFS_RMTACL_PERM);
- LASSERTF(CFS_RMTOWN_PERM == 0x00000010UL, "found 0x%.8xUL\n",
- (unsigned)CFS_RMTOWN_PERM);
-
/* Checks for struct mdt_rec_setattr */
LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, "found %lld\n",
(long long)(int)sizeof(struct mdt_rec_setattr));
(long long)(int)offsetof(struct mdt_rec_setattr, sa_bias));
LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_bias) == 4, "found %lld\n",
(long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_bias));
- LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_3) == 124, "found %lld\n",
- (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_3));
- LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3));
+ LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_projid) == 124, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_rec_setattr, sa_projid));
+ LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_projid) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_projid));
LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_4) == 128, "found %lld\n",
(long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_4));
LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4) == 4, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
/* Checks for struct ldlm_inodebits */
- LASSERTF((int)sizeof(struct ldlm_inodebits) == 8, "found %lld\n",
+ LASSERTF((int)sizeof(struct ldlm_inodebits) == 16, "found %lld\n",
(long long)(int)sizeof(struct ldlm_inodebits));
LASSERTF((int)offsetof(struct ldlm_inodebits, bits) == 0, "found %lld\n",
(long long)(int)offsetof(struct ldlm_inodebits, bits));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->bits) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_inodebits *)0)->bits));
+ LASSERTF((int)offsetof(struct ldlm_inodebits, try_bits) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_inodebits, try_bits));
+ LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->try_bits) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_inodebits *)0)->try_bits));
/* Checks for struct ldlm_flock_wire */
LASSERTF((int)sizeof(struct ldlm_flock_wire) == 32, "found %lld\n",
LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2));
+ /* Checks for struct ldlm_gl_barrier_desc */
+ LASSERTF((int)sizeof(struct ldlm_gl_barrier_desc) == 16, "found %lld\n",
+ (long long)(int)sizeof(struct ldlm_gl_barrier_desc));
+ LASSERTF((int)offsetof(struct ldlm_gl_barrier_desc, lgbd_status) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_barrier_desc, lgbd_status));
+ LASSERTF((int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_status) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_status));
+ LASSERTF((int)offsetof(struct ldlm_gl_barrier_desc, lgbd_timeout) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_barrier_desc, lgbd_timeout));
+ LASSERTF((int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_timeout) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_timeout));
+ LASSERTF((int)offsetof(struct ldlm_gl_barrier_desc, lgbd_padding) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_barrier_desc, lgbd_padding));
+ LASSERTF((int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_padding) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_barrier_desc *)0)->lgbd_padding));
+
+ /* Checks for struct barrier_lvb */
+ LASSERTF((int)sizeof(struct barrier_lvb) == 16, "found %lld\n",
+ (long long)(int)sizeof(struct barrier_lvb));
+ LASSERTF((int)offsetof(struct barrier_lvb, lvb_status) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct barrier_lvb, lvb_status));
+ LASSERTF((int)sizeof(((struct barrier_lvb *)0)->lvb_status) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct barrier_lvb *)0)->lvb_status));
+ LASSERTF((int)offsetof(struct barrier_lvb, lvb_index) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct barrier_lvb, lvb_index));
+ LASSERTF((int)sizeof(((struct barrier_lvb *)0)->lvb_index) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct barrier_lvb *)0)->lvb_index));
+ LASSERTF((int)offsetof(struct barrier_lvb, lvb_padding) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct barrier_lvb, lvb_padding));
+ LASSERTF((int)sizeof(((struct barrier_lvb *)0)->lvb_padding) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct barrier_lvb *)0)->lvb_padding));
+
/* Checks for struct mgs_send_param */
LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
(long long)(int)sizeof(struct mgs_send_param));
(long long)(int)offsetof(struct llog_setattr64_rec, lsr_valid));
LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_valid) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_valid));
- LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_tail) == 56, "found %lld\n",
- (long long)(int)offsetof(struct llog_setattr64_rec, lsr_tail));
- LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_tail) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_tail));
+ LASSERTF((int)offsetof(struct llog_setattr64_rec_v2, lsr_projid) == 56, "found %lld\n",
+ (long long)(int)offsetof(struct llog_setattr64_rec_v2, lsr_projid));
+ LASSERTF((int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_projid) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_projid));
+ LASSERTF((int)offsetof(struct llog_setattr64_rec_v2, lsr_tail) == 80, "found %lld\n",
+ (long long)(int)offsetof(struct llog_setattr64_rec_v2, lsr_tail));
+ LASSERTF((int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail));
/* Checks for struct llog_size_change_rec */
LASSERTF((int)sizeof(struct llog_size_change_rec) == 64, "found %lld\n",
LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, "found %lld\n",
(long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
- /* Checks for struct llog_cookie */
- LASSERTF((int)sizeof(struct llog_cookie) == 32, "found %lld\n",
- (long long)(int)sizeof(struct llog_cookie));
- LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, "found %lld\n",
- (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
- LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, "found %lld\n",
- (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
- LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, "found %lld\n",
- (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
- LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
- LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, "found %lld\n",
- (long long)(int)offsetof(struct llog_cookie, lgc_index));
- LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
- LASSERTF((int)offsetof(struct llog_cookie, lgc_padding) == 28, "found %lld\n",
- (long long)(int)offsetof(struct llog_cookie, lgc_padding));
- LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_padding) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_padding));
-
/* Checks for struct llogd_body */
LASSERTF((int)sizeof(struct llogd_body) == 48, "found %lld\n",
(long long)(int)sizeof(struct llogd_body));
LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_params) == 4096, "found %lld\n",
(long long)(int)sizeof(((struct mgs_target_info *)0)->mti_params));
+ /* Checks for struct mgs_nidtbl_entry */
+ LASSERTF((int)sizeof(struct mgs_nidtbl_entry) == 24, "found %lld\n",
+ (long long)(int)sizeof(struct mgs_nidtbl_entry));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_version) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_version));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_version) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_version));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_instance) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_instance));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_instance) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_instance));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_index) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_index));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_index) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_index));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_length) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_length));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_length) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_length));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_type) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_type));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_type) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_type));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_nid_type) == 21, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_nid_type));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_type) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_type));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_nid_size) == 22, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_nid_size));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_size) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_size));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, mne_nid_count) == 23, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, mne_nid_count));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_count) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->mne_nid_count));
+ LASSERTF((int)offsetof(struct mgs_nidtbl_entry, u.nids[0]) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_nidtbl_entry, u.nids[0]));
+ LASSERTF((int)sizeof(((struct mgs_nidtbl_entry *)0)->u.nids[0]) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_nidtbl_entry *)0)->u.nids[0]));
+
+ /* Checks for struct mgs_config_body */
+ LASSERTF((int)sizeof(struct mgs_config_body) == 80, "found %lld\n",
+ (long long)(int)sizeof(struct mgs_config_body));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_name) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_name));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_name) == 64, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_name));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_offset) == 64, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_offset));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_offset) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_offset));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_type) == 72, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_type));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_type) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_type));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_nm_cur_pass) == 74, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_nm_cur_pass));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_nm_cur_pass) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_nm_cur_pass));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_bits) == 75, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_bits));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_bits) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_bits));
+ LASSERTF((int)offsetof(struct mgs_config_body, mcb_units) == 76, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_body, mcb_units));
+ LASSERTF((int)sizeof(((struct mgs_config_body *)0)->mcb_units) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_body *)0)->mcb_units));
+ CLASSERT(CONFIG_T_CONFIG == 0);
+ CLASSERT(CONFIG_T_SPTLRPC == 1);
+ CLASSERT(CONFIG_T_RECOVER == 2);
+ CLASSERT(CONFIG_T_PARAMS == 3);
+ CLASSERT(CONFIG_T_NODEMAP == 4);
+ CLASSERT(CONFIG_T_BARRIER == 5);
+
+ /* Checks for struct mgs_config_res */
+ LASSERTF((int)sizeof(struct mgs_config_res) == 16, "found %lld\n",
+ (long long)(int)sizeof(struct mgs_config_res));
+ LASSERTF((int)offsetof(struct mgs_config_res, mcr_offset) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_res, mcr_offset));
+ LASSERTF((int)sizeof(((struct mgs_config_res *)0)->mcr_offset) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_res *)0)->mcr_offset));
+ LASSERTF((int)offsetof(struct mgs_config_res, mcr_size) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct mgs_config_res, mcr_size));
+ LASSERTF((int)sizeof(((struct mgs_config_res *)0)->mcr_size) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mgs_config_res *)0)->mcr_size));
+
/* Checks for struct lustre_capa */
LASSERTF((int)sizeof(struct lustre_capa) == 120, "found %lld\n",
(long long)(int)sizeof(struct lustre_capa));
(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));
+ LASSERTF((int)offsetof(struct link_ea_header, leh_overflow_time) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, leh_overflow_time));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->leh_overflow_time) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->leh_overflow_time));
+ LASSERTF((int)offsetof(struct link_ea_header, leh_padding) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct link_ea_header, leh_padding));
+ LASSERTF((int)sizeof(((struct link_ea_header *)0)->leh_padding) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_header *)0)->leh_padding));
CLASSERT(LINK_EA_MAGIC == 0x11EAF1DFUL);
/* Checks for struct link_ea_entry */
(long long)(int)offsetof(struct lfsck_request, lr_fid2));
LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid2) == 16, "found %lld\n",
(long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid2));
- LASSERTF((int)offsetof(struct lfsck_request, lr_fid3) == 64, "found %lld\n",
- (long long)(int)offsetof(struct lfsck_request, lr_fid3));
- LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid3) == 16, "found %lld\n",
- (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid3));
- LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 80, "found %lld\n",
+ LASSERTF((int)offsetof(struct lfsck_request, lr_comp_id) == 64, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_comp_id));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_comp_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_comp_id));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_0) == 68, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_padding_0));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_0) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_0));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 72, "found %lld\n",
(long long)(int)offsetof(struct lfsck_request, lr_padding_1));
LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_1) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_1));
- LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 88, "found %lld\n",
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 80, "found %lld\n",
(long long)(int)offsetof(struct lfsck_request, lr_padding_2));
LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_2) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_2));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_3) == 88, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_padding_3));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_3) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_3));
LASSERTF(LFSCK_TYPE_SCRUB == 0x00000000UL, "found 0x%.8xUL\n",
(unsigned)LFSCK_TYPE_SCRUB);
LASSERTF(LFSCK_TYPE_LAYOUT == 0x00000001UL, "found 0x%.8xUL\n",
(long long)LE_STOP);
LASSERTF(LE_QUERY == 7, "found %lld\n",
(long long)LE_QUERY);
- LASSERTF(LE_FID_ACCESSED == 8, "found %lld\n",
- (long long)LE_FID_ACCESSED);
LASSERTF(LE_PEER_EXIT == 9, "found %lld\n",
(long long)LE_PEER_EXIT);
LASSERTF(LE_CONDITIONAL_DESTROY == 10, "found %lld\n",
(long long)LE_CONDITIONAL_DESTROY);
LASSERTF(LE_PAIRS_VERIFY == 11, "found %lld\n",
(long long)LE_PAIRS_VERIFY);
- LASSERTF(LE_SKIP_NLINK_DECLARE == 13, "found %lld\n",
- (long long)LE_SKIP_NLINK_DECLARE);
- LASSERTF(LE_SKIP_NLINK == 14, "found %lld\n",
- (long long)LE_SKIP_NLINK);
LASSERTF(LE_SET_LMV_MASTER == 15, "found %lld\n",
(long long)LE_SET_LMV_MASTER);
LASSERTF(LE_SET_LMV_SLAVE == 16, "found %lld\n",
(long long)(int)offsetof(struct llog_update_record, 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));
-
- /* Checks for struct lu_ladvise */
- LASSERTF((int)sizeof(struct lu_ladvise) == 32, "found %lld\n",
- (long long)(int)sizeof(struct lu_ladvise));
- LASSERTF((int)offsetof(struct lu_ladvise, lla_advice) == 0, "found %lld\n",
- (long long)(int)offsetof(struct lu_ladvise, lla_advice));
- LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_advice) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_advice));
- LASSERTF((int)offsetof(struct lu_ladvise, lla_start) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lu_ladvise, lla_start));
- LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_start) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_start));
- LASSERTF((int)offsetof(struct lu_ladvise, lla_end) == 16, "found %lld\n",
- (long long)(int)offsetof(struct lu_ladvise, lla_end));
- LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_end) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_end));
- LASSERTF((int)offsetof(struct lu_ladvise, lla_padding) == 24, "found %lld\n",
- (long long)(int)offsetof(struct lu_ladvise, lla_padding));
- LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_padding) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_padding));
-
- /* Checks for struct ladvise_hdr */
- LASSERTF(LADVISE_MAGIC == 0x1ADF1CE0, "found 0x%.8x\n",
- LADVISE_MAGIC);
- LASSERTF((int)sizeof(struct ladvise_hdr) == 32, "found %lld\n",
- (long long)(int)sizeof(struct ladvise_hdr));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_magic) == 0, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_magic));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_magic) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_magic));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_count) == 4, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_count));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_count) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_count));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_flags) == 8, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_flags));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_flags) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_flags));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_padding1) == 16, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_padding1));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_padding1) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_padding1));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_padding2) == 24, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_padding2));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_padding2) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_padding2));
- LASSERTF((int)offsetof(struct ladvise_hdr, lah_advise) == 32, "found %lld\n",
- (long long)(int)offsetof(struct ladvise_hdr, lah_advise));
- LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_advise) == 0, "found %lld\n",
- (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_advise));
}
+