From a3a713c8e1a47edc625963092b6b3f27079cdf2d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 31 Mar 2023 17:43:54 -0600 Subject: [PATCH] LU-16655 build: add wirecheck/wiretest for disk structs Move OI scrub_file and related constants to lustre/lustre_disk.h to ensure these on-disk structures do not change in the future. Add lr_server_data and lsd_client_data structs from last_rcvd file. Add replay_data_v1 and replay_data_v2 structs from recovery. Move struct ost_layout together with lustre_ost_attrs where it is used, and add PFID_STRIPE_IDX_BITS/PFID_STRIPE_COUNT_MASK checks for the usage of this struct. Change uuid.h header includes to allow uuid_t in lustre_disk.h. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: Ie992ca383f24c29d2449ee22849a3c476096551c Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50482 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Alexander Zarochentsev Reviewed-by: Oleg Drokin --- lustre/include/lustre_scrub.h | 129 +----- lustre/include/uapi/linux/lustre/lustre_disk.h | 93 ++++- lustre/include/uapi/linux/lustre/lustre_user.h | 3 + lustre/osd-ldiskfs/osd_handler.c | 1 + lustre/ptlrpc/wiretest.c | 539 +++++++++++++++++++++++-- lustre/utils/ll_decode_filter_fid.c | 3 - lustre/utils/wirecheck.c | 215 +++++++++- lustre/utils/wiretest.c | 539 +++++++++++++++++++++++-- 8 files changed, 1323 insertions(+), 199 deletions(-) diff --git a/lustre/include/lustre_scrub.h b/lustre/include/lustre_scrub.h index 02d531d..3157c2b 100644 --- a/lustre/include/lustre_scrub.h +++ b/lustre/include/lustre_scrub.h @@ -36,15 +36,8 @@ #include #include #include +#include -#define OSD_OI_FID_OID_BITS_MAX 10 -#define OSD_OI_FID_NR_MAX (1UL << OSD_OI_FID_OID_BITS_MAX) -#define SCRUB_OI_BITMAP_SIZE (OSD_OI_FID_NR_MAX >> 3) -#define PFID_STRIPE_IDX_BITS 16 -#define PFID_STRIPE_COUNT_MASK ((1 << PFID_STRIPE_IDX_BITS) - 1) - -#define SCRUB_MAGIC_V1 0x4C5FD252 -#define SCRUB_MAGIC_V2 0x4C5FE253 #define SCRUB_CHECKPOINT_INTERVAL 60 #define SCRUB_WINDOW_SIZE 1024 @@ -88,52 +81,6 @@ enum scrub_local_file_flags { SLFF_IDX_IN_FID = 0x0010, }; -enum scrub_status { - /* The scrub file is new created, for new MDT, upgrading from old disk, - * or re-creating the scrub file manually. */ - SS_INIT = 0, - - /* The scrub is checking/repairing the OI files. */ - SS_SCANNING = 1, - - /* The scrub checked/repaired the OI files successfully. */ - SS_COMPLETED = 2, - - /* The scrub failed to check/repair the OI files. */ - SS_FAILED = 3, - - /* The scrub is stopped manually, the OI files may be inconsistent. */ - SS_STOPPED = 4, - - /* The scrub is paused automatically when umount. */ - SS_PAUSED = 5, - - /* The scrub crashed during the scanning, should be restarted. */ - SS_CRASHED = 6, -}; - -enum scrub_flags { - /* OI files have been recreated, OI mappings should be re-inserted. */ - SF_RECREATED = 0x0000000000000001ULL, - - /* OI files are invalid, should be rebuild ASAP */ - SF_INCONSISTENT = 0x0000000000000002ULL, - - /* OI scrub is triggered automatically. */ - SF_AUTO = 0x0000000000000004ULL, - - /* The device is upgraded from 1.8 format. */ - SF_UPGRADE = 0x0000000000000008ULL, -}; - -enum scrub_param { - /* Exit when fail. */ - SP_FAILOUT = 0x0001, - - /* Check only without repairing. */ - SP_DRYRUN = 0x0002, -}; - enum scrub_start { /* Set failout flag. */ SS_SET_FAILOUT = 0x00000001, @@ -185,80 +132,6 @@ enum auto_scrub { AS_DEFAULT = 2592000LL, }; -struct scrub_file { - /* 128-bit uuid for volume. */ - guid_t sf_uuid; - - /* See 'enum scrub_flags'. */ - __u64 sf_flags; - - /* The scrub magic. */ - __u32 sf_magic; - - /* See 'enum scrub_status'. */ - __u16 sf_status; - - /* See 'enum scrub_param'. */ - __u16 sf_param; - - /* The time for the last OI scrub completed. */ - time64_t sf_time_last_complete; - - /* The ttime for the latest OI scrub ran. */ - time64_t sf_time_latest_start; - - /* The time for the last OI scrub checkpoint. */ - time64_t sf_time_last_checkpoint; - - /* The position for the latest OI scrub started from. */ - __u64 sf_pos_latest_start; - - /* The position for the last OI scrub checkpoint. */ - __u64 sf_pos_last_checkpoint; - - /* The position for the first should be updated object. */ - __u64 sf_pos_first_inconsistent; - - /* How many objects have been checked. */ - __u64 sf_items_checked; - - /* How many objects have been updated. */ - __u64 sf_items_updated; - - /* How many objects failed to be processed. */ - __u64 sf_items_failed; - - /* How many prior objects have been updated during scanning. */ - __u64 sf_items_updated_prior; - - /* How many objects marked as LDISKFS_STATE_LUSTRE_NOSCRUB. */ - __u64 sf_items_noscrub; - - /* How many IGIF objects. */ - __u64 sf_items_igif; - - /* How long the OI scrub has run in seconds. Do NOT change - * to time64_t since this breaks backwards compatibility. - * It shouldn't take more than 136 years to complete :-) - */ - s32 sf_run_time; - - /* How many completed OI scrub ran on the device. */ - __u32 sf_success_count; - - /* How many OI files. */ - __u16 sf_oi_count; - - /* Keep the flags after scrub reset. See 'enum scrub_internal_flags' */ - __u16 sf_internal_flags; - - __u32 sf_reserved_1; - __u64 sf_reserved_2[16]; - - /* Bitmap for OI files recreated case. */ - __u8 sf_oi_bitmap[SCRUB_OI_BITMAP_SIZE]; -}; - struct lustre_scrub { /* Object for the scrub file. */ struct dt_object *os_obj; diff --git a/lustre/include/uapi/linux/lustre/lustre_disk.h b/lustre/include/uapi/linux/lustre/lustre_disk.h index 6a6f2e9..3f02430 100644 --- a/lustre/include/uapi/linux/lustre/lustre_disk.h +++ b/lustre/include/uapi/linux/lustre/lustre_disk.h @@ -41,6 +41,7 @@ * @{ */ #include +#include /****************** on-disk files ********************/ @@ -135,11 +136,10 @@ struct lustre_disk_data { enum ldd_mount_type { LDD_MT_EXT3 = 0, - LDD_MT_LDISKFS, - LDD_MT_SMFS, - LDD_MT_REISERFS, - LDD_MT_LDISKFS2, - LDD_MT_ZFS, + LDD_MT_LDISKFS = 1, + LDD_MT_REISERFS = 3, + LDD_MT_LDISKFS2 = 4, + LDD_MT_ZFS = 5, LDD_MT_LAST }; @@ -333,6 +333,89 @@ struct nodemap_key { #define NM_TYPE_MASK 0x0FFFFFFF #define NM_TYPE_SHIFT 28 +/* file structure used for saving OI scrub bookmark state for restart */ +#define OSD_OI_FID_OID_BITS_MAX 10 +#define OSD_OI_FID_NR_MAX (1UL << OSD_OI_FID_OID_BITS_MAX) +#define SCRUB_OI_BITMAP_SIZE (OSD_OI_FID_NR_MAX >> 3) + +#define SCRUB_MAGIC_V1 0x4C5FD252 +#define SCRUB_MAGIC_V2 0x4C5FE253 + +enum scrub_flags { + /* OI files have been recreated, OI mappings should be re-inserted. */ + SF_RECREATED = 0x0000000000000001ULL, + + /* OI files are invalid, should be rebuild ASAP */ + SF_INCONSISTENT = 0x0000000000000002ULL, + + /* OI scrub is triggered automatically. */ + SF_AUTO = 0x0000000000000004ULL, + + /* The device is upgraded from 1.8 format. */ + SF_UPGRADE = 0x0000000000000008ULL, +}; + +enum scrub_status { + /* The scrub file is new created, for new MDT, upgrading from old disk, + * or re-creating the scrub file manually. */ + SS_INIT = 0, + + /* The scrub is checking/repairing the OI files. */ + SS_SCANNING = 1, + + /* The scrub checked/repaired the OI files successfully. */ + SS_COMPLETED = 2, + + /* The scrub failed to check/repair the OI files. */ + SS_FAILED = 3, + + /* The scrub is stopped manually, the OI files may be inconsistent. */ + SS_STOPPED = 4, + + /* The scrub is paused automatically when umount. */ + SS_PAUSED = 5, + + /* The scrub crashed during the scanning, should be restarted. */ + SS_CRASHED = 6, +}; + +enum scrub_param { + /* Exit when fail. */ + SP_FAILOUT = 0x0001, + + /* Check only without repairing. */ + SP_DRYRUN = 0x0002, +}; + +struct scrub_file { + guid_t sf_uuid; /* 128-bit uuid for volume */ + __u64 sf_flags; /* see 'enum scrub_flags' */ + __u32 sf_magic; /* SCRUB_MAGIC_V1/V2 */ + __u16 sf_status; /* see 'enum scrub_status' */ + __u16 sf_param; /* see 'enum scrub_param' */ + __s64 sf_time_last_complete; /* wallclock of last scrub finish */ + __s64 sf_time_latest_start; /* wallclock of last scrub run */ + __s64 sf_time_last_checkpoint; /* wallclock of last checkpoint */ + __u64 sf_pos_latest_start; /* OID of last scrub start */ + __u64 sf_pos_last_checkpoint; /* OID of last scrub checkpoint */ + __u64 sf_pos_first_inconsistent; /* OID first object to update */ + __u64 sf_items_checked; /* number objects checked */ + __u64 sf_items_updated; /* number objects updated */ + __u64 sf_items_failed; /* number objects unrepairable */ + __u64 sf_items_updated_prior; /* num objects fixed before scan */ + __u64 sf_items_noscrub; /* number of objects skipped due to + * LDISKFS_STATE_LUSTRE_NOSCRUB */ + __u64 sf_items_igif; /* number of IGIF(no FID) objects */ + __u32 sf_run_time; /* scrub runtime in seconds */ + __u32 sf_success_count; /* number of completed runs */ + __u16 sf_oi_count; /* number of OI files */ + __u16 sf_internal_flags; /* flags to keep after reset, see + * 'enum scrub_internal_flags' */ + __u32 sf_reserved_1; + __u64 sf_reserved_2[16]; + __u8 sf_oi_bitmap[SCRUB_OI_BITMAP_SIZE]; /* OI files recreated */ +}; + /** @} disk */ #endif /* _UAPI_LUSTRE_DISK_H */ diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h index c52b579..69d4ac9 100644 --- a/lustre/include/uapi/linux/lustre/lustre_user.h +++ b/lustre/include/uapi/linux/lustre/lustre_user.h @@ -453,6 +453,9 @@ struct lustre_mdt_attrs { struct lu_fid lma_self_fid; }; +#define PFID_STRIPE_IDX_BITS 16 +#define PFID_STRIPE_COUNT_MASK ((1 << PFID_STRIPE_IDX_BITS) - 1) + struct lustre_ost_attrs { /* Use lustre_mdt_attrs directly for now, need a common header * structure if want to change lustre_mdt_attrs in future. */ diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index efe64f0..0f0c4d2 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -64,6 +64,7 @@ #include /* process_config */ #include +#include #include "osd_internal.h" #include "osd_dynlocks.h" diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index cb2c0cc..a06857d 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -510,6 +510,34 @@ void lustre_assert_wire_constants(void) (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(PFID_STRIPE_IDX_BITS == 16, "found %lld\n", + (long long)PFID_STRIPE_IDX_BITS); + LASSERTF(PFID_STRIPE_COUNT_MASK == ((1 << 16) - 1), "found 0x%.8x\n", + PFID_STRIPE_COUNT_MASK); + + /* 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)); LASSERTF(OUT_CREATE == 1, "found %lld\n", (long long)OUT_CREATE); LASSERTF(OUT_DESTROY == 2, "found %lld\n", @@ -1434,30 +1462,6 @@ void lustre_assert_wire_constants(void) LASSERTF(OBD_CKSUM_T10_TOP == 0x00000002UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_T10_TOP); - /* 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)); @@ -5584,6 +5588,361 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct out_update_buffer *)0)->oub_padding) == 4, "found %lld\n", (long long)(int)sizeof(((struct out_update_buffer *)0)->oub_padding)); + /* Checks for struct lustre_disk_data */ + LASSERTF((int)sizeof(struct lustre_disk_data) == 12288, "found %lld\n", + (long long)(int)sizeof(struct lustre_disk_data)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_magic) == 0, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_magic)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_magic)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_compat) == 4, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_compat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_rocompat) == 8, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_rocompat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_incompat) == 12, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_incompat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_config_ver) == 16, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_config_ver)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_flags) == 20, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_flags)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_flags) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_flags)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svindex) == 24, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_svindex)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_type) == 28, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_type)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_fsname) == 32, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_fsname)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname) == 64, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svname) == 96, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_svname)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svname) == 64, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svname)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_uuid) == 160, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_uuid)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_userdata) == 200, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_userdata)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata) == 824, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_padding) == 1024, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_padding)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_padding) == 3072, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_padding)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_opts) == 4096, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_opts)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts) == 4096, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_params) == 8192, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_params)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params)); + LASSERTF(LDD_F_SV_TYPE_MDT == 0x0001, "found 0x%.8x\n", + LDD_F_SV_TYPE_MDT); + LASSERTF(LDD_F_SV_TYPE_OST == 0x0002, "found 0x%.8x\n", + LDD_F_SV_TYPE_OST); + LASSERTF(LDD_F_SV_TYPE_MGS == 0x0004, "found 0x%.8x\n", + LDD_F_SV_TYPE_MGS); + LASSERTF(LDD_F_NEED_INDEX == 0x0010, "found 0x%.8x\n", + LDD_F_NEED_INDEX); + LASSERTF(LDD_F_VIRGIN == 0x0020, "found 0x%.8x\n", + LDD_F_VIRGIN); + LASSERTF(LDD_F_UPDATE == 0x0040, "found 0x%.8x\n", + LDD_F_UPDATE); + LASSERTF(LDD_F_REWRITE_LDD == 0x0080, "found 0x%.8x\n", + LDD_F_REWRITE_LDD); + LASSERTF(LDD_F_WRITECONF == 0x0100, "found 0x%.8x\n", + LDD_F_WRITECONF); + LASSERTF(LDD_F_PARAM == 0x0400, "found 0x%.8x\n", + LDD_F_PARAM); + LASSERTF(LDD_F_NO_PRIMNODE == 0x1000, "found 0x%.8x\n", + LDD_F_NO_PRIMNODE); + LASSERTF(LDD_F_ERROR == 0x4000, "found 0x%.8x\n", + LDD_F_ERROR); + LASSERTF(LDD_F_PARAM2 == 0x8000, "found 0x%.8x\n", + LDD_F_PARAM2); + LASSERTF(LDD_F_NO_LOCAL_LOGS == 0x10000, "found 0x%.8x\n", + LDD_F_NO_LOCAL_LOGS); + LASSERTF(LDD_MAGIC == 0x1dd00001, "found 0x%.8x\n", + LDD_MAGIC); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_LDISKFS == 1, "found %lld\n", + (long long)LDD_MT_LDISKFS); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + + /* Checks for struct lr_server_data */ + LASSERTF((int)sizeof(struct lr_server_data) == 512, "found %lld\n", + (long long)(int)sizeof(struct lr_server_data)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_uuid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_uuid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_last_transno) == 40, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_last_transno)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_last_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_last_transno)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_compat14) == 48, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_compat14)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_compat14) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_compat14)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_mount_count) == 56, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_mount_count)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_mount_count) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_mount_count)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_compat) == 64, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_compat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_compat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_compat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_rocompat) == 68, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_rocompat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_rocompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_rocompat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_incompat) == 72, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_incompat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_incompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_incompat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_server_size) == 76, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_server_size)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_server_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_server_size)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_client_start) == 80, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_client_start)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_client_start) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_client_start)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_client_size) == 84, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_client_size)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_client_size) == 2, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_client_size)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_subdir_count) == 86, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_subdir_count)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_subdir_count) == 2, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_subdir_count)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_catalog_oid) == 88, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_catalog_oid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_catalog_oid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_catalog_oid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_catalog_ogen) == 96, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_catalog_ogen)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_catalog_ogen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_catalog_ogen)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_peeruuid) == 100, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_peeruuid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_peeruuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_peeruuid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_osd_index) == 140, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_osd_index)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_osd_index) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_osd_index)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_padding1) == 144, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_padding1)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_padding1) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_padding1)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_start_epoch) == 148, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_start_epoch)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_start_epoch) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_start_epoch)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_trans_table) == 152, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_trans_table)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_trans_table) == 128, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_trans_table)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_trans_table_time) == 280, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_trans_table_time)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_trans_table_time) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_trans_table_time)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_expire_intervals) == 284, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_expire_intervals)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_expire_intervals) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_expire_intervals)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_padding) == 288, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_padding)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_padding) == 224, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_padding)); + LASSERTF(LR_SERVER_SIZE == 512, "found %lld\n", + (long long)LR_SERVER_SIZE); + LASSERTF(LR_EXPIRE_INTERVALS == 16, "found %lld\n", + (long long)LR_EXPIRE_INTERVALS); + LASSERTF(LR_CLIENT_START == 8192, "found %lld\n", + (long long)LR_CLIENT_START); + LASSERTF(LR_CLIENT_SIZE == 128, "found %lld\n", + (long long)LR_CLIENT_SIZE); + LASSERTF(LR_CLIENT_SIZE == (int)sizeof(struct lsd_client_data), "%d != %d\n", + LR_CLIENT_SIZE, (int)sizeof(struct lsd_client_data)); + /* Checks for struct lsd_client_data */ + LASSERTF((int)sizeof(struct lsd_client_data) == 128, "found %lld\n", + (long long)(int)sizeof(struct lsd_client_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_uuid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_uuid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_transno) == 40, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_transno)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_transno)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_xid) == 48, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_xid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_xid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_result) == 56, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_result)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_result)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_data) == 60, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_data)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_data) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_transno) == 64, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_transno)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_transno)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_xid) == 72, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_xid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_xid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_result) == 80, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_result)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_result)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_data) == 84, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_data)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_data) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_pre_versions) == 88, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_pre_versions)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_pre_versions) == 32, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_pre_versions)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_epoch) == 120, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_epoch)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_epoch) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_epoch)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_generation) == 124, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_generation)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_generation) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_generation)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_padding) == 128, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_padding)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_padding) == 0, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_padding)); + + /* Checks for struct lsd_reply_data_v1 */ + LASSERTF((int)sizeof(struct lsd_reply_data_v1) == 32, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_data_v1)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_transno) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_xid) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_data) == 16, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_result) == 24, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_client_gen) == 28, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen)); + /* Checks for struct lsd_reply_data_v2 */ + LASSERTF((int)sizeof(struct lsd_reply_data_v2) == 64, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_data_v2)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_transno) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_xid) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_data) == 16, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_result) == 24, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_client_gen) == 28, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_batch_idx) == 32, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_batch_idx)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_batch_idx) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_batch_idx)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_padding) == 36, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_padding)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_padding) == 28, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_padding)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_transno) == (int)offsetof(struct lsd_reply_data_v2, lrd_transno), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_transno), (int)offsetof(struct lsd_reply_data_v2, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_xid) == (int)offsetof(struct lsd_reply_data_v2, lrd_xid), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_xid), (int)offsetof(struct lsd_reply_data_v2, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_data) == (int)offsetof(struct lsd_reply_data_v2, lrd_data), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_data), (int)offsetof(struct lsd_reply_data_v2, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_result) == (int)offsetof(struct lsd_reply_data_v2, lrd_result), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_result), (int)offsetof(struct lsd_reply_data_v2, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_client_gen) == (int)offsetof(struct lsd_reply_data_v2, lrd_client_gen), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_client_gen), (int)offsetof(struct lsd_reply_data_v2, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen)); + LASSERTF(LRH_MAGIC_V1 == 0xbdabda01UL, "found 0x%.8xUL\n", + (unsigned)LRH_MAGIC_V1); + LASSERTF(LRH_MAGIC_V2 == 0xbdabda02UL, "found 0x%.8xUL\n", + (unsigned)LRH_MAGIC_V2); + /* Checks for struct lsd_reply_header */ + LASSERTF((int)sizeof(struct lsd_reply_header) == 32, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_header)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_magic) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_magic)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_magic)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_header_size) == 4, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_header_size)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_header_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_header_size)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_reply_size) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_reply_size)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_reply_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_reply_size)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_pad) == 12, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_pad)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_pad) == 20, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_pad)); + /* Checks for struct nodemap_cluster_rec */ LASSERTF((int)sizeof(struct nodemap_cluster_rec) == 32, "found %lld\n", (long long)(int)sizeof(struct nodemap_cluster_rec)); @@ -5813,6 +6172,138 @@ void lustre_assert_wire_constants(void) LASSERTF(NODEMAP_RBAC_ALL == 0xffffffffUL, "found 0x%.8xUL\n", (unsigned)NODEMAP_RBAC_ALL); + /* Checks for struct scrub_file */ + LASSERTF((int)sizeof(struct scrub_file) == 400, "found %lld\n", + (long long)(int)sizeof(struct scrub_file)); + LASSERTF((int)offsetof(struct scrub_file, sf_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_uuid)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_uuid) == 16, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_uuid)); + LASSERTF((int)offsetof(struct scrub_file, sf_flags) == 16, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_flags)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_flags) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_flags)); + LASSERTF((int)offsetof(struct scrub_file, sf_magic) == 24, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_magic)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_magic)); + LASSERTF((int)offsetof(struct scrub_file, sf_status) == 28, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_status)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_status) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_status)); + LASSERTF((int)offsetof(struct scrub_file, sf_param) == 30, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_param)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_param) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_param)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_last_complete) == 32, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_last_complete)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_last_complete) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_last_complete)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_latest_start) == 40, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_latest_start)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_latest_start) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_latest_start)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_last_checkpoint) == 48, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_last_checkpoint)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_last_checkpoint) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_last_checkpoint)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_latest_start) == 56, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_latest_start)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_latest_start) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_latest_start)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_last_checkpoint) == 64, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_last_checkpoint)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_last_checkpoint) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_last_checkpoint)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_first_inconsistent) == 72, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_first_inconsistent)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_first_inconsistent) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_first_inconsistent)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_checked) == 80, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_checked)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_checked) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_checked)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_updated) == 88, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_updated)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_updated) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_updated)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_failed) == 96, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_failed)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_failed) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_failed)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_updated_prior) == 104, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_updated_prior)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_updated_prior) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_updated_prior)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_noscrub) == 112, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_noscrub)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_noscrub) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_noscrub)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_igif) == 120, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_igif)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_igif) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_igif)); + LASSERTF((int)offsetof(struct scrub_file, sf_run_time) == 128, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_run_time)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_run_time) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_run_time)); + LASSERTF((int)offsetof(struct scrub_file, sf_success_count) == 132, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_success_count)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_success_count) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_success_count)); + LASSERTF((int)offsetof(struct scrub_file, sf_oi_count) == 136, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_oi_count)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_oi_count) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_oi_count)); + LASSERTF((int)offsetof(struct scrub_file, sf_internal_flags) == 138, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_internal_flags)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_internal_flags) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_internal_flags)); + LASSERTF((int)offsetof(struct scrub_file, sf_reserved_1) == 140, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_reserved_1)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_reserved_1) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_reserved_1)); + LASSERTF((int)offsetof(struct scrub_file, sf_reserved_2) == 144, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_reserved_2)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_reserved_2) == 128, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_reserved_2)); + LASSERTF((int)offsetof(struct scrub_file, sf_oi_bitmap) == 272, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_oi_bitmap)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_oi_bitmap) == 128, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_oi_bitmap)); + LASSERTF(SCRUB_OI_BITMAP_SIZE == 128, "found %lld\n", + (long long)SCRUB_OI_BITMAP_SIZE); + LASSERTF(SCRUB_MAGIC_V1 == 0x4C5FD252, "found 0x%.8x\n", + SCRUB_MAGIC_V1); + LASSERTF(SCRUB_MAGIC_V2 == 0x4C5FE253, "found 0x%.8x\n", + SCRUB_MAGIC_V2); + LASSERTF(SF_RECREATED == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SF_RECREATED); + LASSERTF(SF_INCONSISTENT == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SF_INCONSISTENT); + LASSERTF(SF_AUTO == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)SF_AUTO); + LASSERTF(SF_UPGRADE == 0x00000008UL, "found 0x%.8xUL\n", + (unsigned)SF_UPGRADE); + LASSERTF(SS_INIT == 0x00000000UL, "found 0x%.8xUL\n", + (unsigned)SS_INIT); + LASSERTF(SS_SCANNING == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SS_SCANNING); + LASSERTF(SS_COMPLETED == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SS_COMPLETED); + LASSERTF(SS_FAILED == 0x00000003UL, "found 0x%.8xUL\n", + (unsigned)SS_FAILED); + LASSERTF(SS_STOPPED == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)SS_STOPPED); + LASSERTF(SS_PAUSED == 0x00000005UL, "found 0x%.8xUL\n", + (unsigned)SS_PAUSED); + LASSERTF(SS_CRASHED == 0x00000006UL, "found 0x%.8xUL\n", + (unsigned)SS_CRASHED); + LASSERTF(SP_FAILOUT == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SP_FAILOUT); + LASSERTF(SP_DRYRUN == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SP_DRYRUN); + LASSERTF(OFD_ACCESS_READ == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OFD_ACCESS_READ); LASSERTF(OFD_ACCESS_WRITE == 0x00000002UL, "found 0x%.8xUL\n", diff --git a/lustre/utils/ll_decode_filter_fid.c b/lustre/utils/ll_decode_filter_fid.c index 971e0d9..f395849 100644 --- a/lustre/utils/ll_decode_filter_fid.c +++ b/lustre/utils/ll_decode_filter_fid.c @@ -44,9 +44,6 @@ #include #include -#define PFID_STRIPE_IDX_BITS 16 -#define PFID_STRIPE_COUNT_MASK ((1 << PFID_STRIPE_IDX_BITS) - 1) - #if __BYTE_ORDER == __BIG_ENDIAN static void lustre_swab_lu_fid(struct lu_fid *fid) { diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 0724538..210e431 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -243,8 +243,7 @@ check_lustre_mdt_attrs(void) CHECK_VALUE_X(LMAI_ENCRYPT); } -static void -check_lustre_ost_attrs(void) +static void check_lustre_ost_attrs(void) { BLANK_LINE(); CHECK_STRUCT(lustre_ost_attrs); @@ -254,6 +253,20 @@ check_lustre_ost_attrs(void) CHECK_MEMBER(lustre_ost_attrs, loa_comp_id); CHECK_MEMBER(lustre_ost_attrs, loa_comp_start); CHECK_MEMBER(lustre_ost_attrs, loa_comp_end); + + CHECK_DEFINE(PFID_STRIPE_IDX_BITS); + CHECK_DEFINE_X(PFID_STRIPE_COUNT_MASK); +} + +static void check_ost_layout(void) +{ + BLANK_LINE(); + CHECK_STRUCT(ost_layout); + CHECK_MEMBER(ost_layout, ol_stripe_size); + CHECK_MEMBER(ost_layout, ol_stripe_count); + CHECK_MEMBER(ost_layout, ol_comp_start); + CHECK_MEMBER(ost_layout, ol_comp_end); + CHECK_MEMBER(ost_layout, ol_comp_id); } static void @@ -680,18 +693,6 @@ check_obd_connect_data(void) } static void -check_ost_layout(void) -{ - BLANK_LINE(); - CHECK_STRUCT(ost_layout); - CHECK_MEMBER(ost_layout, ol_stripe_size); - CHECK_MEMBER(ost_layout, ol_stripe_count); - CHECK_MEMBER(ost_layout, ol_comp_start); - CHECK_MEMBER(ost_layout, ol_comp_end); - CHECK_MEMBER(ost_layout, ol_comp_id); -} - -static void check_obdo(void) { BLANK_LINE(); @@ -2677,6 +2678,133 @@ static void check_out_update_buffer(void) CHECK_MEMBER(out_update_buffer, oub_padding); } +static void check_lustre_disk_data(void) +{ + BLANK_LINE(); + CHECK_STRUCT(lustre_disk_data); + CHECK_MEMBER(lustre_disk_data, ldd_magic); + CHECK_MEMBER(lustre_disk_data, ldd_feature_compat); + CHECK_MEMBER(lustre_disk_data, ldd_feature_rocompat); + CHECK_MEMBER(lustre_disk_data, ldd_feature_incompat); + CHECK_MEMBER(lustre_disk_data, ldd_config_ver); + CHECK_MEMBER(lustre_disk_data, ldd_flags); + CHECK_MEMBER(lustre_disk_data, ldd_svindex); + CHECK_MEMBER(lustre_disk_data, ldd_mount_type); + CHECK_MEMBER(lustre_disk_data, ldd_fsname); + CHECK_MEMBER(lustre_disk_data, ldd_svname); + CHECK_MEMBER(lustre_disk_data, ldd_uuid); + CHECK_MEMBER(lustre_disk_data, ldd_userdata); + CHECK_MEMBER(lustre_disk_data, ldd_padding); + CHECK_MEMBER(lustre_disk_data, ldd_mount_opts); + CHECK_MEMBER(lustre_disk_data, ldd_params); + + CHECK_DEFINE_X(LDD_F_SV_TYPE_MDT); + CHECK_DEFINE_X(LDD_F_SV_TYPE_OST); + CHECK_DEFINE_X(LDD_F_SV_TYPE_MGS); + CHECK_DEFINE_X(LDD_F_NEED_INDEX); + CHECK_DEFINE_X(LDD_F_VIRGIN); + CHECK_DEFINE_X(LDD_F_UPDATE); + CHECK_DEFINE_X(LDD_F_REWRITE_LDD); + CHECK_DEFINE_X(LDD_F_WRITECONF); + CHECK_DEFINE_X(LDD_F_PARAM); + CHECK_DEFINE_X(LDD_F_NO_PRIMNODE); + CHECK_DEFINE_X(LDD_F_ERROR); + CHECK_DEFINE_X(LDD_F_PARAM2); + CHECK_DEFINE_X(LDD_F_NO_LOCAL_LOGS); + + CHECK_DEFINE_X(LDD_MAGIC); + + CHECK_VALUE(LDD_MT_EXT3); + CHECK_VALUE(LDD_MT_LDISKFS); + CHECK_VALUE(LDD_MT_EXT3); + CHECK_VALUE(LDD_MT_EXT3); + CHECK_VALUE(LDD_MT_EXT3); + CHECK_VALUE(LDD_MT_EXT3); +} + +static void check_lr_server_data(void) +{ + BLANK_LINE(); + CHECK_STRUCT(lr_server_data); + CHECK_MEMBER(lr_server_data, lsd_uuid); + CHECK_MEMBER(lr_server_data, lsd_last_transno); + CHECK_MEMBER(lr_server_data, lsd_compat14); + CHECK_MEMBER(lr_server_data, lsd_mount_count); + CHECK_MEMBER(lr_server_data, lsd_feature_compat); + CHECK_MEMBER(lr_server_data, lsd_feature_rocompat); + CHECK_MEMBER(lr_server_data, lsd_feature_incompat); + CHECK_MEMBER(lr_server_data, lsd_server_size); + CHECK_MEMBER(lr_server_data, lsd_client_start); + CHECK_MEMBER(lr_server_data, lsd_client_size); + CHECK_MEMBER(lr_server_data, lsd_subdir_count); + CHECK_MEMBER(lr_server_data, lsd_catalog_oid); + CHECK_MEMBER(lr_server_data, lsd_catalog_ogen); + CHECK_MEMBER(lr_server_data, lsd_peeruuid); + CHECK_MEMBER(lr_server_data, lsd_osd_index); + CHECK_MEMBER(lr_server_data, lsd_padding1); + CHECK_MEMBER(lr_server_data, lsd_start_epoch); + CHECK_MEMBER(lr_server_data, lsd_trans_table); + CHECK_MEMBER(lr_server_data, lsd_trans_table_time); + CHECK_MEMBER(lr_server_data, lsd_expire_intervals); + CHECK_MEMBER(lr_server_data, lsd_padding); + + CHECK_VALUE(LR_SERVER_SIZE); + CHECK_VALUE(LR_EXPIRE_INTERVALS); + CHECK_VALUE(LR_CLIENT_START); + CHECK_VALUE(LR_CLIENT_SIZE); + CHECK_VALUE_SAME(LR_CLIENT_SIZE, (int)sizeof(struct lsd_client_data)); + + CHECK_STRUCT(lsd_client_data); + CHECK_MEMBER(lsd_client_data, lcd_uuid); + CHECK_MEMBER(lsd_client_data, lcd_last_transno); + CHECK_MEMBER(lsd_client_data, lcd_last_xid); + CHECK_MEMBER(lsd_client_data, lcd_last_result); + CHECK_MEMBER(lsd_client_data, lcd_last_data); + CHECK_MEMBER(lsd_client_data, lcd_last_close_transno); + CHECK_MEMBER(lsd_client_data, lcd_last_close_xid); + CHECK_MEMBER(lsd_client_data, lcd_last_close_result); + CHECK_MEMBER(lsd_client_data, lcd_last_close_data); + CHECK_MEMBER(lsd_client_data, lcd_pre_versions); + CHECK_MEMBER(lsd_client_data, lcd_last_epoch); + CHECK_MEMBER(lsd_client_data, lcd_generation); + CHECK_MEMBER(lsd_client_data, lcd_padding); +} + +static void check_lsd_reply_data(void) +{ + BLANK_LINE(); + CHECK_STRUCT(lsd_reply_data_v1); + CHECK_MEMBER(lsd_reply_data_v1, lrd_transno); + CHECK_MEMBER(lsd_reply_data_v1, lrd_xid); + CHECK_MEMBER(lsd_reply_data_v1, lrd_data); + CHECK_MEMBER(lsd_reply_data_v1, lrd_result); + CHECK_MEMBER(lsd_reply_data_v1, lrd_client_gen); + + CHECK_STRUCT(lsd_reply_data_v2); + CHECK_MEMBER(lsd_reply_data_v2, lrd_transno); + CHECK_MEMBER(lsd_reply_data_v2, lrd_xid); + CHECK_MEMBER(lsd_reply_data_v2, lrd_data); + CHECK_MEMBER(lsd_reply_data_v2, lrd_result); + CHECK_MEMBER(lsd_reply_data_v2, lrd_client_gen); + CHECK_MEMBER(lsd_reply_data_v2, lrd_batch_idx); + CHECK_MEMBER(lsd_reply_data_v2, lrd_padding); + + CHECK_MEMBER_SAME(lsd_reply_data_v1, lsd_reply_data_v2, lrd_transno); + CHECK_MEMBER_SAME(lsd_reply_data_v1, lsd_reply_data_v2, lrd_xid); + CHECK_MEMBER_SAME(lsd_reply_data_v1, lsd_reply_data_v2, lrd_data); + CHECK_MEMBER_SAME(lsd_reply_data_v1, lsd_reply_data_v2, lrd_result); + CHECK_MEMBER_SAME(lsd_reply_data_v1, lsd_reply_data_v2, lrd_client_gen); + + CHECK_VALUE_X(LRH_MAGIC_V1); + CHECK_VALUE_X(LRH_MAGIC_V2); + + CHECK_STRUCT(lsd_reply_header); + CHECK_MEMBER(lsd_reply_header, lrh_magic); + CHECK_MEMBER(lsd_reply_header, lrh_header_size); + CHECK_MEMBER(lsd_reply_header, lrh_reply_size); + CHECK_MEMBER(lsd_reply_header, lrh_pad); +} + static void check_nodemap_cluster_rec(void) { BLANK_LINE(); @@ -2799,6 +2927,57 @@ static void check_nodemap_key(void) CHECK_VALUE_X(NODEMAP_RBAC_ALL); } +static void check_scrub_file(void) +{ + BLANK_LINE(); + CHECK_STRUCT(scrub_file); + CHECK_MEMBER(scrub_file, sf_uuid); + CHECK_MEMBER(scrub_file, sf_flags); + CHECK_MEMBER(scrub_file, sf_magic); + CHECK_MEMBER(scrub_file, sf_status); + CHECK_MEMBER(scrub_file, sf_param); + CHECK_MEMBER(scrub_file, sf_time_last_complete); + CHECK_MEMBER(scrub_file, sf_time_latest_start); + CHECK_MEMBER(scrub_file, sf_time_last_checkpoint); + CHECK_MEMBER(scrub_file, sf_pos_latest_start); + CHECK_MEMBER(scrub_file, sf_pos_last_checkpoint); + CHECK_MEMBER(scrub_file, sf_pos_first_inconsistent); + CHECK_MEMBER(scrub_file, sf_items_checked); + CHECK_MEMBER(scrub_file, sf_items_updated); + CHECK_MEMBER(scrub_file, sf_items_failed); + CHECK_MEMBER(scrub_file, sf_items_updated_prior); + CHECK_MEMBER(scrub_file, sf_items_noscrub); + CHECK_MEMBER(scrub_file, sf_items_igif); + CHECK_MEMBER(scrub_file, sf_run_time); + CHECK_MEMBER(scrub_file, sf_success_count); + CHECK_MEMBER(scrub_file, sf_oi_count); + CHECK_MEMBER(scrub_file, sf_internal_flags); + CHECK_MEMBER(scrub_file, sf_reserved_1); + CHECK_MEMBER(scrub_file, sf_reserved_2); + CHECK_MEMBER(scrub_file, sf_oi_bitmap); + + CHECK_VALUE(SCRUB_OI_BITMAP_SIZE); + + CHECK_DEFINE_X(SCRUB_MAGIC_V1); + CHECK_DEFINE_X(SCRUB_MAGIC_V2); + + CHECK_VALUE_X(SF_RECREATED); + CHECK_VALUE_X(SF_INCONSISTENT); + CHECK_VALUE_X(SF_AUTO); + CHECK_VALUE_X(SF_UPGRADE); + + CHECK_VALUE_X(SS_INIT); + CHECK_VALUE_X(SS_SCANNING); + CHECK_VALUE_X(SS_COMPLETED); + CHECK_VALUE_X(SS_FAILED); + CHECK_VALUE_X(SS_STOPPED); + CHECK_VALUE_X(SS_PAUSED); + CHECK_VALUE_X(SS_CRASHED); + + CHECK_VALUE_X(SP_FAILOUT); + CHECK_VALUE_X(SP_DRYRUN); +} + static void check_ofd_access_entry_v1(void) { BLANK_LINE(); @@ -3242,6 +3421,7 @@ main(int argc, char **argv) CHECK_COND_START(HAVE_SERVER_SUPPORT); check_lustre_mdt_attrs(); check_lustre_ost_attrs(); + check_ost_layout(); CHECK_VALUE(OUT_CREATE); CHECK_VALUE(OUT_DESTROY); @@ -3275,7 +3455,6 @@ main(int argc, char **argv) check_lustre_msg_v2(); check_ptlrpc_body(); check_obd_connect_data(); - check_ost_layout(); check_obdo(); check_lov_ost_data_v1(); check_lov_mds_md_v1(); @@ -3406,6 +3585,10 @@ main(int argc, char **argv) check_out_update_header(); check_out_update_buffer(); + check_lustre_disk_data(); + check_lr_server_data(); + check_lsd_reply_data(); + check_nodemap_cluster_rec(); check_nodemap_range_rec(); check_nodemap_id_rec(); @@ -3414,6 +3597,8 @@ main(int argc, char **argv) check_nodemap_rec(); check_nodemap_key(); + check_scrub_file(); + check_ofd_access_entry_v1(); check_lustre_access_log_info_v1(); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 11667e8..b72d09b 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -536,6 +536,34 @@ void lustre_assert_wire_constants(void) (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(PFID_STRIPE_IDX_BITS == 16, "found %lld\n", + (long long)PFID_STRIPE_IDX_BITS); + LASSERTF(PFID_STRIPE_COUNT_MASK == ((1 << 16) - 1), "found 0x%.8x\n", + PFID_STRIPE_COUNT_MASK); + + /* 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)); LASSERTF(OUT_CREATE == 1, "found %lld\n", (long long)OUT_CREATE); LASSERTF(OUT_DESTROY == 2, "found %lld\n", @@ -1460,30 +1488,6 @@ void lustre_assert_wire_constants(void) LASSERTF(OBD_CKSUM_T10_TOP == 0x00000002UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_T10_TOP); - /* 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)); @@ -5647,6 +5651,361 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct out_update_buffer *)0)->oub_padding) == 4, "found %lld\n", (long long)(int)sizeof(((struct out_update_buffer *)0)->oub_padding)); + /* Checks for struct lustre_disk_data */ + LASSERTF((int)sizeof(struct lustre_disk_data) == 12288, "found %lld\n", + (long long)(int)sizeof(struct lustre_disk_data)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_magic) == 0, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_magic)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_magic)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_compat) == 4, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_compat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_rocompat) == 8, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_rocompat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_incompat) == 12, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_incompat)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_config_ver) == 16, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_config_ver)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_flags) == 20, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_flags)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_flags) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_flags)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svindex) == 24, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_svindex)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_type) == 28, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_type)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_fsname) == 32, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_fsname)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname) == 64, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svname) == 96, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_svname)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svname) == 64, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svname)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_uuid) == 160, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_uuid)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_userdata) == 200, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_userdata)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata) == 824, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_padding) == 1024, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_padding)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_padding) == 3072, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_padding)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_opts) == 4096, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_opts)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts) == 4096, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts)); + LASSERTF((int)offsetof(struct lustre_disk_data, ldd_params) == 8192, "found %lld\n", + (long long)(int)offsetof(struct lustre_disk_data, ldd_params)); + LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, "found %lld\n", + (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params)); + LASSERTF(LDD_F_SV_TYPE_MDT == 0x0001, "found 0x%.8x\n", + LDD_F_SV_TYPE_MDT); + LASSERTF(LDD_F_SV_TYPE_OST == 0x0002, "found 0x%.8x\n", + LDD_F_SV_TYPE_OST); + LASSERTF(LDD_F_SV_TYPE_MGS == 0x0004, "found 0x%.8x\n", + LDD_F_SV_TYPE_MGS); + LASSERTF(LDD_F_NEED_INDEX == 0x0010, "found 0x%.8x\n", + LDD_F_NEED_INDEX); + LASSERTF(LDD_F_VIRGIN == 0x0020, "found 0x%.8x\n", + LDD_F_VIRGIN); + LASSERTF(LDD_F_UPDATE == 0x0040, "found 0x%.8x\n", + LDD_F_UPDATE); + LASSERTF(LDD_F_REWRITE_LDD == 0x0080, "found 0x%.8x\n", + LDD_F_REWRITE_LDD); + LASSERTF(LDD_F_WRITECONF == 0x0100, "found 0x%.8x\n", + LDD_F_WRITECONF); + LASSERTF(LDD_F_PARAM == 0x0400, "found 0x%.8x\n", + LDD_F_PARAM); + LASSERTF(LDD_F_NO_PRIMNODE == 0x1000, "found 0x%.8x\n", + LDD_F_NO_PRIMNODE); + LASSERTF(LDD_F_ERROR == 0x4000, "found 0x%.8x\n", + LDD_F_ERROR); + LASSERTF(LDD_F_PARAM2 == 0x8000, "found 0x%.8x\n", + LDD_F_PARAM2); + LASSERTF(LDD_F_NO_LOCAL_LOGS == 0x10000, "found 0x%.8x\n", + LDD_F_NO_LOCAL_LOGS); + LASSERTF(LDD_MAGIC == 0x1dd00001, "found 0x%.8x\n", + LDD_MAGIC); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_LDISKFS == 1, "found %lld\n", + (long long)LDD_MT_LDISKFS); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + LASSERTF(LDD_MT_EXT3 == 0, "found %lld\n", + (long long)LDD_MT_EXT3); + + /* Checks for struct lr_server_data */ + LASSERTF((int)sizeof(struct lr_server_data) == 512, "found %lld\n", + (long long)(int)sizeof(struct lr_server_data)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_uuid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_uuid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_last_transno) == 40, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_last_transno)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_last_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_last_transno)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_compat14) == 48, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_compat14)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_compat14) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_compat14)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_mount_count) == 56, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_mount_count)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_mount_count) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_mount_count)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_compat) == 64, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_compat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_compat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_compat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_rocompat) == 68, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_rocompat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_rocompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_rocompat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_feature_incompat) == 72, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_feature_incompat)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_feature_incompat) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_feature_incompat)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_server_size) == 76, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_server_size)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_server_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_server_size)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_client_start) == 80, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_client_start)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_client_start) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_client_start)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_client_size) == 84, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_client_size)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_client_size) == 2, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_client_size)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_subdir_count) == 86, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_subdir_count)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_subdir_count) == 2, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_subdir_count)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_catalog_oid) == 88, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_catalog_oid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_catalog_oid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_catalog_oid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_catalog_ogen) == 96, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_catalog_ogen)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_catalog_ogen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_catalog_ogen)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_peeruuid) == 100, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_peeruuid)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_peeruuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_peeruuid)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_osd_index) == 140, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_osd_index)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_osd_index) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_osd_index)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_padding1) == 144, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_padding1)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_padding1) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_padding1)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_start_epoch) == 148, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_start_epoch)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_start_epoch) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_start_epoch)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_trans_table) == 152, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_trans_table)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_trans_table) == 128, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_trans_table)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_trans_table_time) == 280, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_trans_table_time)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_trans_table_time) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_trans_table_time)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_expire_intervals) == 284, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_expire_intervals)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_expire_intervals) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_expire_intervals)); + LASSERTF((int)offsetof(struct lr_server_data, lsd_padding) == 288, "found %lld\n", + (long long)(int)offsetof(struct lr_server_data, lsd_padding)); + LASSERTF((int)sizeof(((struct lr_server_data *)0)->lsd_padding) == 224, "found %lld\n", + (long long)(int)sizeof(((struct lr_server_data *)0)->lsd_padding)); + LASSERTF(LR_SERVER_SIZE == 512, "found %lld\n", + (long long)LR_SERVER_SIZE); + LASSERTF(LR_EXPIRE_INTERVALS == 16, "found %lld\n", + (long long)LR_EXPIRE_INTERVALS); + LASSERTF(LR_CLIENT_START == 8192, "found %lld\n", + (long long)LR_CLIENT_START); + LASSERTF(LR_CLIENT_SIZE == 128, "found %lld\n", + (long long)LR_CLIENT_SIZE); + LASSERTF(LR_CLIENT_SIZE == (int)sizeof(struct lsd_client_data), "%d != %d\n", + LR_CLIENT_SIZE, (int)sizeof(struct lsd_client_data)); + /* Checks for struct lsd_client_data */ + LASSERTF((int)sizeof(struct lsd_client_data) == 128, "found %lld\n", + (long long)(int)sizeof(struct lsd_client_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_uuid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_uuid) == 40, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_uuid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_transno) == 40, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_transno)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_transno)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_xid) == 48, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_xid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_xid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_result) == 56, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_result)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_result)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_data) == 60, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_data)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_data) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_transno) == 64, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_transno)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_transno)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_xid) == 72, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_xid)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_xid)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_result) == 80, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_result)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_result)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_close_data) == 84, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_close_data)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_data) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_close_data)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_pre_versions) == 88, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_pre_versions)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_pre_versions) == 32, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_pre_versions)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_last_epoch) == 120, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_last_epoch)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_last_epoch) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_last_epoch)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_generation) == 124, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_generation)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_generation) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_generation)); + LASSERTF((int)offsetof(struct lsd_client_data, lcd_padding) == 128, "found %lld\n", + (long long)(int)offsetof(struct lsd_client_data, lcd_padding)); + LASSERTF((int)sizeof(((struct lsd_client_data *)0)->lcd_padding) == 0, "found %lld\n", + (long long)(int)sizeof(((struct lsd_client_data *)0)->lcd_padding)); + + /* Checks for struct lsd_reply_data_v1 */ + LASSERTF((int)sizeof(struct lsd_reply_data_v1) == 32, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_data_v1)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_transno) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_xid) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_data) == 16, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_result) == 24, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_client_gen) == 28, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v1, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen)); + /* Checks for struct lsd_reply_data_v2 */ + LASSERTF((int)sizeof(struct lsd_reply_data_v2) == 64, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_data_v2)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_transno) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_xid) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_data) == 16, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data) == 8, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_result) == 24, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_client_gen) == 28, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_batch_idx) == 32, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_batch_idx)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_batch_idx) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_batch_idx)); + LASSERTF((int)offsetof(struct lsd_reply_data_v2, lrd_padding) == 36, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_data_v2, lrd_padding)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_padding) == 28, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_padding)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_transno) == (int)offsetof(struct lsd_reply_data_v2, lrd_transno), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_transno), (int)offsetof(struct lsd_reply_data_v2, lrd_transno)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_transno), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_transno)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_xid) == (int)offsetof(struct lsd_reply_data_v2, lrd_xid), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_xid), (int)offsetof(struct lsd_reply_data_v2, lrd_xid)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_xid), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_xid)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_data) == (int)offsetof(struct lsd_reply_data_v2, lrd_data), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_data), (int)offsetof(struct lsd_reply_data_v2, lrd_data)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_data), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_data)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_result) == (int)offsetof(struct lsd_reply_data_v2, lrd_result), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_result), (int)offsetof(struct lsd_reply_data_v2, lrd_result)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_result), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_result)); + LASSERTF((int)offsetof(struct lsd_reply_data_v1, lrd_client_gen) == (int)offsetof(struct lsd_reply_data_v2, lrd_client_gen), "%d != %d\n", + (int)offsetof(struct lsd_reply_data_v1, lrd_client_gen), (int)offsetof(struct lsd_reply_data_v2, lrd_client_gen)); + LASSERTF((int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen) == (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen), "%d != %d\n", + (int)sizeof(((struct lsd_reply_data_v1 *)0)->lrd_client_gen), (int)sizeof(((struct lsd_reply_data_v2 *)0)->lrd_client_gen)); + LASSERTF(LRH_MAGIC_V1 == 0xbdabda01UL, "found 0x%.8xUL\n", + (unsigned)LRH_MAGIC_V1); + LASSERTF(LRH_MAGIC_V2 == 0xbdabda02UL, "found 0x%.8xUL\n", + (unsigned)LRH_MAGIC_V2); + /* Checks for struct lsd_reply_header */ + LASSERTF((int)sizeof(struct lsd_reply_header) == 32, "found %lld\n", + (long long)(int)sizeof(struct lsd_reply_header)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_magic) == 0, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_magic)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_magic)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_header_size) == 4, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_header_size)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_header_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_header_size)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_reply_size) == 8, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_reply_size)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_reply_size) == 4, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_reply_size)); + LASSERTF((int)offsetof(struct lsd_reply_header, lrh_pad) == 12, "found %lld\n", + (long long)(int)offsetof(struct lsd_reply_header, lrh_pad)); + LASSERTF((int)sizeof(((struct lsd_reply_header *)0)->lrh_pad) == 20, "found %lld\n", + (long long)(int)sizeof(((struct lsd_reply_header *)0)->lrh_pad)); + /* Checks for struct nodemap_cluster_rec */ LASSERTF((int)sizeof(struct nodemap_cluster_rec) == 32, "found %lld\n", (long long)(int)sizeof(struct nodemap_cluster_rec)); @@ -5876,6 +6235,138 @@ void lustre_assert_wire_constants(void) LASSERTF(NODEMAP_RBAC_ALL == 0xffffffffUL, "found 0x%.8xUL\n", (unsigned)NODEMAP_RBAC_ALL); + /* Checks for struct scrub_file */ + LASSERTF((int)sizeof(struct scrub_file) == 400, "found %lld\n", + (long long)(int)sizeof(struct scrub_file)); + LASSERTF((int)offsetof(struct scrub_file, sf_uuid) == 0, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_uuid)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_uuid) == 16, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_uuid)); + LASSERTF((int)offsetof(struct scrub_file, sf_flags) == 16, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_flags)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_flags) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_flags)); + LASSERTF((int)offsetof(struct scrub_file, sf_magic) == 24, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_magic)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_magic) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_magic)); + LASSERTF((int)offsetof(struct scrub_file, sf_status) == 28, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_status)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_status) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_status)); + LASSERTF((int)offsetof(struct scrub_file, sf_param) == 30, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_param)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_param) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_param)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_last_complete) == 32, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_last_complete)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_last_complete) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_last_complete)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_latest_start) == 40, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_latest_start)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_latest_start) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_latest_start)); + LASSERTF((int)offsetof(struct scrub_file, sf_time_last_checkpoint) == 48, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_time_last_checkpoint)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_time_last_checkpoint) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_time_last_checkpoint)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_latest_start) == 56, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_latest_start)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_latest_start) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_latest_start)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_last_checkpoint) == 64, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_last_checkpoint)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_last_checkpoint) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_last_checkpoint)); + LASSERTF((int)offsetof(struct scrub_file, sf_pos_first_inconsistent) == 72, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_pos_first_inconsistent)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_pos_first_inconsistent) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_pos_first_inconsistent)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_checked) == 80, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_checked)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_checked) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_checked)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_updated) == 88, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_updated)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_updated) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_updated)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_failed) == 96, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_failed)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_failed) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_failed)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_updated_prior) == 104, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_updated_prior)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_updated_prior) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_updated_prior)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_noscrub) == 112, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_noscrub)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_noscrub) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_noscrub)); + LASSERTF((int)offsetof(struct scrub_file, sf_items_igif) == 120, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_items_igif)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_items_igif) == 8, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_items_igif)); + LASSERTF((int)offsetof(struct scrub_file, sf_run_time) == 128, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_run_time)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_run_time) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_run_time)); + LASSERTF((int)offsetof(struct scrub_file, sf_success_count) == 132, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_success_count)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_success_count) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_success_count)); + LASSERTF((int)offsetof(struct scrub_file, sf_oi_count) == 136, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_oi_count)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_oi_count) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_oi_count)); + LASSERTF((int)offsetof(struct scrub_file, sf_internal_flags) == 138, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_internal_flags)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_internal_flags) == 2, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_internal_flags)); + LASSERTF((int)offsetof(struct scrub_file, sf_reserved_1) == 140, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_reserved_1)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_reserved_1) == 4, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_reserved_1)); + LASSERTF((int)offsetof(struct scrub_file, sf_reserved_2) == 144, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_reserved_2)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_reserved_2) == 128, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_reserved_2)); + LASSERTF((int)offsetof(struct scrub_file, sf_oi_bitmap) == 272, "found %lld\n", + (long long)(int)offsetof(struct scrub_file, sf_oi_bitmap)); + LASSERTF((int)sizeof(((struct scrub_file *)0)->sf_oi_bitmap) == 128, "found %lld\n", + (long long)(int)sizeof(((struct scrub_file *)0)->sf_oi_bitmap)); + LASSERTF(SCRUB_OI_BITMAP_SIZE == 128, "found %lld\n", + (long long)SCRUB_OI_BITMAP_SIZE); + LASSERTF(SCRUB_MAGIC_V1 == 0x4C5FD252, "found 0x%.8x\n", + SCRUB_MAGIC_V1); + LASSERTF(SCRUB_MAGIC_V2 == 0x4C5FE253, "found 0x%.8x\n", + SCRUB_MAGIC_V2); + LASSERTF(SF_RECREATED == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SF_RECREATED); + LASSERTF(SF_INCONSISTENT == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SF_INCONSISTENT); + LASSERTF(SF_AUTO == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)SF_AUTO); + LASSERTF(SF_UPGRADE == 0x00000008UL, "found 0x%.8xUL\n", + (unsigned)SF_UPGRADE); + LASSERTF(SS_INIT == 0x00000000UL, "found 0x%.8xUL\n", + (unsigned)SS_INIT); + LASSERTF(SS_SCANNING == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SS_SCANNING); + LASSERTF(SS_COMPLETED == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SS_COMPLETED); + LASSERTF(SS_FAILED == 0x00000003UL, "found 0x%.8xUL\n", + (unsigned)SS_FAILED); + LASSERTF(SS_STOPPED == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)SS_STOPPED); + LASSERTF(SS_PAUSED == 0x00000005UL, "found 0x%.8xUL\n", + (unsigned)SS_PAUSED); + LASSERTF(SS_CRASHED == 0x00000006UL, "found 0x%.8xUL\n", + (unsigned)SS_CRASHED); + LASSERTF(SP_FAILOUT == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)SP_FAILOUT); + LASSERTF(SP_DRYRUN == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)SP_DRYRUN); + LASSERTF(OFD_ACCESS_READ == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OFD_ACCESS_READ); LASSERTF(OFD_ACCESS_WRITE == 0x00000002UL, "found 0x%.8xUL\n", -- 1.8.3.1