X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fwiretest.c;h=790f861416fe7a6eef4c2d50b0bf183f7cc35812;hb=8901d15087b224610a26c829635d5d305b02307b;hp=fa5074b5f95b44f283221acf187be219b38268f0;hpb=070c5389e4fc1f921ef74220d703966fa61a6919;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index fa5074b..790f861 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1,28 +1,81 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * GPL HEADER START + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). + * + * 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. + * + * GPL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + */ + #define DEBUG_SUBSYSTEM S_RPC #ifndef __KERNEL__ # include #endif +#ifdef __KERNEL__ +# ifndef AUTOCONF_INCLUDED +# include +# endif +# ifdef CONFIG_FS_POSIX_ACL +# include +# ifdef HAVE_XATTR_ACL +# include +# 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 +# endif +# endif +#endif + #include #include #include #include - void lustre_assert_wire_constants(void) { /* Wire protocol assertions generated by 'wirecheck' - * (make -C lustre/utils newwirecheck) - * running on Linux hideous 2.6.9-prep.qp3.5.34.4qsnet #3 Mon Aug 13 08:38:55 EEST 2007 i686 - * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-3) */ + * (make -C lustre/utils newwiretest) + * running on Linux lin3 2.6.18-128.1.1-prep #1 SMP Wed Mar 4 23:08:37 MST 2009 i686 i686 i38 + * with gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) */ /* Constants... */ - LASSERTF(LUSTRE_MSG_MAGIC_V1 == 0x0BD00BD0," found %lld\n", - (long long)LUSTRE_MSG_MAGIC_V1); LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0BD00BD3," found %lld\n", (long long)LUSTRE_MSG_MAGIC_V2); LASSERTF(PTLRPC_MSG_VERSION == 0x00000003," found %lld\n", (long long)PTLRPC_MSG_VERSION); + LASSERTF(MSGHDR_AT_SUPPORT == 1, " found %lld\n", + (long long)MSGHDR_AT_SUPPORT); LASSERTF(PTL_RPC_MSG_REQUEST == 4711, " found %lld\n", (long long)PTL_RPC_MSG_REQUEST); LASSERTF(PTL_RPC_MSG_ERR == 4712, " found %lld\n", @@ -75,7 +128,9 @@ void lustre_assert_wire_constants(void) (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); @@ -111,7 +166,17 @@ void lustre_assert_wire_constants(void) (long long)MDS_QUOTACHECK); LASSERTF(MDS_QUOTACTL == 48, " found %lld\n", (long long)MDS_QUOTACTL); - LASSERTF(MDS_LAST_OPC == 53, " found %lld\n", + LASSERTF(MDS_GETXATTR == 49, " found %lld\n", + (long long)MDS_GETXATTR); + LASSERTF(MDS_SETXATTR == 50, " found %lld\n", + (long long)MDS_SETXATTR); + LASSERTF(MDS_WRITEPAGE == 51, " found %lld\n", + (long long)MDS_WRITEPAGE); + LASSERTF(MDS_IS_SUBDIR == 52, " found %lld\n", + (long long)MDS_IS_SUBDIR); + LASSERTF(MDS_GET_INFO == 53, " found %lld\n", + (long long)MDS_GET_INFO); + LASSERTF(MDS_LAST_OPC == 54, " found %lld\n", (long long)MDS_LAST_OPC); LASSERTF(REINT_SETATTR == 1, " found %lld\n", (long long)REINT_SETATTR); @@ -125,7 +190,7 @@ void lustre_assert_wire_constants(void) (long long)REINT_RENAME); LASSERTF(REINT_OPEN == 6, " found %lld\n", (long long)REINT_OPEN); - LASSERTF(REINT_MAX == 7, " found %lld\n", + LASSERTF(REINT_MAX == 8, " found %lld\n", (long long)REINT_MAX); LASSERTF(MGS_CONNECT == 250, " found %lld\n", (long long)MGS_CONNECT); @@ -183,8 +248,10 @@ void lustre_assert_wire_constants(void) (long long)LCK_NL); LASSERTF(LCK_GROUP == 64, " found %lld\n", (long long)LCK_GROUP); - LASSERTF(LCK_MAXMODE == 65, " found %lld\n", + LASSERTF(LCK_MAXMODE == 129, " found %lld\n", (long long)LCK_MAXMODE); + LASSERTF(LCK_MODE_NUM == 8, " found %lld\n", + (long long)LCK_MODE_NUM); CLASSERT(LDLM_PLAIN == 10); CLASSERT(LDLM_EXTENT == 11); CLASSERT(LDLM_FLOCK == 12); @@ -227,62 +294,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_handle *)0)->cookie)); - /* Checks for struct lustre_msg_v1 */ - LASSERTF((int)sizeof(struct lustre_msg_v1) == 64, " found %lld\n", - (long long)(int)sizeof(struct lustre_msg_v1)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_handle) == 0, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_handle)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle) == 8, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_magic) == 8, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_magic)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_type) == 12, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_type)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_type) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_type)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_version) == 16, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_version)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_version) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_version)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_opc) == 20, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_opc)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_xid) == 24, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_last_xid)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid) == 8, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_committed) == 32, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_last_committed)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed) == 8, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_transno) == 40, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_transno)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno) == 8, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_status) == 48, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_status)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_status) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_status)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_flags) == 52, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_flags)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_conn_cnt) == 56, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_conn_cnt)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_bufcount) == 60, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_bufcount)); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount)); - LASSERTF((int)offsetof(struct lustre_msg_v1, lm_buflens[0]) == 64, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v1, lm_buflens[0])); - LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0])); - /* Checks for struct lustre_msg_v2 */ LASSERTF((int)sizeof(struct lustre_msg_v2) == 32, " found %lld\n", (long long)(int)sizeof(struct lustre_msg_v2)); @@ -302,14 +313,14 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct lustre_msg_v2, lm_repsize)); LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize)); - LASSERTF((int)offsetof(struct lustre_msg_v2, lm_timeout) == 16, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v2, lm_timeout)); - LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_timeout) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_timeout)); - LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_1) == 20, " found %lld\n", - (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_1)); - LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_1) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_1)); + LASSERTF((int)offsetof(struct lustre_msg_v2, lm_cksum) == 16, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg_v2, lm_cksum)); + LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum)); + LASSERTF((int)offsetof(struct lustre_msg_v2, lm_flags) == 20, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg_v2, lm_flags)); + LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags)); LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_2) == 24, " found %lld\n", (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_2)); LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2) == 4, " found %lld\n", @@ -322,10 +333,9 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0])); LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0])); - LASSERT(offsetof(struct lustre_msg_v1, lm_magic) == offsetof(struct lustre_msg_v2, lm_magic)); /* Checks for struct ptlrpc_body */ - LASSERTF((int)sizeof(struct ptlrpc_body) == 88, " found %lld\n", + LASSERTF((int)sizeof(struct ptlrpc_body) == 152, " found %lld\n", (long long)(int)sizeof(struct ptlrpc_body)); LASSERTF((int)offsetof(struct ptlrpc_body, pb_handle) == 0, " found %lld\n", (long long)(int)offsetof(struct ptlrpc_body, pb_handle)); @@ -375,14 +385,14 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct ptlrpc_body, pb_conn_cnt)); LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt) == 4, " found %lld\n", (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt)); - LASSERTF((int)offsetof(struct ptlrpc_body, pb_padding_1) == 68, " found %lld\n", - (long long)(int)offsetof(struct ptlrpc_body, pb_padding_1)); - LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_padding_1) == 4, " found %lld\n", - (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_padding_1)); - LASSERTF((int)offsetof(struct ptlrpc_body, pb_padding_2) == 72, " found %lld\n", - (long long)(int)offsetof(struct ptlrpc_body, pb_padding_2)); - LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_padding_2) == 4, " found %lld\n", - (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_padding_2)); + LASSERTF((int)offsetof(struct ptlrpc_body, pb_timeout) == 68, " found %lld\n", + (long long)(int)offsetof(struct ptlrpc_body, pb_timeout)); + LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_timeout) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_timeout)); + LASSERTF((int)offsetof(struct ptlrpc_body, pb_service_time) == 72, " found %lld\n", + (long long)(int)offsetof(struct ptlrpc_body, pb_service_time)); + LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_service_time) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_service_time)); LASSERTF((int)offsetof(struct ptlrpc_body, pb_slv) == 80, " found %lld\n", (long long)(int)offsetof(struct ptlrpc_body, pb_slv)); LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_slv) == 8, " found %lld\n", @@ -391,6 +401,11 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct ptlrpc_body, pb_limit)); LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_limit) == 4, " found %lld\n", (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_limit)); + CLASSERT(PTLRPC_NUM_VERSIONS == 4); + LASSERTF((int)offsetof(struct ptlrpc_body, pb_pre_versions[4]) == 120, " found %lld\n", + (long long)(int)offsetof(struct ptlrpc_body, pb_pre_versions[4])); + LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_pre_versions[4]) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_pre_versions[4])); /* Checks for struct obd_connect_data */ LASSERTF((int)sizeof(struct obd_connect_data) == 72, " found %lld\n", @@ -435,44 +450,46 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct obd_connect_data, ocd_group)); LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_group) == 4, " found %lld\n", (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_group)); - LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 52, " found %lld\n", + LASSERTF((int)offsetof(struct obd_connect_data, ocd_cksum_types) == 52, " found %lld\n", + (long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types)); + LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, " found %lld\n", + (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types)); + LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 56, " found %lld\n", (long long)(int)offsetof(struct obd_connect_data, padding1)); - LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 4, " found %lld\n", + LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_connect_data *)0)->padding1)); - LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 56, " found %lld\n", + LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 64, " found %lld\n", (long long)(int)offsetof(struct obd_connect_data, padding2)); LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_connect_data *)0)->padding2)); - LASSERTF((int)offsetof(struct obd_connect_data, padding3) == 64, " found %lld\n", - (long long)(int)offsetof(struct obd_connect_data, padding3)); - LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding3) == 8, " found %lld\n", - (long long)(int)sizeof(((struct obd_connect_data *)0)->padding3)); - CLASSERT(OBD_CONNECT_RDONLY == 0x00000001ULL); - CLASSERT(OBD_CONNECT_INDEX == 0x00000002ULL); - CLASSERT(OBD_CONNECT_GRANT == 0x00000008ULL); - CLASSERT(OBD_CONNECT_SRVLOCK == 0x00000010ULL); - CLASSERT(OBD_CONNECT_VERSION == 0x00000020ULL); - CLASSERT(OBD_CONNECT_REQPORTAL == 0x00000040ULL); - CLASSERT(OBD_CONNECT_ACL == 0x00000080ULL); - CLASSERT(OBD_CONNECT_XATTR == 0x00000100ULL); - CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x00000400ULL); - CLASSERT(OBD_CONNECT_IBITS == 0x00001000ULL); - 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_BRW_SIZE == 0x00040000ULL); - CLASSERT(OBD_CONNECT_QUOTA64 == 0x00080000ULL); - CLASSERT(OBD_CONNECT_MDS_CAPA == 0x00100000ULL); - CLASSERT(OBD_CONNECT_OSS_CAPA == 0x00200000ULL); - CLASSERT(OBD_CONNECT_CANCELSET == 0x00400000ULL); - CLASSERT(OBD_CONNECT_SOM == 0x00800000ULL); - CLASSERT(OBD_CONNECT_AT == 0x01000000ULL); - CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x02000000ULL); - CLASSERT(OBD_CONNECT_MDS_MDS == 0x04000000ULL); - CLASSERT(OBD_CONNECT_REAL == 0x08000000ULL); + CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL); + CLASSERT(OBD_CONNECT_INDEX == 0x2ULL); + CLASSERT(OBD_CONNECT_GRANT == 0x8ULL); + CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL); + CLASSERT(OBD_CONNECT_VERSION == 0x20ULL); + CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL); + CLASSERT(OBD_CONNECT_ACL == 0x80ULL); + CLASSERT(OBD_CONNECT_XATTR == 0x100ULL); + CLASSERT(OBD_CONNECT_REAL == 0x8000000ULL); CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL); + CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL); + CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL); + CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL); + CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL); + CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL); + CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x10000ULL); + CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL); + CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL); + CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL); + CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL); + CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL); + CLASSERT(OBD_CONNECT_MDS_MDS == 0x4000000ULL); + CLASSERT(OBD_CONNECT_SOM == 0x800000ULL); + CLASSERT(OBD_CONNECT_AT == 0x1000000ULL); + CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL); + CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL); + CLASSERT(OBD_CONNECT_VBR == 0x80000000ULL); + CLASSERT(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL); /* Checks for struct obdo */ LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n", @@ -565,12 +582,34 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct obdo, o_padding_1)); LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_padding_1)); - LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n", - (long long)(int)offsetof(struct obdo, o_inline)); - LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n", - (long long)(int)sizeof(((struct obdo *)0)->o_inline)); - LASSERTF(OBD_INLINESZ == 80, " found %lld\n", - (long long)OBD_INLINESZ); + LASSERTF((int)offsetof(struct obdo, o_handle) == 128, " found %lld\n", + (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_padding_2) == 168, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_padding_2)); + LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_2) == 8, " found %lld\n", + (long long)(int)sizeof(((struct obdo *)0)->o_padding_2)); + LASSERTF((int)offsetof(struct obdo, o_padding_3) == 176, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_padding_3)); + LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 8, " found %lld\n", + (long long)(int)sizeof(((struct obdo *)0)->o_padding_3)); + LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, " 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", + (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)); + LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, " found %lld\n", + (long long)(int)sizeof(((struct obdo *)0)->o_padding_5)); + LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_padding_6)); + LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, " found %lld\n", + (long long)(int)sizeof(((struct obdo *)0)->o_padding_6)); CLASSERT(OBD_MD_FLID == (0x00000001ULL)); CLASSERT(OBD_MD_FLATIME == (0x00000002ULL)); CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL)); @@ -585,7 +624,6 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL)); CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL)); CLASSERT(OBD_MD_FLGENER == (0x00004000ULL)); - CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL)); CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL)); CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL)); CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL)); @@ -616,6 +654,12 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_FL_DEBUG_CHECK == (0x00000040)); CLASSERT(OBD_FL_NO_USRQUOTA == (0x00000100)); CLASSERT(OBD_FL_NO_GRPQUOTA == (0x00000200)); + CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800)); + CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000)); + CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000)); + CLASSERT(OBD_FL_SHRINK_GRANT == (0x00020000)); + 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", @@ -675,6 +719,67 @@ void lustre_assert_wire_constants(void) LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", (long long)LOV_PATTERN_RAID1); + /* Checks for struct lov_mds_md_v3 */ + LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, " found %lld\n", + (long long)(int)sizeof(struct lov_mds_md_v3)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_magic) == 0, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_magic)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_magic) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_magic)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pattern) == 4, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_pattern)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_id) == 8, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_id)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id) == 8, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_gr) == 16, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_gr)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_gr) == 8, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_gr)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_size) == 24, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_size)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_count) == 28, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_count)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_count) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_count)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pool_name) == 32, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_pool_name)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name) == 16, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name)); + LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_objects) == 48, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects)); + LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects) == 0, " found %lld\n", + (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects)); + + /* Checks for struct lov_ost_data_v1 */ + LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n", + (long long)(int)sizeof(struct lov_ost_data_v1)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id)); + LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n", + (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr)); + LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n", + (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen)); + LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx)); + LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n", + (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx)); + CLASSERT(LOV_MAGIC_V3 == 0x0BD30BD0); + LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n", + (long long)LOV_PATTERN_RAID0); + LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", + (long long)LOV_PATTERN_RAID1); + /* Checks for struct lov_mds_md_join */ LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n", (long long)(int)sizeof(struct lov_mds_md_join)); @@ -1150,22 +1255,22 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags)); - CLASSERT(MDS_ATTR_MODE == 1); - CLASSERT(MDS_ATTR_UID == 2); - CLASSERT(MDS_ATTR_GID == 4); - CLASSERT(MDS_ATTR_SIZE == 8); - CLASSERT(MDS_ATTR_ATIME == 16); - CLASSERT(MDS_ATTR_MTIME == 32); - CLASSERT(MDS_ATTR_CTIME == 64); - CLASSERT(MDS_ATTR_ATIME_SET == 128); - CLASSERT(MDS_ATTR_MTIME_SET == 256); - CLASSERT(MDS_ATTR_FORCE == 512); - CLASSERT(MDS_ATTR_ATTR_FLAG == 1024); - CLASSERT(MDS_ATTR_KILL_SUID == 2048); - CLASSERT(MDS_ATTR_KILL_SGID == 4096); - CLASSERT(MDS_ATTR_CTIME_SET == 8192); - CLASSERT(MDS_ATTR_FROM_OPEN == 16384); - CLASSERT(MDS_ATTR_BLOCKS == 32768); + CLASSERT(MDS_ATTR_MODE == 0x1ULL); + CLASSERT(MDS_ATTR_UID == 0x2ULL); + CLASSERT(MDS_ATTR_GID == 0x4ULL); + CLASSERT(MDS_ATTR_SIZE == 0x8ULL); + CLASSERT(MDS_ATTR_ATIME == 0x10ULL); + CLASSERT(MDS_ATTR_MTIME == 0x20ULL); + CLASSERT(MDS_ATTR_CTIME == 0x40ULL); + CLASSERT(MDS_ATTR_ATIME_SET == 0x80ULL); + CLASSERT(MDS_ATTR_MTIME_SET == 0x100ULL); + CLASSERT(MDS_ATTR_FORCE == 0x200ULL); + CLASSERT(MDS_ATTR_ATTR_FLAG == 0x400ULL); + CLASSERT(MDS_ATTR_KILL_SUID == 0x800ULL); + CLASSERT(MDS_ATTR_KILL_SGID == 0x1000ULL); + CLASSERT(MDS_ATTR_CTIME_SET == 0x2000ULL); + CLASSERT(MDS_ATTR_FROM_OPEN == 0x4000ULL); + CLASSERT(MDS_ATTR_BLOCKS == 0x8000ULL); /* Checks for struct mds_rec_create */ LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n", @@ -1559,6 +1664,38 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks)); + /* Checks for struct cfg_marker */ + LASSERTF((int)sizeof(struct cfg_marker) == 160, " found %lld\n", + (long long)(int)sizeof(struct cfg_marker)); + LASSERTF((int)offsetof(struct cfg_marker, cm_step) == 0, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_step)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_step) == 4, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_step)); + LASSERTF((int)offsetof(struct cfg_marker, cm_flags) == 4, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_flags)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_flags) == 4, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_flags)); + LASSERTF((int)offsetof(struct cfg_marker, cm_vers) == 8, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_vers)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_vers) == 4, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_vers)); + LASSERTF((int)offsetof(struct cfg_marker, cm_createtime) == 16, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_createtime)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_createtime) == 8, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_createtime)); + LASSERTF((int)offsetof(struct cfg_marker, cm_canceltime) == 24, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_canceltime)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_canceltime) == 8, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_canceltime)); + LASSERTF((int)offsetof(struct cfg_marker, cm_tgtname) == 32, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_tgtname)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_tgtname) == 64, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_tgtname)); + LASSERTF((int)offsetof(struct cfg_marker, cm_comment) == 96, " found %lld\n", + (long long)(int)offsetof(struct cfg_marker, cm_comment)); + LASSERTF((int)sizeof(((struct cfg_marker *)0)->cm_comment) == 64, " found %lld\n", + (long long)(int)sizeof(((struct cfg_marker *)0)->cm_comment)); + /* Checks for struct llog_logid */ LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n", (long long)(int)sizeof(struct llog_logid)); @@ -1688,10 +1825,10 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct llog_create_rec, lcr_oid)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid)); - LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n", - (long long)(int)offsetof(struct llog_create_rec, lcr_ogen)); - LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n", - (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen)); + LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogr) == 40, " found %lld\n", + (long long)(int)offsetof(struct llog_create_rec, lcr_ogr)); + LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogr) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogr)); LASSERTF((int)offsetof(struct llog_create_rec, padding) == 44, " found %lld\n", (long long)(int)offsetof(struct llog_create_rec, padding)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->padding) == 4, " found %lld\n", @@ -1732,14 +1869,14 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct llog_unlink_rec, lur_oid)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid)); - LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n", - (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen)); - LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n", - (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen)); - LASSERTF((int)offsetof(struct llog_unlink_rec, padding) == 28, " found %lld\n", - (long long)(int)offsetof(struct llog_unlink_rec, padding)); - LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->padding) == 4, " found %lld\n", - (long long)(int)sizeof(((struct llog_unlink_rec *)0)->padding)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogr) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_ogr)); + LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogr) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogr)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_count) == 28, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_count)); + LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_count) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_count)); LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n", (long long)(int)offsetof(struct llog_unlink_rec, lur_tail)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n", @@ -1756,10 +1893,10 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct llog_setattr_rec, lsr_oid)); LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid)); - LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_ogen) == 24, " found %lld\n", - (long long)(int)offsetof(struct llog_setattr_rec, lsr_ogen)); - LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen) == 4, " found %lld\n", - (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen)); + LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_ogr) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr_rec, lsr_ogr)); + LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogr) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogr)); LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_uid) == 28, " found %lld\n", (long long)(int)offsetof(struct llog_setattr_rec, lsr_uid)); LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid) == 4, " found %lld\n", @@ -1777,6 +1914,46 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail)); + /* Checks for struct llog_setattr64_rec */ + LASSERTF((int)sizeof(struct llog_setattr64_rec) == 56, " found %lld\n", + (long long)(int)sizeof(struct llog_setattr64_rec)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_hdr)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_hdr) == 16, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_hdr)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_oid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_oid)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_oid) == 8, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_oid)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_ogr) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_ogr)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_ogr) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_ogr)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, padding) == 28, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, padding)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->padding) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->padding)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_uid) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_uid)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_uid) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_uid)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_uid_h) == 36, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_uid_h)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_uid_h) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_uid_h)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_gid) == 40, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_gid)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_gid) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_gid)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_gid_h) == 44, " found %lld\n", + (long long)(int)offsetof(struct llog_setattr64_rec, lsr_gid_h)); + LASSERTF((int)sizeof(((struct llog_setattr64_rec *)0)->lsr_gid_h) == 4, " found %lld\n", + (long long)(int)sizeof(((struct llog_setattr64_rec *)0)->lsr_gid_h)); + LASSERTF((int)offsetof(struct llog_setattr64_rec, lsr_tail) == 48, " 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)); + /* Checks for struct llog_size_change_rec */ LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n", (long long)(int)sizeof(struct llog_size_change_rec)); @@ -1801,6 +1978,58 @@ void lustre_assert_wire_constants(void) 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 changelog_rec */ + LASSERTF((int)sizeof(struct changelog_rec) == 64, " found %lld\n", + (long long)(int)sizeof(struct changelog_rec)); + LASSERTF((int)offsetof(struct changelog_rec, cr_namelen) == 0, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_namelen)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_namelen) == 2, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_namelen)); + LASSERTF((int)offsetof(struct changelog_rec, cr_flags) == 2, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_flags)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_flags) == 2, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_flags)); + LASSERTF((int)offsetof(struct changelog_rec, cr_type) == 4, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_type)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_type) == 4, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_type)); + LASSERTF((int)offsetof(struct changelog_rec, cr_index) == 8, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_index)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_index) == 8, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_index)); + LASSERTF((int)offsetof(struct changelog_rec, cr_prev) == 16, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_prev)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_prev) == 8, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_prev)); + LASSERTF((int)offsetof(struct changelog_rec, cr_time) == 24, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_time)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_time) == 8, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_time)); + LASSERTF((int)offsetof(struct changelog_rec, cr_tfid) == 32, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_tfid)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_tfid) == 16, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_tfid)); + LASSERTF((int)offsetof(struct changelog_rec, cr_pfid) == 48, " found %lld\n", + (long long)(int)offsetof(struct changelog_rec, cr_pfid)); + LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_pfid) == 16, " found %lld\n", + (long long)(int)sizeof(((struct changelog_rec *)0)->cr_pfid)); + + /* 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) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_changelog_rec, cr)); + LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr) == 64, " found %lld\n", + (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr)); + 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)); @@ -1987,7 +2216,7 @@ void lustre_assert_wire_constants(void) (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)); @@ -2001,26 +2230,38 @@ void lustre_assert_wire_constants(void) (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", @@ -2125,5 +2366,145 @@ void lustre_assert_wire_constants(void) (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)); -} + /* Checks for struct ll_user_fiemap */ + LASSERTF((int)sizeof(struct ll_user_fiemap) == 32, " found %lld\n", + (long long)(int)sizeof(struct ll_user_fiemap)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_start) == 0, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_start)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_start) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_start)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_length) == 8, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_length)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_length) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_length)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_flags) == 16, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_flags)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_flags) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_flags)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_mapped_extents) == 20, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_mapped_extents)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extent_count) == 24, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_extent_count)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_reserved) == 28, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_reserved)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved)); + LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extents) == 32, " found %lld\n", + (long long)(int)offsetof(struct ll_user_fiemap, fm_extents)); + LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extents) == 0, " found %lld\n", + (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extents)); + CLASSERT(FIEMAP_FLAG_SYNC == 0x00000001); + CLASSERT(FIEMAP_FLAG_XATTR == 0x00000002); + CLASSERT(FIEMAP_FLAG_DEVICE_ORDER == 0x40000000); + + /* Checks for struct ll_fiemap_extent */ + LASSERTF((int)sizeof(struct ll_fiemap_extent) == 56, " found %lld\n", + (long long)(int)sizeof(struct ll_fiemap_extent)); + LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_logical) == 0, " found %lld\n", + (long long)(int)offsetof(struct ll_fiemap_extent, fe_logical)); + LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical)); + LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_physical) == 8, " found %lld\n", + (long long)(int)offsetof(struct ll_fiemap_extent, fe_physical)); + LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical)); + LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_length) == 16, " found %lld\n", + (long long)(int)offsetof(struct ll_fiemap_extent, fe_length)); + LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_length) == 8, " found %lld\n", + (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_length)); + LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_flags) == 40, " found %lld\n", + (long long)(int)offsetof(struct ll_fiemap_extent, fe_flags)); + LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags)); + LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_device) == 44, " found %lld\n", + (long long)(int)offsetof(struct ll_fiemap_extent, fe_device)); + LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_device) == 4, " found %lld\n", + (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_device)); + CLASSERT(FIEMAP_EXTENT_LAST == 0x00000001); + CLASSERT(FIEMAP_EXTENT_UNKNOWN == 0x00000002); + CLASSERT(FIEMAP_EXTENT_DELALLOC == 0x00000004); + CLASSERT(FIEMAP_EXTENT_ENCODED == 0x00000008); + CLASSERT(FIEMAP_EXTENT_DATA_ENCRYPTED == 0x00000080); + CLASSERT(FIEMAP_EXTENT_NOT_ALIGNED == 0x00000100); + CLASSERT(FIEMAP_EXTENT_DATA_INLINE == 0x00000200); + CLASSERT(FIEMAP_EXTENT_DATA_TAIL == 0x00000400); + CLASSERT(FIEMAP_EXTENT_UNWRITTEN == 0x00000800); + CLASSERT(FIEMAP_EXTENT_MERGED == 0x00001000); + CLASSERT(FIEMAP_EXTENT_NO_DIRECT == 0x40000000); + CLASSERT(FIEMAP_EXTENT_NET == 0x80000000); +#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 + + /* 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) == 20, " found %lld\n", + (long long)(int)sizeof(struct link_ea_entry)); + LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " 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) == 16, " found %lld\n", + (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid)); + LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 16, " 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_name) == 20, " 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)); +}