+ /* Checks for struct out_update_header */
+ LASSERTF((int)sizeof(struct out_update_header) == 16, "found %lld\n",
+ (long long)(int)sizeof(struct out_update_header));
+ LASSERTF((int)offsetof(struct out_update_header, ouh_magic) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_header, ouh_magic));
+ LASSERTF((int)sizeof(((struct out_update_header *)0)->ouh_magic) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_header *)0)->ouh_magic));
+ LASSERTF((int)offsetof(struct out_update_header, ouh_count) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_header, ouh_count));
+ LASSERTF((int)sizeof(((struct out_update_header *)0)->ouh_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_header *)0)->ouh_count));
+ LASSERTF((int)offsetof(struct out_update_header, ouh_inline_length) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_header, ouh_inline_length));
+ LASSERTF((int)sizeof(((struct out_update_header *)0)->ouh_inline_length) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_header *)0)->ouh_inline_length));
+ LASSERTF((int)offsetof(struct out_update_header, ouh_reply_size) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_header, ouh_reply_size));
+ LASSERTF((int)sizeof(((struct out_update_header *)0)->ouh_reply_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_header *)0)->ouh_reply_size));
+ LASSERTF((int)offsetof(struct out_update_header, ouh_inline_data) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_header, ouh_inline_data));
+ LASSERTF((int)sizeof(((struct out_update_header *)0)->ouh_inline_data) == 0, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_header *)0)->ouh_inline_data));
+
+ /* Checks for struct out_update_buffer */
+ LASSERTF((int)sizeof(struct out_update_buffer) == 8, "found %lld\n",
+ (long long)(int)sizeof(struct out_update_buffer));
+ LASSERTF((int)offsetof(struct out_update_buffer, oub_size) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_buffer, oub_size));
+ LASSERTF((int)sizeof(((struct out_update_buffer *)0)->oub_size) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct out_update_buffer *)0)->oub_size));
+ LASSERTF((int)offsetof(struct out_update_buffer, oub_padding) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct out_update_buffer, oub_padding));
+ 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 lfsck_request */
+ LASSERTF((int)sizeof(struct lfsck_request) == 96, "found %lld\n",
+ (long long)(int)sizeof(struct lfsck_request));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_event) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_event));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_event) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_event));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_index) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_index));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_index) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_index));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_flags) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_flags));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_flags));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_valid) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_valid));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_valid) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_valid));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_speed) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_speed));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_speed) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_speed));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_version) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_version));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_version) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_version));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_active) == 22, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_active));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_active) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_active));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_param) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_param));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_param) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_param));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_async_windows) == 26, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_async_windows));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_async_windows) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_async_windows));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_flags) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_flags));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_flags));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_fid) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_fid));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_fid2) == 48, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_fid2));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid2) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid2));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_fid3) == 64, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_fid3));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid3) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid3));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 80, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_padding_1));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_1));
+ LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 88, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_request, lr_padding_2));
+ LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_2) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_2));
+ LASSERTF(LFSCK_TYPE_SCRUB == 0x00000000UL, "found 0x%.8xUL\n",
+ (unsigned)LFSCK_TYPE_SCRUB);
+ LASSERTF(LFSCK_TYPE_LAYOUT == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)LFSCK_TYPE_LAYOUT);
+ LASSERTF(LFSCK_TYPE_NAMESPACE == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)LFSCK_TYPE_NAMESPACE);
+ LASSERTF(LE_LASTID_REBUILDING == 1, "found %lld\n",
+ (long long)LE_LASTID_REBUILDING);
+ LASSERTF(LE_LASTID_REBUILT == 2, "found %lld\n",
+ (long long)LE_LASTID_REBUILT);
+ LASSERTF(LE_PHASE1_DONE == 3, "found %lld\n",
+ (long long)LE_PHASE1_DONE);
+ LASSERTF(LE_PHASE2_DONE == 4, "found %lld\n",
+ (long long)LE_PHASE2_DONE);
+ LASSERTF(LE_START == 5, "found %lld\n",
+ (long long)LE_START);
+ LASSERTF(LE_STOP == 6, "found %lld\n",
+ (long long)LE_STOP);
+ LASSERTF(LE_QUERY == 7, "found %lld\n",
+ (long long)LE_QUERY);
+ LASSERTF(LE_FID_ACCESSED == 8, "found %lld\n",
+ (long long)LE_FID_ACCESSED);
+ LASSERTF(LE_PEER_EXIT == 9, "found %lld\n",
+ (long long)LE_PEER_EXIT);
+ LASSERTF(LE_CONDITIONAL_DESTROY == 10, "found %lld\n",
+ (long long)LE_CONDITIONAL_DESTROY);
+ LASSERTF(LE_PAIRS_VERIFY == 11, "found %lld\n",
+ (long long)LE_PAIRS_VERIFY);
+ LASSERTF(LE_SKIP_NLINK_DECLARE == 13, "found %lld\n",
+ (long long)LE_SKIP_NLINK_DECLARE);
+ LASSERTF(LE_SKIP_NLINK == 14, "found %lld\n",
+ (long long)LE_SKIP_NLINK);
+ LASSERTF(LE_SET_LMV_MASTER == 15, "found %lld\n",
+ (long long)LE_SET_LMV_MASTER);
+ LASSERTF(LE_SET_LMV_SLAVE == 16, "found %lld\n",
+ (long long)LE_SET_LMV_SLAVE);
+ LASSERTF(LEF_TO_OST == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)LEF_TO_OST);
+ LASSERTF(LEF_FROM_OST == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)LEF_FROM_OST);
+ LASSERTF(LEF_SET_LMV_HASH == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)LEF_SET_LMV_HASH);
+ LASSERTF(LEF_SET_LMV_ALL == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)LEF_SET_LMV_ALL);
+ LASSERTF(LEF_RECHECK_NAME_HASH == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)LEF_RECHECK_NAME_HASH);
+
+ /* Checks for struct lfsck_reply */
+ LASSERTF((int)sizeof(struct lfsck_reply) == 16, "found %lld\n",
+ (long long)(int)sizeof(struct lfsck_reply));
+ LASSERTF((int)offsetof(struct lfsck_reply, lr_status) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_reply, lr_status));
+ LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_status) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_status));
+ LASSERTF((int)offsetof(struct lfsck_reply, lr_padding_1) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_reply, lr_padding_1));
+ LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_padding_1) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_padding_1));
+ LASSERTF((int)offsetof(struct lfsck_reply, lr_padding_2) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lfsck_reply, lr_padding_2));
+ LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_padding_2) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_padding_2));
+
+ /* Checks for struct update_params */
+ LASSERTF((int)sizeof(struct update_params) == 0, "found %lld\n",
+ (long long)(int)sizeof(struct update_params));
+ LASSERTF((int)offsetof(struct update_params, up_params) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct update_params, up_params));
+ LASSERTF((int)sizeof(((struct update_params *)0)->up_params) == 0, "found %lld\n",
+ (long long)(int)sizeof(((struct update_params *)0)->up_params));
+
+ /* Checks for struct update_op */
+ LASSERTF((int)sizeof(struct update_op) == 24, "found %lld\n",
+ (long long)(int)sizeof(struct update_op));
+ LASSERTF((int)offsetof(struct update_op, uop_fid) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct update_op, uop_fid));
+ LASSERTF((int)sizeof(((struct update_op *)0)->uop_fid) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct update_op *)0)->uop_fid));
+ LASSERTF((int)offsetof(struct update_op, uop_type) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct update_op, uop_type));
+ LASSERTF((int)sizeof(((struct update_op *)0)->uop_type) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct update_op *)0)->uop_type));
+ LASSERTF((int)offsetof(struct update_op, uop_param_count) == 18, "found %lld\n",
+ (long long)(int)offsetof(struct update_op, uop_param_count));
+ LASSERTF((int)sizeof(((struct update_op *)0)->uop_param_count) == 2, "found %lld\n",
+ (long long)(int)sizeof(((struct update_op *)0)->uop_param_count));
+ LASSERTF((int)offsetof(struct update_op, uop_params_off) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct update_op, uop_params_off));
+ LASSERTF((int)sizeof(((struct update_op *)0)->uop_params_off) == 0, "found %lld\n",
+ (long long)(int)sizeof(((struct update_op *)0)->uop_params_off));
+
+ /* Checks for struct update_ops */
+ LASSERTF((int)sizeof(struct update_ops) == 0, "found %lld\n",
+ (long long)(int)sizeof(struct update_ops));
+ LASSERTF((int)offsetof(struct update_ops, uops_op) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct update_ops, uops_op));
+ LASSERTF((int)sizeof(((struct update_ops *)0)->uops_op) == 0, "found %lld\n",
+ (long long)(int)sizeof(((struct update_ops *)0)->uops_op));
+
+ /* Checks for struct update_records */
+ LASSERTF((int)sizeof(struct update_records) == 32, "found %lld\n",
+ (long long)(int)sizeof(struct update_records));
+ LASSERTF((int)offsetof(struct update_records, ur_master_transno) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_master_transno));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_master_transno) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_master_transno));
+ LASSERTF((int)offsetof(struct update_records, ur_batchid) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_batchid));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_batchid) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_batchid));
+ LASSERTF((int)offsetof(struct update_records, ur_flags) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_flags));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_flags));
+ LASSERTF((int)offsetof(struct update_records, ur_index) == 20, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_index));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_index) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_index));
+ LASSERTF((int)offsetof(struct update_records, ur_update_count) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_update_count));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_update_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_update_count));
+ LASSERTF((int)offsetof(struct update_records, ur_param_count) == 28, "found %lld\n",
+ (long long)(int)offsetof(struct update_records, ur_param_count));
+ LASSERTF((int)sizeof(((struct update_records *)0)->ur_param_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct update_records *)0)->ur_param_count));
+ LASSERTF(UPDATE_RECORD_CONTINUE == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)UPDATE_RECORD_CONTINUE);
+
+ /* Checks for struct llog_update_record */
+ LASSERTF((int)sizeof(struct llog_update_record) == 48, "found %lld\n",
+ (long long)(int)sizeof(struct llog_update_record));
+ LASSERTF((int)offsetof(struct llog_update_record, lur_hdr) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct llog_update_record, lur_hdr));
+ LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_hdr) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct llog_update_record *)0)->lur_hdr));
+ LASSERTF((int)offsetof(struct llog_update_record, lur_update_rec) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct llog_update_record, lur_update_rec));
+ LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
+ (long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
+}