From 059f43761831c9e9cd5926c6e38c3c581c915d0f Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 28 Mar 2005 20:28:11 +0000 Subject: [PATCH] b=4952 r=adilger Protocol change! This commit breaks wire protocol compatibility. connect messages now exchange another buffer, which currently contains only flags. This is used to implement read-only mounting, but will be used to fix other issues as well. The flags are exchanged with the MDT and OST, but currently only the MDT pays any attention to them. The places that check the disk are carefuly to check the export for its read-only status. Having this flag in the export gives us the opportunity to also set it when the client doesn't request it, to force read-only mounts as a security policy. This commit also adds remount_fs method, which can make use of mdc_set_info to change the rw/ro status at remount-time. And osc_set_info should follow. --- lustre/include/linux/lustre_export.h | 1 + lustre/include/linux/lustre_idl.h | 18 + lustre/include/linux/lustre_import.h | 1 + lustre/include/linux/lustre_net.h | 2 +- lustre/include/linux/obd.h | 2 +- lustre/include/linux/obd_class.h | 7 +- lustre/ldlm/ldlm_lib.c | 21 +- lustre/liblustre/llite_lib.c | 2 +- lustre/liblustre/super.c | 4 +- lustre/llite/llite_internal.h | 3 + lustre/llite/llite_lib.c | 20 +- lustre/llite/super.c | 24 +- lustre/llite/super25.c | 3 +- lustre/lov/lov_obd.c | 4 +- lustre/mdc/mdc_request.c | 31 +- lustre/mds/handler.c | 49 +- lustre/mds/mds_lov.c | 3 +- lustre/mds/mds_open.c | 7 + lustre/mds/mds_reint.c | 47 +- lustre/obdclass/llog_test.c | 2 +- lustre/obdecho/echo.c | 2 +- lustre/obdecho/echo_client.c | 5 +- lustre/obdfilter/filter.c | 3 +- lustre/osc/osc_request.c | 14 +- lustre/ptlrpc/import.c | 13 +- lustre/ptlrpc/lproc_ptlrpc.c | 1 + lustre/ptlrpc/pack_generic.c | 994 ++++++++++++++++++----------------- lustre/utils/llmount.c | 1 + lustre/utils/wirecheck.c | 1 + 29 files changed, 728 insertions(+), 557 deletions(-) diff --git a/lustre/include/linux/lustre_export.h b/lustre/include/linux/lustre_export.h index 8683d0c..5136d66 100644 --- a/lustre/include/linux/lustre_export.h +++ b/lustre/include/linux/lustre_export.h @@ -64,6 +64,7 @@ struct obd_export { time_t exp_last_request_time; spinlock_t exp_lock; /* protects flags int below */ /* ^ protects exp_outstanding_replies too */ + __u64 exp_connect_flags; int exp_flags; unsigned int exp_failed:1, exp_replay_needed:1, diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index a409d97..a5d4405 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -193,6 +193,23 @@ static inline void lustre_msg_set_op_flags(struct lustre_msg *msg, int flags) //#define MSG_CONNECT_PEER 0x8 #define MSG_CONNECT_LIBCLIENT 0x10 +/* Connect flags */ + +#define OBD_CONNECT_RDONLY 0x1 + +#define OBD_CONNECT_SUPPORTED (OBD_CONNECT_RDONLY) + +/* This structure is used for both request and reply. + * + * If we eventually have separate connect data for different types, which we + * almost certainly will, then perhaps we stick a union in here. */ +struct obd_connect_data { + __u64 ocd_connect_flags; + __u64 padding[8]; +}; + +extern void lustre_swab_connect(struct obd_connect_data *ocd); + /* * OST requests: OBDO & OBD request records */ @@ -435,6 +452,7 @@ typedef enum { MDS_UNPIN = 43, MDS_SYNC = 44, MDS_DONE_WRITING = 45, + MDS_SET_INFO = 46, MDS_LAST_OPC } mds_cmd_t; diff --git a/lustre/include/linux/lustre_import.h b/lustre/include/linux/lustre_import.h index 481f082..d5e2b2c 100644 --- a/lustre/include/linux/lustre_import.h +++ b/lustre/include/linux/lustre_import.h @@ -80,6 +80,7 @@ struct obd_import { imp_pingable:1, imp_resend_replay:1, imp_deactive:1; __u32 imp_connect_op; + struct obd_connect_data imp_connect_data; }; typedef void (*obd_import_callback)(struct obd_import *imp, void *closure, diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index 7fccdef..d67e511 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -740,7 +740,7 @@ ptlrpc_rs_decref(struct ptlrpc_reply_state *rs) int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf); int client_obd_cleanup(struct obd_device * obddev); int client_connect_import(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid); + struct obd_uuid *cluuid, struct obd_connect_data *); int client_disconnect_export(struct obd_export *exp); /* ptlrpc/pinger.c */ diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index e1f6afe..673ce6d 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -566,7 +566,7 @@ struct obd_ops { int (*o_cleanup)(struct obd_device *dev); int (*o_postrecov)(struct obd_device *dev); int (*o_connect)(struct lustre_handle *conn, struct obd_device *src, - struct obd_uuid *cluuid); + struct obd_uuid *cluuid, struct obd_connect_data *); int (*o_disconnect)(struct obd_export *exp); int (*o_statfs)(struct obd_device *obd, struct obd_statfs *osfs, diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index d7b340f..488e08d 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -454,8 +454,9 @@ static inline int obd_setattr(struct obd_export *exp, struct obdo *obdo, RETURN(rc); } -static inline int obd_connect(struct lustre_handle *conn, - struct obd_device *obd, struct obd_uuid *cluuid) +static inline int obd_connect(struct lustre_handle *conn, struct obd_device *obd, + struct obd_uuid *cluuid, + struct obd_connect_data *data) { int rc; ENTRY; @@ -464,7 +465,7 @@ static inline int obd_connect(struct lustre_handle *conn, OBD_CHECK_OP(obd, connect, -EOPNOTSUPP); OBD_COUNTER_INCREMENT(obd, connect); - rc = OBP(obd, connect)(conn, obd, cluuid); + rc = OBP(obd, connect)(conn, obd, cluuid, data); RETURN(rc); } diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 28e6a7f..e91833c 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -234,8 +234,8 @@ int client_obd_cleanup(struct obd_device *obddev) } int client_connect_import(struct lustre_handle *dlm_handle, - struct obd_device *obd, - struct obd_uuid *cluuid) + struct obd_device *obd, struct obd_uuid *cluuid, + struct obd_connect_data *data) { struct client_obd *cli = &obd->u.cli; struct obd_import *imp = cli->cl_import; @@ -266,6 +266,8 @@ int client_connect_import(struct lustre_handle *dlm_handle, GOTO(out_ldlm, rc); exp->exp_connection = ptlrpc_connection_addref(imp->imp_connection); + if (data) + memcpy(&imp->imp_connect_data, data, sizeof(*data)); rc = ptlrpc_connect_import(imp, NULL); if (rc != 0) { LASSERT (imp->imp_state == LUSTRE_IMP_DISCON); @@ -394,6 +396,8 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) char *str, *tmp; int rc = 0, abort_recovery; unsigned long flags; + struct obd_connect_data *data; + int size = sizeof(*data); ENTRY; OBD_RACE(OBD_FAIL_TGT_CONN_RACE); @@ -452,7 +456,11 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) memcpy(&conn, tmp, sizeof conn); - rc = lustre_pack_reply(req, 0, NULL, NULL); + data = lustre_swab_reqbuf(req, 3, sizeof(*data), lustre_swab_connect); + if (data == NULL) + GOTO(out, rc = -EPROTO); + + rc = lustre_pack_reply(req, 1, &size, NULL); if (rc) GOTO(out, rc); @@ -501,10 +509,15 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) rc = -EBUSY; } else { dont_check_exports: - rc = obd_connect(&conn, target, &cluuid); + rc = obd_connect(&conn, target, &cluuid, data); } } + /* Return only the parts of obd_connect_data that we understand, so the + * client knows that we don't understand the rest. */ + data->ocd_connect_flags &= OBD_CONNECT_SUPPORTED; + memcpy(lustre_msg_buf(req->rq_repmsg, 0, sizeof(*data)), data, + sizeof(*data)); /* If all else goes well, this is our RPC return code. */ req->rq_status = 0; diff --git a/lustre/liblustre/llite_lib.c b/lustre/liblustre/llite_lib.c index 2ec8d83..d9f3470 100644 --- a/lustre/liblustre/llite_lib.c +++ b/lustre/liblustre/llite_lib.c @@ -311,7 +311,7 @@ int liblustre_process_log(struct config_llog_instance *cfg, int allow_recov) strlen("initial_recov"), "initial_recov", sizeof(allow_recov), &allow_recov); - err = obd_connect(&mdc_conn, obd, &mdc_uuid); + err = obd_connect(&mdc_conn, obd, &mdc_uuid, NULL /*connect_flags*/); if (err) { CERROR("cannot connect to %s: rc = %d\n", g_zconf_mdsname, err); diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index 44735fd..9972f1a 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -1346,7 +1346,7 @@ llu_fsswop_mount(const char *source, } /* setup mdc */ - err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid); + err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, NULL /* ocd */); if (err) { CERROR("cannot connect to %s: rc = %d\n", mdc, err); GOTO(out_free, err); @@ -1368,7 +1368,7 @@ llu_fsswop_mount(const char *source, GOTO(out_mdc, err = -EINVAL); } - err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid); + err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, NULL /* ocd */); if (err) { CERROR("cannot connect to %s: rc = %d\n", osc, err); GOTO(out_mdc, err); diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 9e566f9..25fcec0 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -369,6 +369,9 @@ void ll_queue_done_writing(struct inode *inode); void ll_close_thread_shutdown(struct ll_close_queue *lcq); int ll_close_thread_start(struct ll_close_queue **lcq_ret); +/* llite/super.c */ +int lustre_remount_fs(struct super_block *sb, int *flags, char *data); + /* llite/llite_mmap.c */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) typedef struct rb_root rb_root_t; diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 7e573a1..095d8ea 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -3,7 +3,7 @@ * * Lustre Light Super operations * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. + * Copyright (c) 2002-2005 Cluster File Systems, Inc. * * This file is part of Lustre, http://www.lustre.org. * @@ -132,6 +132,7 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc) struct lustre_handle osc_conn = {0, }; struct lustre_handle mdc_conn = {0, }; struct lustre_md md; + struct obd_connect_data *data = NULL; kdev_t devno; int err; ENTRY; @@ -142,6 +143,10 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc) RETURN(-EINVAL); } + OBD_ALLOC(data, sizeof(*data)); + if (data == NULL) + RETURN(-ENOMEM); + if (proc_lustre_fs_root) { err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb, osc, mdc); @@ -149,7 +154,10 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc) CERROR("could not register mount in /proc/lustre"); } - err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid); + if (sb->s_flags & MS_RDONLY) + data->ocd_connect_flags |= OBD_CONNECT_RDONLY; + + err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, data); if (err == -EBUSY) { CERROR("An MDS (mdc %s) is performing recovery, of which this" " client is not a part. Please wait for recovery to " @@ -183,7 +191,7 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc) GOTO(out_mdc, err); } - err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid); + err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, data); if (err == -EBUSY) { CERROR("An OST (osc %s) is performing recovery, of which this" " client is not a part. Please wait for recovery to " @@ -262,6 +270,8 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc) #endif sb->s_root = d_alloc_root(root); + if (data != NULL) + OBD_FREE(data, sizeof(*data)); RETURN(err); out_root: @@ -272,6 +282,8 @@ out_osc: out_mdc: obd_disconnect(sbi->ll_mdc_exp); out: + if (data != NULL) + OBD_FREE(data, sizeof(*data)); lprocfs_unregister_mountpoint(sbi); RETURN(err); } @@ -566,7 +578,7 @@ int lustre_process_log(struct lustre_mount_data *lmd, char * profile, if (err) GOTO(out_cleanup, err); - err = obd_connect(&mdc_conn, obd, &mdc_uuid); + err = obd_connect(&mdc_conn, obd, &mdc_uuid, NULL /* ocd */); if (err) { CERROR("cannot connect to %s: rc = %d\n", lmd->lmd_mds, err); GOTO(out_cleanup, err); diff --git a/lustre/llite/super.c b/lustre/llite/super.c index dc8f15c..80d555a 100644 --- a/lustre/llite/super.c +++ b/lustre/llite/super.c @@ -52,7 +52,7 @@ static struct super_block *ll_read_super(struct super_block *sb, } static struct super_block *lustre_read_super(struct super_block *sb, - void *data, int silent) + void *data, int silent) { int err; ENTRY; @@ -62,6 +62,25 @@ static struct super_block *lustre_read_super(struct super_block *sb, RETURN(sb); } +int lustre_remount_fs(struct super_block *sb, int *flags, char *data) +{ + struct ll_sb_info *sbi = ll_s2sbi(sb); + int err; + __u32 read_only; + + if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { + read_only = *flags & MS_RDONLY; + err = obd_set_info(sbi->ll_mdc_exp, strlen("read-only"), + "read-only", sizeof(read_only), &read_only); + if (err) { + CERROR("Failed to change the read-only flag during " + "remount: %d\n", err); + return err; + } + } + return 0; +} + static struct file_system_type lustre_lite_fs_type = { .owner = THIS_MODULE, .name = "lustre_lite", @@ -79,7 +98,8 @@ struct super_operations lustre_super_operations = .statfs = ll_statfs, .umount_begin = ll_umount_begin, .fh_to_dentry = ll_fh_to_dentry, - .dentry_to_fh = ll_dentry_to_fh + .dentry_to_fh = ll_dentry_to_fh, + .remount_fs = lustre_remount_fs, }; static struct file_system_type lustre_fs_type = { diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index d1dd317..8fc9af4 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -105,7 +105,8 @@ struct super_operations lustre_super_operations = .clear_inode = ll_clear_inode, .put_super = lustre_put_super, .statfs = ll_statfs, - .umount_begin = ll_umount_begin + .umount_begin = ll_umount_begin, + .remount_fs = lustre_remount_fs, }; diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 98c2350..a7517fa 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -54,7 +54,7 @@ /* obd methods */ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid) + struct obd_uuid *cluuid, struct obd_connect_data *data) { struct ptlrpc_request *req = NULL; struct lov_obd *lov = &obd->u.lov; @@ -111,7 +111,7 @@ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, continue; } - rc = obd_connect(&conn, tgt_obd, &lov_osc_uuid); + rc = obd_connect(&conn, tgt_obd, &lov_osc_uuid, data); if (rc) { CERROR("Target %s connect error %d\n", tgt_uuid->uuid, rc); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 239e874..f7cc298 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -669,19 +669,44 @@ out: int mdc_set_info(struct obd_export *exp, obd_count keylen, void *key, obd_count vallen, void *val) { + struct obd_import *imp = class_exp2cliimp(exp); int rc = -EINVAL; if (keylen == strlen("initial_recov") && memcmp(key, "initial_recov", strlen("initial_recov")) == 0) { - struct obd_import *imp = exp->exp_obd->u.cli.cl_import; if (vallen != sizeof(int)) RETURN(-EINVAL); imp->imp_initial_recov = *(int *)val; CDEBUG(D_HA, "%s: set imp_no_init_recov = %d\n", - exp->exp_obd->obd_name, - imp->imp_initial_recov); + exp->exp_obd->obd_name, imp->imp_initial_recov); RETURN(0); } + if (keylen == strlen("read-only") && + memcmp(key, "read-only", strlen("read-only")) == 0) { + struct ptlrpc_request *req; + int size[2] = {keylen, vallen}; + char *bufs[2] = {key, val}; + + if (vallen != sizeof(int)) + RETURN(-EINVAL); + + if (*((int *)val)) { + imp->imp_connect_data.ocd_connect_flags |= + OBD_CONNECT_RDONLY; + } else { + imp->imp_connect_data.ocd_connect_flags &= + ~OBD_CONNECT_RDONLY; + } + + req = ptlrpc_prep_req(imp, MDS_SET_INFO, 2, size, bufs); + if (req == NULL) + RETURN(-ENOMEM); + + req->rq_replen = lustre_msg_size(0, NULL); + rc = ptlrpc_queue_wait(req); + ptlrpc_req_finished(req); + RETURN(rc); + } RETURN(rc); } diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index d159139..50853b9 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -4,7 +4,7 @@ * lustre/mds/handler.c * Lustre Metadata Server (mds) request handler * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. + * Copyright (c) 2001-2005 Cluster File Systems, Inc. * Author: Peter Braam * Author: Andreas Dilger * Author: Phil Schwan @@ -245,7 +245,7 @@ struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, * on the server, etc. */ static int mds_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid) + struct obd_uuid *cluuid, struct obd_connect_data *data) { struct obd_export *exp; struct mds_export_data *med; /* */ @@ -280,6 +280,8 @@ static int mds_connect(struct lustre_handle *conn, struct obd_device *obd, LASSERT(exp); med = &exp->exp_mds_data; + exp->exp_connect_flags = data->ocd_connect_flags; + OBD_ALLOC(mcd, sizeof(*mcd)); if (!mcd) { CERROR("mds: out of memory for client data\n"); @@ -1068,6 +1070,44 @@ static char *reint_names[] = { [REINT_OPEN] "open", }; +static int mds_set_info(struct obd_export *exp, struct ptlrpc_request *req) +{ + char *key; + __u32 *val; + int keylen, rc = 0; + ENTRY; + + key = lustre_msg_buf(req->rq_reqmsg, 0, 1); + if (key == NULL) { + DEBUG_REQ(D_HA, req, "no set_info key"); + RETURN(-EFAULT); + } + keylen = req->rq_reqmsg->buflens[0]; + + val = lustre_msg_buf(req->rq_reqmsg, 1, sizeof(*val)); + if (val == NULL) { + DEBUG_REQ(D_HA, req, "no set_info val"); + RETURN(-EFAULT); + } + + rc = lustre_pack_reply(req, 0, NULL, NULL); + if (rc) + RETURN(rc); + req->rq_repmsg->status = 0; + + if (keylen < strlen("read-only") || + memcmp(key, "read-only", keylen) != 0) + RETURN(-EINVAL); + + if (*val) + exp->exp_connect_flags |= OBD_CONNECT_RDONLY; + else + exp->exp_connect_flags &= ~OBD_CONNECT_RDONLY; + + RETURN(0); +} + + int mds_handle(struct ptlrpc_request *req) { int should_process, fail = OBD_FAIL_MDS_ALL_REPLY_NET; @@ -1254,6 +1294,11 @@ int mds_handle(struct ptlrpc_request *req) rc = mds_sync(req); break; + case MDS_SET_INFO: + DEBUG_REQ(D_INODE, req, "set_info"); + rc = mds_set_info(req->rq_export, req); + break; + case OBD_PING: DEBUG_REQ(D_INODE, req, "ping"); rc = target_handle_ping(req); diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index a167f40..740ca84 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -175,7 +175,8 @@ int mds_lov_connect(struct obd_device *obd, char * lov_name) RETURN(-ENOTCONN); } - rc = obd_connect(&conn, mds->mds_osc_obd, &obd->obd_uuid); + rc = obd_connect(&conn, mds->mds_osc_obd, &obd->obd_uuid, + NULL /* obd_connect_data */); if (rc) { CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc); mds->mds_osc_obd = ERR_PTR(rc); diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 98ade8a..cf9d0144 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -903,6 +903,9 @@ int mds_open(struct mds_update_record *rec, int offset, GOTO(cleanup, rc = -ENOENT); } + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + GOTO(cleanup, rc = -EROFS); + intent_set_disposition(rep, DISP_OPEN_CREATE); handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_CREATE, NULL); @@ -977,6 +980,10 @@ int mds_open(struct mds_update_record *rec, int offset, if (rc != 0) GOTO(cleanup, rc); + if ((req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) && + (acc_mode & MAY_WRITE)) + GOTO(cleanup, rc = -EROFS); + /* Can't write to a read-only file */ if (IS_RDONLY(dchild->d_inode) && (acc_mode & MAY_WRITE) != 0) GOTO(cleanup, rc = -EPERM); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 90871e1..1f310b8 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -4,7 +4,7 @@ * linux/mds/mds_reint.c * Lustre Metadata Server (mds) reintegration routines * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. + * Copyright (C) 2002-2005 Cluster File Systems, Inc. * Author: Peter Braam * Author: Andreas Dilger * Author: Phil Schwan @@ -390,10 +390,13 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset, MDS_CHECK_RESENT(req, reconstruct_reint_setattr(rec, offset, req)); - if (rec->ur_iattr.ia_valid & ATTR_FROM_OPEN) { + if (rec->ur_iattr.ia_valid & ATTR_FROM_OPEN || + (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)) { de = mds_fid2dentry(mds, rec->ur_fid1, NULL); if (IS_ERR(de)) GOTO(cleanup, rc = PTR_ERR(de)); + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + GOTO(cleanup, rc = -EROFS); } else { de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_PW, &lockh, NULL, 0); @@ -588,6 +591,12 @@ static int mds_reint_create(struct mds_update_record *rec, int offset, OBD_FAIL_WRITE(OBD_FAIL_MDS_REINT_CREATE_WRITE, dir->i_sb); + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) { + if (dchild->d_inode) + GOTO(cleanup, rc = -EEXIST); + GOTO(cleanup, rc = -EROFS); + } + if (dir->i_mode & S_ISGID) { if (S_ISDIR(rec->ur_mode)) rec->ur_mode |= S_ISGID; @@ -1236,7 +1245,22 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset, cleanup_phase = 2; /* dchild has a lock */ - /* Step 4: Get a lock on the ino to sync with creation WRT inode + /* We have to do these checks ourselves, in case we are making an + * orphan. The client tells us whether rmdir() or unlink() was called, + * so we need to return appropriate errors (bug 72). */ + if ((rec->ur_mode & S_IFMT) == S_IFDIR) { + if (!S_ISDIR(child_inode->i_mode)) + GOTO(cleanup, rc = -ENOTDIR); + } else { + if (S_ISDIR(child_inode->i_mode)) + GOTO(cleanup, rc = -EISDIR); + } + + /* Check for EROFS after we check ENODENT, ENOTDIR, and EISDIR */ + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + GOTO(cleanup, rc = -EROFS); + + /* Step 3: Get a lock on the ino to sync with creation WRT inode * reuse (see bug 2029). */ rc = mds_lock_new_child(obd, child_inode, &child_reuse_lockh); if (rc != ELDLM_OK) @@ -1274,17 +1298,6 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset, } } - /* We have to do these checks ourselves, in case we are making an - * orphan. The client tells us whether rmdir() or unlink() was called, - * so we need to return appropriate errors (bug 72). */ - if ((rec->ur_mode & S_IFMT) == S_IFDIR) { - if (!S_ISDIR(child_inode->i_mode)) - GOTO(cleanup, rc = -ENOTDIR); - } else { - if (S_ISDIR(child_inode->i_mode)) - GOTO(cleanup, rc = -EISDIR); - } - /* Step 4: Do the unlink: we already verified ur_mode above (bug 72) */ switch (child_inode->i_mode & S_IFMT) { case S_IFDIR: @@ -1483,6 +1496,9 @@ static int mds_reint_link(struct mds_update_record *rec, int offset, /* Step 4: Do it. */ OBD_FAIL_WRITE(OBD_FAIL_MDS_REINT_LINK_WRITE, de_src->d_inode->i_sb); + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + GOTO(cleanup, rc = -EROFS); + handle = fsfilt_start(obd, de_tgt_dir->d_inode, FSFILT_OP_LINK, NULL); if (IS_ERR(handle)) { rc = PTR_ERR(handle); @@ -1761,6 +1777,9 @@ static int mds_reint_rename(struct mds_update_record *rec, int offset, old_inode->i_ino == de_tgtdir->d_inode->i_ino) GOTO(cleanup, rc = -EINVAL); + if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + GOTO(cleanup, rc = -EROFS); + if (new_inode == NULL) goto no_unlink; diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index 7d851fe..e694153 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -452,7 +452,7 @@ static int llog_test_6(struct obd_device *obd, char *name) RETURN(-ENOENT); } - rc = obd_connect(&exph, mdc_obd, &uuid); + rc = obd_connect(&exph, mdc_obd, &uuid, NULL /* obd_connect_data */); if (rc) { CERROR("6: failed to connect to MDC: %s\n", mdc_obd->obd_name); RETURN(rc); diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index 63d8f99..cb60624 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -59,7 +59,7 @@ enum { }; static int echo_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid) + struct obd_uuid *cluuid, struct obd_connect_data *data) { return class_connect(conn, obd, cluuid); } diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index f07ee99..806788d 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -1345,7 +1345,7 @@ echo_client_setup(struct obd_device *obddev, obd_count len, void *buf) INIT_LIST_HEAD (&ec->ec_objects); ec->ec_unique = 0; - rc = obd_connect(&conn, tgt, &echo_uuid); + rc = obd_connect(&conn, tgt, &echo_uuid, NULL /* obd_connect_data */); if (rc) { CERROR("fail to connect to device %s\n", lustre_cfg_string(lcfg, 1)); @@ -1388,7 +1388,8 @@ static int echo_client_cleanup(struct obd_device *obddev) } static int echo_client_connect(struct lustre_handle *conn, - struct obd_device *src, struct obd_uuid *cluuid) + struct obd_device *src, struct obd_uuid *cluuid, + struct obd_connect_data *data) { struct obd_export *exp; int rc; diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 647fe5e..569b5ae 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1413,7 +1413,7 @@ static int filter_cleanup(struct obd_device *obd) /* nearly identical to mds_connect */ static int filter_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid) + struct obd_uuid *cluuid, struct obd_connect_data *data) { struct obd_export *exp; struct filter_export_data *fed; @@ -1432,6 +1432,7 @@ static int filter_connect(struct lustre_handle *conn, struct obd_device *obd, LASSERT(exp != NULL); fed = &exp->exp_filter_data; + exp->exp_connect_flags = data->ocd_connect_flags; spin_lock_init(&fed->fed_lock); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 2681a46..28f28db 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -2973,16 +2973,6 @@ static int osc_llog_finish(struct obd_device *obd, int count) } -static int osc_connect(struct lustre_handle *exph, - struct obd_device *obd, struct obd_uuid *cluuid) -{ - int rc; - - rc = client_connect_import(exph, obd, cluuid); - - return rc; -} - static int osc_disconnect(struct obd_export *exp) { struct obd_device *obd = class_exp2obd(exp); @@ -3110,7 +3100,7 @@ struct obd_ops osc_obd_ops = { .o_owner = THIS_MODULE, .o_setup = osc_setup, .o_cleanup = osc_cleanup, - .o_connect = osc_connect, + .o_connect = client_connect_import, .o_disconnect = osc_disconnect, .o_statfs = osc_statfs, .o_packmd = osc_packmd, @@ -3148,7 +3138,7 @@ struct obd_ops osc_obd_ops = { struct obd_ops sanosc_obd_ops = { .o_owner = THIS_MODULE, .o_cleanup = client_obd_cleanup, - .o_connect = osc_connect, + .o_connect = client_connect_import, .o_disconnect = client_disconnect_export, .o_statfs = osc_statfs, .o_packmd = osc_packmd, diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index f2922f3..c54cba7 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -251,11 +251,13 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid) __u64 committed_before_reconnect = 0; struct ptlrpc_request *request; int size[] = {sizeof(imp->imp_target_uuid), - sizeof(obd->obd_uuid), - sizeof(imp->imp_dlm_handle)}; + sizeof(obd->obd_uuid), + sizeof(imp->imp_dlm_handle), + sizeof(imp->imp_connect_data)}; char *tmp[] = {imp->imp_target_uuid.uuid, obd->obd_uuid.uuid, - (char *)&imp->imp_dlm_handle}; + (char *)&imp->imp_dlm_handle, + (char *)&imp->imp_connect_data}; struct ptlrpc_connect_async_args *aa; unsigned long flags; @@ -322,7 +324,7 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid) } - request = ptlrpc_prep_req(imp, imp->imp_connect_op, 3, size, tmp); + request = ptlrpc_prep_req(imp, imp->imp_connect_op, 4, size, tmp); if (!request) GOTO(out, rc = -ENOMEM); @@ -331,7 +333,8 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid) #endif request->rq_send_state = LUSTRE_IMP_CONNECTING; - request->rq_replen = lustre_msg_size(0, NULL); + size[0] = sizeof(struct obd_connect_data); + request->rq_replen = lustre_msg_size(1, size); request->rq_interpret_reply = ptlrpc_connect_interpret; LASSERT (sizeof (*aa) <= sizeof (request->rq_async_args)); diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index e7299bc..5437cb4 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -66,6 +66,7 @@ struct ll_rpc_opcode { { MDS_UNPIN, "mds_unpin" }, { MDS_SYNC, "mds_sync" }, { MDS_DONE_WRITING, "mds_done_writing" }, + { MDS_SET_INFO, "mds_set_info" }, { LDLM_ENQUEUE, "ldlm_enqueue" }, { LDLM_CONVERT, "ldlm_convert" }, { LDLM_CANCEL, "ldlm_cancel" }, diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index aa4c917..955fe2f 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -355,6 +355,11 @@ void *lustre_swab_repbuf(struct ptlrpc_request *req, int index, int min_size, * lustre_idl.h implemented here. */ +void lustre_swab_connect(struct obd_connect_data *ocd) +{ + __swab64s (&ocd->ocd_connect_flags); +} + void lustre_swab_obdo (struct obdo *o) { __swab64s (&o->o_id); @@ -679,8 +684,8 @@ void lustre_swab_ptlbd_rsp (struct ptlbd_rsp *r) void lustre_assert_wire_constants(void) { /* Wire protocol assertions generated by 'wirecheck' - * running on Linux milano 2.4.21-20.EL_87k.6-b_release_1_3_3.200410121845smp #1 SMP Tue Oct - * with gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) */ + * running on Linux b9.boston.clusterfs.com 2.4.21-27.0.2.EL_lustre.1.4.0.10smp #1 SMP Tue Fe + * with gcc version 3.4.1 20040702 (Red Hat Linux 3.4.1-2) */ /* Constants... */ @@ -772,7 +777,9 @@ void lustre_assert_wire_constants(void) (long long)MDS_SYNC); LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n", (long long)MDS_DONE_WRITING); - LASSERTF(MDS_LAST_OPC == 46, " found %lld\n", + LASSERTF(MDS_SET_INFO == 46, " found %lld\n", + (long long)MDS_SET_INFO); + LASSERTF(MDS_LAST_OPC == 47, " found %lld\n", (long long)MDS_LAST_OPC); LASSERTF(REINT_SETATTR == 1, " found %lld\n", (long long)REINT_SETATTR); @@ -862,140 +869,140 @@ void lustre_assert_wire_constants(void) /* Checks for struct lustre_handle */ LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n", (long long)(int)sizeof(struct lustre_handle)); - LASSERTF(offsetof(struct lustre_handle, cookie) == 0, " found %lld\n", - (long long)offsetof(struct lustre_handle, cookie)); + LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n", + (long long)(int)offsetof(struct lustre_handle, cookie)); LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_handle *)0)->cookie)); /* Checks for struct lustre_msg */ LASSERTF((int)sizeof(struct lustre_msg) == 64, " found %lld\n", (long long)(int)sizeof(struct lustre_msg)); - LASSERTF(offsetof(struct lustre_msg, handle) == 0, " found %lld\n", - (long long)offsetof(struct lustre_msg, handle)); + LASSERTF((int)offsetof(struct lustre_msg, handle) == 0, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, handle)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->handle) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->handle)); - LASSERTF(offsetof(struct lustre_msg, magic) == 8, " found %lld\n", - (long long)offsetof(struct lustre_msg, magic)); + LASSERTF((int)offsetof(struct lustre_msg, magic) == 8, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, magic)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->magic) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->magic)); - LASSERTF(offsetof(struct lustre_msg, type) == 12, " found %lld\n", - (long long)offsetof(struct lustre_msg, type)); + LASSERTF((int)offsetof(struct lustre_msg, type) == 12, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, type)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->type) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->type)); - LASSERTF(offsetof(struct lustre_msg, version) == 16, " found %lld\n", - (long long)offsetof(struct lustre_msg, version)); + LASSERTF((int)offsetof(struct lustre_msg, version) == 16, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, version)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->version) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->version)); - LASSERTF(offsetof(struct lustre_msg, opc) == 20, " found %lld\n", - (long long)offsetof(struct lustre_msg, opc)); + LASSERTF((int)offsetof(struct lustre_msg, opc) == 20, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, opc)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->opc) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->opc)); - LASSERTF(offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n", - (long long)offsetof(struct lustre_msg, last_xid)); + LASSERTF((int)offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, last_xid)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_xid) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->last_xid)); - LASSERTF(offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n", - (long long)offsetof(struct lustre_msg, last_committed)); + LASSERTF((int)offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, last_committed)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_committed) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->last_committed)); - LASSERTF(offsetof(struct lustre_msg, transno) == 40, " found %lld\n", - (long long)offsetof(struct lustre_msg, transno)); + LASSERTF((int)offsetof(struct lustre_msg, transno) == 40, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, transno)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->transno) == 8, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->transno)); - LASSERTF(offsetof(struct lustre_msg, status) == 48, " found %lld\n", - (long long)offsetof(struct lustre_msg, status)); + LASSERTF((int)offsetof(struct lustre_msg, status) == 48, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, status)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->status) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->status)); - LASSERTF(offsetof(struct lustre_msg, flags) == 52, " found %lld\n", - (long long)offsetof(struct lustre_msg, flags)); + LASSERTF((int)offsetof(struct lustre_msg, flags) == 52, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, flags)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->flags)); - LASSERTF(offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n", - (long long)offsetof(struct lustre_msg, bufcount)); + LASSERTF((int)offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, bufcount)); LASSERTF((int)sizeof(((struct lustre_msg *)0)->bufcount) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->bufcount)); - LASSERTF(offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n", - (long long)offsetof(struct lustre_msg, buflens[7])); + LASSERTF((int)offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n", + (long long)(int)offsetof(struct lustre_msg, buflens[7])); LASSERTF((int)sizeof(((struct lustre_msg *)0)->buflens[7]) == 4, " found %lld\n", (long long)(int)sizeof(((struct lustre_msg *)0)->buflens[7])); /* Checks for struct obdo */ LASSERTF((int)sizeof(struct obdo) == 168, " found %lld\n", (long long)(int)sizeof(struct obdo)); - LASSERTF(offsetof(struct obdo, o_id) == 0, " found %lld\n", - (long long)offsetof(struct obdo, o_id)); + LASSERTF((int)offsetof(struct obdo, o_id) == 0, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_id)); LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_id)); - LASSERTF(offsetof(struct obdo, o_gr) == 8, " found %lld\n", - (long long)offsetof(struct obdo, o_gr)); + LASSERTF((int)offsetof(struct obdo, o_gr) == 8, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_gr)); LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_gr)); - LASSERTF(offsetof(struct obdo, o_size) == 16, " found %lld\n", - (long long)offsetof(struct obdo, o_size)); + LASSERTF((int)offsetof(struct obdo, o_size) == 16, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_size)); LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_size)); - LASSERTF(offsetof(struct obdo, o_mtime) == 24, " found %lld\n", - (long long)offsetof(struct obdo, o_mtime)); + LASSERTF((int)offsetof(struct obdo, o_mtime) == 24, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_mtime)); LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_mtime)); - LASSERTF(offsetof(struct obdo, o_atime) == 32, " found %lld\n", - (long long)offsetof(struct obdo, o_atime)); + LASSERTF((int)offsetof(struct obdo, o_atime) == 32, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_atime)); LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_atime)); - LASSERTF(offsetof(struct obdo, o_ctime) == 40, " found %lld\n", - (long long)offsetof(struct obdo, o_ctime)); + LASSERTF((int)offsetof(struct obdo, o_ctime) == 40, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_ctime)); LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_ctime)); - LASSERTF(offsetof(struct obdo, o_blocks) == 48, " found %lld\n", - (long long)offsetof(struct obdo, o_blocks)); + LASSERTF((int)offsetof(struct obdo, o_blocks) == 48, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_blocks)); LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_blocks)); - LASSERTF(offsetof(struct obdo, o_grant) == 56, " found %lld\n", - (long long)offsetof(struct obdo, o_grant)); + LASSERTF((int)offsetof(struct obdo, o_grant) == 56, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_grant)); LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_grant)); - LASSERTF(offsetof(struct obdo, o_blksize) == 64, " found %lld\n", - (long long)offsetof(struct obdo, o_blksize)); + LASSERTF((int)offsetof(struct obdo, o_blksize) == 64, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_blksize)); LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_blksize)); - LASSERTF(offsetof(struct obdo, o_mode) == 68, " found %lld\n", - (long long)offsetof(struct obdo, o_mode)); + LASSERTF((int)offsetof(struct obdo, o_mode) == 68, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_mode)); LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_mode)); - LASSERTF(offsetof(struct obdo, o_uid) == 72, " found %lld\n", - (long long)offsetof(struct obdo, o_uid)); + LASSERTF((int)offsetof(struct obdo, o_uid) == 72, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_uid)); LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_uid)); - LASSERTF(offsetof(struct obdo, o_gid) == 76, " found %lld\n", - (long long)offsetof(struct obdo, o_gid)); + LASSERTF((int)offsetof(struct obdo, o_gid) == 76, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_gid)); LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_gid)); - LASSERTF(offsetof(struct obdo, o_flags) == 80, " found %lld\n", - (long long)offsetof(struct obdo, o_flags)); + LASSERTF((int)offsetof(struct obdo, o_flags) == 80, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_flags)); LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_flags)); - LASSERTF(offsetof(struct obdo, o_nlink) == 84, " found %lld\n", - (long long)offsetof(struct obdo, o_nlink)); + LASSERTF((int)offsetof(struct obdo, o_nlink) == 84, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_nlink)); LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_nlink)); - LASSERTF(offsetof(struct obdo, o_generation) == 88, " found %lld\n", - (long long)offsetof(struct obdo, o_generation)); + LASSERTF((int)offsetof(struct obdo, o_generation) == 88, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_generation)); LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_generation)); - LASSERTF(offsetof(struct obdo, o_valid) == 92, " found %lld\n", - (long long)offsetof(struct obdo, o_valid)); + LASSERTF((int)offsetof(struct obdo, o_valid) == 92, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_valid)); LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_valid)); - LASSERTF(offsetof(struct obdo, o_misc) == 96, " found %lld\n", - (long long)offsetof(struct obdo, o_misc)); + LASSERTF((int)offsetof(struct obdo, o_misc) == 96, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_misc)); LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_misc)); - LASSERTF(offsetof(struct obdo, o_easize) == 100, " found %lld\n", - (long long)offsetof(struct obdo, o_easize)); + LASSERTF((int)offsetof(struct obdo, o_easize) == 100, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_easize)); LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_easize)); - LASSERTF(offsetof(struct obdo, o_inline) == 104, " found %lld\n", - (long long)offsetof(struct obdo, o_inline)); + LASSERTF((int)offsetof(struct obdo, o_inline) == 104, " found %lld\n", + (long long)(int)offsetof(struct obdo, o_inline)); LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 64, " found %lld\n", (long long)(int)sizeof(((struct obdo *)0)->o_inline)); LASSERTF(OBD_MD_FLID == 1, " found %lld\n", @@ -1054,52 +1061,52 @@ void lustre_assert_wire_constants(void) /* Checks for struct lov_mds_md_v1 */ LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n", (long long)(int)sizeof(struct lov_mds_md_v1)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_magic)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_pattern)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_object_id)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_object_gr)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_stripe_size)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_stripe_count)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count)); - LASSERTF(offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n", - (long long)offsetof(struct lov_mds_md_v1, lmm_objects)); + LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n", + (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects)); LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n", (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects)); /* Checks for struct lov_ost_data_v1 */ LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n", (long long)(int)sizeof(struct lov_ost_data_v1)); - LASSERTF(offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n", - (long long)offsetof(struct lov_ost_data_v1, l_object_id)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id)); LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id)); - LASSERTF(offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n", - (long long)offsetof(struct lov_ost_data_v1, l_object_gr)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr)); LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr)); - LASSERTF(offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n", - (long long)offsetof(struct lov_ost_data_v1, l_ost_gen)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen)); LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen)); - LASSERTF(offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n", - (long long)offsetof(struct lov_ost_data_v1, l_ost_idx)); + LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n", + (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx)); LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx)); LASSERTF(LOV_MAGIC_V1 == 198249424, " found %lld\n", @@ -1112,76 +1119,76 @@ void lustre_assert_wire_constants(void) /* Checks for struct obd_statfs */ LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n", (long long)(int)sizeof(struct obd_statfs)); - LASSERTF(offsetof(struct obd_statfs, os_type) == 0, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_type)); + LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_type)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_type)); - LASSERTF(offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_blocks)); + LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_blocks)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks)); - LASSERTF(offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_bfree)); + LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_bfree)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree)); - LASSERTF(offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_bavail)); + LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_bavail)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail)); - LASSERTF(offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_ffree)); + LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_ffree)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree)); - LASSERTF(offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_fsid)); + LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_fsid)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid)); - LASSERTF(offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_bsize)); + LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_bsize)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize)); - LASSERTF(offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_namelen)); + LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_namelen)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen)); - LASSERTF(offsetof(struct obd_statfs, os_spare) == 104, " found %lld\n", - (long long)offsetof(struct obd_statfs, os_spare)); + LASSERTF((int)offsetof(struct obd_statfs, os_spare) == 104, " found %lld\n", + (long long)(int)offsetof(struct obd_statfs, os_spare)); LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare) == 40, " found %lld\n", (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare)); /* Checks for struct obd_ioobj */ LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n", (long long)(int)sizeof(struct obd_ioobj)); - LASSERTF(offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n", - (long long)offsetof(struct obd_ioobj, ioo_id)); + LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n", + (long long)(int)offsetof(struct obd_ioobj, ioo_id)); LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id)); - LASSERTF(offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n", - (long long)offsetof(struct obd_ioobj, ioo_gr)); + LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n", + (long long)(int)offsetof(struct obd_ioobj, ioo_gr)); LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n", (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr)); - LASSERTF(offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n", - (long long)offsetof(struct obd_ioobj, ioo_type)); + LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n", + (long long)(int)offsetof(struct obd_ioobj, ioo_type)); LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n", (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type)); - LASSERTF(offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n", - (long long)offsetof(struct obd_ioobj, ioo_bufcnt)); + LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n", + (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt)); LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n", (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt)); /* Checks for struct niobuf_remote */ LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n", (long long)(int)sizeof(struct niobuf_remote)); - LASSERTF(offsetof(struct niobuf_remote, offset) == 0, " found %lld\n", - (long long)offsetof(struct niobuf_remote, offset)); + LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n", + (long long)(int)offsetof(struct niobuf_remote, offset)); LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n", (long long)(int)sizeof(((struct niobuf_remote *)0)->offset)); - LASSERTF(offsetof(struct niobuf_remote, len) == 8, " found %lld\n", - (long long)offsetof(struct niobuf_remote, len)); + LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n", + (long long)(int)offsetof(struct niobuf_remote, len)); LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n", (long long)(int)sizeof(((struct niobuf_remote *)0)->len)); - LASSERTF(offsetof(struct niobuf_remote, flags) == 12, " found %lld\n", - (long long)offsetof(struct niobuf_remote, flags)); + LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n", + (long long)(int)offsetof(struct niobuf_remote, flags)); LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct niobuf_remote *)0)->flags)); LASSERTF(OBD_BRW_READ == 1, " found %lld\n", @@ -1196,132 +1203,132 @@ void lustre_assert_wire_constants(void) /* Checks for struct ost_body */ LASSERTF((int)sizeof(struct ost_body) == 168, " found %lld\n", (long long)(int)sizeof(struct ost_body)); - LASSERTF(offsetof(struct ost_body, oa) == 0, " found %lld\n", - (long long)offsetof(struct ost_body, oa)); + LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n", + (long long)(int)offsetof(struct ost_body, oa)); LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 168, " found %lld\n", (long long)(int)sizeof(((struct ost_body *)0)->oa)); /* Checks for struct ll_fid */ LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n", (long long)(int)sizeof(struct ll_fid)); - LASSERTF(offsetof(struct ll_fid, id) == 0, " found %lld\n", - (long long)offsetof(struct ll_fid, id)); + LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n", + (long long)(int)offsetof(struct ll_fid, id)); LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n", (long long)(int)sizeof(((struct ll_fid *)0)->id)); - LASSERTF(offsetof(struct ll_fid, generation) == 8, " found %lld\n", - (long long)offsetof(struct ll_fid, generation)); + LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n", + (long long)(int)offsetof(struct ll_fid, generation)); LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n", (long long)(int)sizeof(((struct ll_fid *)0)->generation)); - LASSERTF(offsetof(struct ll_fid, f_type) == 12, " found %lld\n", - (long long)offsetof(struct ll_fid, f_type)); + LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n", + (long long)(int)offsetof(struct ll_fid, f_type)); LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n", (long long)(int)sizeof(((struct ll_fid *)0)->f_type)); /* Checks for struct mds_status_req */ LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n", (long long)(int)sizeof(struct mds_status_req)); - LASSERTF(offsetof(struct mds_status_req, flags) == 0, " found %lld\n", - (long long)offsetof(struct mds_status_req, flags)); + LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_status_req, flags)); LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_status_req *)0)->flags)); - LASSERTF(offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n", - (long long)offsetof(struct mds_status_req, repbuf)); + LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_status_req, repbuf)); LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf)); /* Checks for struct mds_body */ LASSERTF((int)sizeof(struct mds_body) == 136, " found %lld\n", (long long)(int)sizeof(struct mds_body)); - LASSERTF(offsetof(struct mds_body, fid1) == 0, " found %lld\n", - (long long)offsetof(struct mds_body, fid1)); + LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_body, fid1)); LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->fid1)); - LASSERTF(offsetof(struct mds_body, fid2) == 16, " found %lld\n", - (long long)offsetof(struct mds_body, fid2)); + LASSERTF((int)offsetof(struct mds_body, fid2) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_body, fid2)); LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->fid2)); - LASSERTF(offsetof(struct mds_body, handle) == 32, " found %lld\n", - (long long)offsetof(struct mds_body, handle)); + LASSERTF((int)offsetof(struct mds_body, handle) == 32, " found %lld\n", + (long long)(int)offsetof(struct mds_body, handle)); LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->handle)); - LASSERTF(offsetof(struct mds_body, size) == 40, " found %lld\n", - (long long)offsetof(struct mds_body, size)); + LASSERTF((int)offsetof(struct mds_body, size) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_body, size)); LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->size)); - LASSERTF(offsetof(struct mds_body, blocks) == 48, " found %lld\n", - (long long)offsetof(struct mds_body, blocks)); + LASSERTF((int)offsetof(struct mds_body, blocks) == 48, " found %lld\n", + (long long)(int)offsetof(struct mds_body, blocks)); LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->blocks)); - LASSERTF(offsetof(struct mds_body, io_epoch) == 56, " found %lld\n", - (long long)offsetof(struct mds_body, io_epoch)); + LASSERTF((int)offsetof(struct mds_body, io_epoch) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_body, io_epoch)); LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->io_epoch)); - LASSERTF(offsetof(struct mds_body, ino) == 64, " found %lld\n", - (long long)offsetof(struct mds_body, ino)); + LASSERTF((int)offsetof(struct mds_body, ino) == 64, " found %lld\n", + (long long)(int)offsetof(struct mds_body, ino)); LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->ino)); - LASSERTF(offsetof(struct mds_body, valid) == 68, " found %lld\n", - (long long)offsetof(struct mds_body, valid)); + LASSERTF((int)offsetof(struct mds_body, valid) == 68, " found %lld\n", + (long long)(int)offsetof(struct mds_body, valid)); LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->valid)); - LASSERTF(offsetof(struct mds_body, fsuid) == 72, " found %lld\n", - (long long)offsetof(struct mds_body, fsuid)); + LASSERTF((int)offsetof(struct mds_body, fsuid) == 72, " found %lld\n", + (long long)(int)offsetof(struct mds_body, fsuid)); LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->fsuid)); - LASSERTF(offsetof(struct mds_body, fsgid) == 76, " found %lld\n", - (long long)offsetof(struct mds_body, fsgid)); + LASSERTF((int)offsetof(struct mds_body, fsgid) == 76, " found %lld\n", + (long long)(int)offsetof(struct mds_body, fsgid)); LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->fsgid)); - LASSERTF(offsetof(struct mds_body, capability) == 80, " found %lld\n", - (long long)offsetof(struct mds_body, capability)); + LASSERTF((int)offsetof(struct mds_body, capability) == 80, " found %lld\n", + (long long)(int)offsetof(struct mds_body, capability)); LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->capability)); - LASSERTF(offsetof(struct mds_body, mode) == 84, " found %lld\n", - (long long)offsetof(struct mds_body, mode)); + LASSERTF((int)offsetof(struct mds_body, mode) == 84, " found %lld\n", + (long long)(int)offsetof(struct mds_body, mode)); LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->mode)); - LASSERTF(offsetof(struct mds_body, uid) == 88, " found %lld\n", - (long long)offsetof(struct mds_body, uid)); + LASSERTF((int)offsetof(struct mds_body, uid) == 88, " found %lld\n", + (long long)(int)offsetof(struct mds_body, uid)); LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->uid)); - LASSERTF(offsetof(struct mds_body, gid) == 92, " found %lld\n", - (long long)offsetof(struct mds_body, gid)); + LASSERTF((int)offsetof(struct mds_body, gid) == 92, " found %lld\n", + (long long)(int)offsetof(struct mds_body, gid)); LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->gid)); - LASSERTF(offsetof(struct mds_body, mtime) == 96, " found %lld\n", - (long long)offsetof(struct mds_body, mtime)); + LASSERTF((int)offsetof(struct mds_body, mtime) == 96, " found %lld\n", + (long long)(int)offsetof(struct mds_body, mtime)); LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->mtime)); - LASSERTF(offsetof(struct mds_body, ctime) == 100, " found %lld\n", - (long long)offsetof(struct mds_body, ctime)); + LASSERTF((int)offsetof(struct mds_body, ctime) == 100, " found %lld\n", + (long long)(int)offsetof(struct mds_body, ctime)); LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->ctime)); - LASSERTF(offsetof(struct mds_body, atime) == 104, " found %lld\n", - (long long)offsetof(struct mds_body, atime)); + LASSERTF((int)offsetof(struct mds_body, atime) == 104, " found %lld\n", + (long long)(int)offsetof(struct mds_body, atime)); LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->atime)); - LASSERTF(offsetof(struct mds_body, flags) == 108, " found %lld\n", - (long long)offsetof(struct mds_body, flags)); + LASSERTF((int)offsetof(struct mds_body, flags) == 108, " found %lld\n", + (long long)(int)offsetof(struct mds_body, flags)); LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->flags)); - LASSERTF(offsetof(struct mds_body, rdev) == 112, " found %lld\n", - (long long)offsetof(struct mds_body, rdev)); + LASSERTF((int)offsetof(struct mds_body, rdev) == 112, " found %lld\n", + (long long)(int)offsetof(struct mds_body, rdev)); LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->rdev)); - LASSERTF(offsetof(struct mds_body, nlink) == 116, " found %lld\n", - (long long)offsetof(struct mds_body, nlink)); + LASSERTF((int)offsetof(struct mds_body, nlink) == 116, " found %lld\n", + (long long)(int)offsetof(struct mds_body, nlink)); LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->nlink)); - LASSERTF(offsetof(struct mds_body, generation) == 120, " found %lld\n", - (long long)offsetof(struct mds_body, generation)); + LASSERTF((int)offsetof(struct mds_body, generation) == 120, " found %lld\n", + (long long)(int)offsetof(struct mds_body, generation)); LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->generation)); - LASSERTF(offsetof(struct mds_body, suppgid) == 124, " found %lld\n", - (long long)offsetof(struct mds_body, suppgid)); + LASSERTF((int)offsetof(struct mds_body, suppgid) == 124, " found %lld\n", + (long long)(int)offsetof(struct mds_body, suppgid)); LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->suppgid)); - LASSERTF(offsetof(struct mds_body, eadatasize) == 128, " found %lld\n", - (long long)offsetof(struct mds_body, eadatasize)); + LASSERTF((int)offsetof(struct mds_body, eadatasize) == 128, " found %lld\n", + (long long)(int)offsetof(struct mds_body, eadatasize)); LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_body *)0)->eadatasize)); LASSERTF(FMODE_READ == 1, " found %lld\n", @@ -1350,488 +1357,488 @@ void lustre_assert_wire_constants(void) /* Checks for struct mds_rec_setattr */ LASSERTF((int)sizeof(struct mds_rec_setattr) == 88, " found %lld\n", (long long)(int)sizeof(struct mds_rec_setattr)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_opcode)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_fsuid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_fsgid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_cap)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_cap)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_suppgid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_valid) == 20, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_valid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 20, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_valid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_fid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_fid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_mode) == 40, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_mode)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_mode)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_uid) == 44, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_uid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 44, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_uid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_gid) == 48, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_gid)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 48, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_gid)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_attr_flags) == 52, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_attr_flags)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 52, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_size) == 56, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_size)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_size)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_atime)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_atime)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_mtime) == 72, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_mtime)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 72, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime)); - LASSERTF(offsetof(struct mds_rec_setattr, sa_ctime) == 80, " found %lld\n", - (long long)offsetof(struct mds_rec_setattr, sa_ctime)); + LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 80, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime)); LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime)); /* Checks for struct mds_rec_create */ LASSERTF((int)sizeof(struct mds_rec_create) == 80, " found %lld\n", (long long)(int)sizeof(struct mds_rec_create)); - LASSERTF(offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_opcode)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_opcode)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode)); - LASSERTF(offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_fsuid)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_fsuid)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid)); - LASSERTF(offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_fsgid)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_fsgid)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid)); - LASSERTF(offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_cap)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_cap)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap)); - LASSERTF(offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_flags)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_flags)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags)); - LASSERTF(offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_mode)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_mode)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode)); - LASSERTF(offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_fid)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_fid)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid)); - LASSERTF(offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_replayfid)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_replayfid)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid)); - LASSERTF(offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_time)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_time)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time)); - LASSERTF(offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_rdev)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_rdev)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev)); - LASSERTF(offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n", - (long long)offsetof(struct mds_rec_create, cr_suppgid)); + LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_create, cr_suppgid)); LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid)); /* Checks for struct mds_rec_link */ LASSERTF((int)sizeof(struct mds_rec_link) == 64, " found %lld\n", (long long)(int)sizeof(struct mds_rec_link)); - LASSERTF(offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_opcode)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_opcode)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode)); - LASSERTF(offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_fsuid)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_fsuid)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid)); - LASSERTF(offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_fsgid)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_fsgid)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid)); - LASSERTF(offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_cap)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_cap)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap)); - LASSERTF(offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_suppgid1)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1)); - LASSERTF(offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_suppgid2)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2)); - LASSERTF(offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_fid1)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_fid1)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1)); - LASSERTF(offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_fid2)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_fid2)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2)); - LASSERTF(offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n", - (long long)offsetof(struct mds_rec_link, lk_time)); + LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_link, lk_time)); LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time)); /* Checks for struct mds_rec_unlink */ LASSERTF((int)sizeof(struct mds_rec_unlink) == 64, " found %lld\n", (long long)(int)sizeof(struct mds_rec_unlink)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_opcode)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_fsuid)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_fsgid)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_cap)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_cap)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_suppgid)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_mode)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_mode)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_fid1)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_fid2)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2)); - LASSERTF(offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n", - (long long)offsetof(struct mds_rec_unlink, ul_time)); + LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_unlink, ul_time)); LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time)); /* Checks for struct mds_rec_rename */ LASSERTF((int)sizeof(struct mds_rec_rename) == 64, " found %lld\n", (long long)(int)sizeof(struct mds_rec_rename)); - LASSERTF(offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_opcode)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_opcode)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode)); - LASSERTF(offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_fsuid)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid)); - LASSERTF(offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_fsgid)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid)); - LASSERTF(offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_cap)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_cap)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap)); - LASSERTF(offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_suppgid1)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1)); - LASSERTF(offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_suppgid2)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2)); - LASSERTF(offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_fid1)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_fid1)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1)); - LASSERTF(offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_fid2)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_fid2)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2)); - LASSERTF(offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n", - (long long)offsetof(struct mds_rec_rename, rn_time)); + LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n", + (long long)(int)offsetof(struct mds_rec_rename, rn_time)); LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time)); /* Checks for struct lov_desc */ LASSERTF((int)sizeof(struct lov_desc) == 72, " found %lld\n", (long long)(int)sizeof(struct lov_desc)); - LASSERTF(offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_tgt_count)); + LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_tgt_count)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count)); - LASSERTF(offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_active_tgt_count)); + LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count)); - LASSERTF(offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_default_stripe_count)); + LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count)); - LASSERTF(offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_pattern)); + LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_pattern)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern)); - LASSERTF(offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_default_stripe_size)); + LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size)); - LASSERTF(offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_default_stripe_offset)); + LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset)); - LASSERTF(offsetof(struct lov_desc, ld_uuid) == 32, " found %lld\n", - (long long)offsetof(struct lov_desc, ld_uuid)); + LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 32, " found %lld\n", + (long long)(int)offsetof(struct lov_desc, ld_uuid)); LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n", (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid)); /* Checks for struct ldlm_res_id */ LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n", (long long)(int)sizeof(struct ldlm_res_id)); - LASSERTF(offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n", - (long long)offsetof(struct ldlm_res_id, name[4])); + LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n", + (long long)(int)offsetof(struct ldlm_res_id, name[4])); LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4])); /* Checks for struct ldlm_extent */ LASSERTF((int)sizeof(struct ldlm_extent) == 16, " found %lld\n", (long long)(int)sizeof(struct ldlm_extent)); - LASSERTF(offsetof(struct ldlm_extent, start) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_extent, start)); + LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_extent, start)); LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_extent *)0)->start)); - LASSERTF(offsetof(struct ldlm_extent, end) == 8, " found %lld\n", - (long long)offsetof(struct ldlm_extent, end)); + LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n", + (long long)(int)offsetof(struct ldlm_extent, end)); LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_extent *)0)->end)); /* Checks for struct ldlm_flock */ LASSERTF((int)sizeof(struct ldlm_flock) == 32, " found %lld\n", (long long)(int)sizeof(struct ldlm_flock)); - LASSERTF(offsetof(struct ldlm_flock, start) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_flock, start)); + LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_flock, start)); LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_flock *)0)->start)); - LASSERTF(offsetof(struct ldlm_flock, end) == 8, " found %lld\n", - (long long)offsetof(struct ldlm_flock, end)); + LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n", + (long long)(int)offsetof(struct ldlm_flock, end)); LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_flock *)0)->end)); - LASSERTF(offsetof(struct ldlm_flock, blocking_export) == 16, " found %lld\n", - (long long)offsetof(struct ldlm_flock, blocking_export)); + LASSERTF((int)offsetof(struct ldlm_flock, blocking_export) == 16, " found %lld\n", + (long long)(int)offsetof(struct ldlm_flock, blocking_export)); LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_export) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_export)); - LASSERTF(offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n", - (long long)offsetof(struct ldlm_flock, blocking_pid)); + LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n", + (long long)(int)offsetof(struct ldlm_flock, blocking_pid)); LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid)); - LASSERTF(offsetof(struct ldlm_flock, pid) == 28, " found %lld\n", - (long long)offsetof(struct ldlm_flock, pid)); + LASSERTF((int)offsetof(struct ldlm_flock, pid) == 28, " found %lld\n", + (long long)(int)offsetof(struct ldlm_flock, pid)); LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_flock *)0)->pid)); /* Checks for struct ldlm_intent */ LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n", (long long)(int)sizeof(struct ldlm_intent)); - LASSERTF(offsetof(struct ldlm_intent, opc) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_intent, opc)); + LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_intent, opc)); LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_intent *)0)->opc)); /* Checks for struct ldlm_resource_desc */ LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n", (long long)(int)sizeof(struct ldlm_resource_desc)); - LASSERTF(offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_resource_desc, lr_type)); + LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_resource_desc, lr_type)); LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type)); - LASSERTF(offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n", - (long long)offsetof(struct ldlm_resource_desc, lr_name)); + LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n", + (long long)(int)offsetof(struct ldlm_resource_desc, lr_name)); LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n", (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name)); /* Checks for struct ldlm_lock_desc */ LASSERTF((int)sizeof(struct ldlm_lock_desc) == 80, " found %lld\n", (long long)(int)sizeof(struct ldlm_lock_desc)); - LASSERTF(offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_lock_desc, l_resource)); + LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_lock_desc, l_resource)); LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n", (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource)); - LASSERTF(offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n", - (long long)offsetof(struct ldlm_lock_desc, l_req_mode)); + LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n", + (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode)); LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode)); - LASSERTF(offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n", - (long long)offsetof(struct ldlm_lock_desc, l_granted_mode)); + LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n", + (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode)); LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode)); - LASSERTF(offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n", - (long long)offsetof(struct ldlm_lock_desc, l_policy_data)); + LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n", + (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data)); LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32, " found %lld\n", (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data)); /* Checks for struct ldlm_request */ LASSERTF((int)sizeof(struct ldlm_request) == 104, " found %lld\n", (long long)(int)sizeof(struct ldlm_request)); - LASSERTF(offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_request, lock_flags)); + LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_request, lock_flags)); LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags)); - LASSERTF(offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n", - (long long)offsetof(struct ldlm_request, lock_desc)); + LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n", + (long long)(int)offsetof(struct ldlm_request, lock_desc)); LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n", (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc)); - LASSERTF(offsetof(struct ldlm_request, lock_handle1) == 88, " found %lld\n", - (long long)offsetof(struct ldlm_request, lock_handle1)); + LASSERTF((int)offsetof(struct ldlm_request, lock_handle1) == 88, " found %lld\n", + (long long)(int)offsetof(struct ldlm_request, lock_handle1)); LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle1)); - LASSERTF(offsetof(struct ldlm_request, lock_handle2) == 96, " found %lld\n", - (long long)offsetof(struct ldlm_request, lock_handle2)); + LASSERTF((int)offsetof(struct ldlm_request, lock_handle2) == 96, " found %lld\n", + (long long)(int)offsetof(struct ldlm_request, lock_handle2)); LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle2)); /* Checks for struct ldlm_reply */ LASSERTF((int)sizeof(struct ldlm_reply) == 112, " found %lld\n", (long long)(int)sizeof(struct ldlm_reply)); - LASSERTF(offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n", - (long long)offsetof(struct ldlm_reply, lock_flags)); + LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n", + (long long)(int)offsetof(struct ldlm_reply, lock_flags)); LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags)); - LASSERTF(offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n", - (long long)offsetof(struct ldlm_request, lock_desc)); + LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n", + (long long)(int)offsetof(struct ldlm_request, lock_desc)); LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n", (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc)); - LASSERTF(offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n", - (long long)offsetof(struct ldlm_reply, lock_handle)); + LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n", + (long long)(int)offsetof(struct ldlm_reply, lock_handle)); LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle)); - LASSERTF(offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n", - (long long)offsetof(struct ldlm_reply, lock_policy_res1)); + LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n", + (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1)); LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1)); - LASSERTF(offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n", - (long long)offsetof(struct ldlm_reply, lock_policy_res2)); + LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n", + (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2)); LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n", (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2)); /* Checks for struct ost_lvb */ LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n", (long long)(int)sizeof(struct ost_lvb)); - LASSERTF(offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n", - (long long)offsetof(struct ost_lvb, lvb_size)); + LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n", + (long long)(int)offsetof(struct ost_lvb, lvb_size)); LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size)); - LASSERTF(offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n", - (long long)offsetof(struct ost_lvb, lvb_mtime)); + LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n", + (long long)(int)offsetof(struct ost_lvb, lvb_mtime)); LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime)); - LASSERTF(offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n", - (long long)offsetof(struct ost_lvb, lvb_atime)); + LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n", + (long long)(int)offsetof(struct ost_lvb, lvb_atime)); LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime)); - LASSERTF(offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n", - (long long)offsetof(struct ost_lvb, lvb_ctime)); + LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n", + (long long)(int)offsetof(struct ost_lvb, lvb_ctime)); LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime)); - LASSERTF(offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n", - (long long)offsetof(struct ost_lvb, lvb_blocks)); + LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n", + (long long)(int)offsetof(struct ost_lvb, lvb_blocks)); LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n", (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks)); /* Checks for struct ptlbd_op */ LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n", (long long)(int)sizeof(struct ptlbd_op)); - LASSERTF(offsetof(struct ptlbd_op, op_cmd) == 0, " found %lld\n", - (long long)offsetof(struct ptlbd_op, op_cmd)); + LASSERTF((int)offsetof(struct ptlbd_op, op_cmd) == 0, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_op, op_cmd)); LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_cmd) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_op *)0)->op_cmd)); - LASSERTF(offsetof(struct ptlbd_op, op_lun) == 2, " found %lld\n", - (long long)offsetof(struct ptlbd_op, op_lun)); + LASSERTF((int)offsetof(struct ptlbd_op, op_lun) == 2, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_op, op_lun)); LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_lun) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_op *)0)->op_lun)); - LASSERTF(offsetof(struct ptlbd_op, op_niob_cnt) == 4, " found %lld\n", - (long long)offsetof(struct ptlbd_op, op_niob_cnt)); + LASSERTF((int)offsetof(struct ptlbd_op, op_niob_cnt) == 4, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_op, op_niob_cnt)); LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt)); - LASSERTF(offsetof(struct ptlbd_op, op__padding) == 6, " found %lld\n", - (long long)offsetof(struct ptlbd_op, op__padding)); + LASSERTF((int)offsetof(struct ptlbd_op, op__padding) == 6, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_op, op__padding)); LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op__padding) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_op *)0)->op__padding)); - LASSERTF(offsetof(struct ptlbd_op, op_block_cnt) == 8, " found %lld\n", - (long long)offsetof(struct ptlbd_op, op_block_cnt)); + LASSERTF((int)offsetof(struct ptlbd_op, op_block_cnt) == 8, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_op, op_block_cnt)); LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_block_cnt) == 4, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_op *)0)->op_block_cnt)); /* Checks for struct ptlbd_niob */ LASSERTF((int)sizeof(struct ptlbd_niob) == 24, " found %lld\n", (long long)(int)sizeof(struct ptlbd_niob)); - LASSERTF(offsetof(struct ptlbd_niob, n_xid) == 0, " found %lld\n", - (long long)offsetof(struct ptlbd_niob, n_xid)); + LASSERTF((int)offsetof(struct ptlbd_niob, n_xid) == 0, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_niob, n_xid)); LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_xid) == 8, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_xid)); - LASSERTF(offsetof(struct ptlbd_niob, n_block_nr) == 8, " found %lld\n", - (long long)offsetof(struct ptlbd_niob, n_block_nr)); + LASSERTF((int)offsetof(struct ptlbd_niob, n_block_nr) == 8, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_niob, n_block_nr)); LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_block_nr) == 8, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_block_nr)); - LASSERTF(offsetof(struct ptlbd_niob, n_offset) == 16, " found %lld\n", - (long long)offsetof(struct ptlbd_niob, n_offset)); + LASSERTF((int)offsetof(struct ptlbd_niob, n_offset) == 16, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_niob, n_offset)); LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_offset) == 4, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_offset)); - LASSERTF(offsetof(struct ptlbd_niob, n_length) == 20, " found %lld\n", - (long long)offsetof(struct ptlbd_niob, n_length)); + LASSERTF((int)offsetof(struct ptlbd_niob, n_length) == 20, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_niob, n_length)); LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_length) == 4, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_length)); /* Checks for struct ptlbd_rsp */ LASSERTF((int)sizeof(struct ptlbd_rsp) == 4, " found %lld\n", (long long)(int)sizeof(struct ptlbd_rsp)); - LASSERTF(offsetof(struct ptlbd_rsp, r_status) == 0, " found %lld\n", - (long long)offsetof(struct ptlbd_rsp, r_status)); + LASSERTF((int)offsetof(struct ptlbd_rsp, r_status) == 0, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_rsp, r_status)); LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_status) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_status)); - LASSERTF(offsetof(struct ptlbd_rsp, r_error_cnt) == 2, " found %lld\n", - (long long)offsetof(struct ptlbd_rsp, r_error_cnt)); + LASSERTF((int)offsetof(struct ptlbd_rsp, r_error_cnt) == 2, " found %lld\n", + (long long)(int)offsetof(struct ptlbd_rsp, r_error_cnt)); LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt) == 2, " found %lld\n", (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt)); /* Checks for struct llog_logid */ LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n", (long long)(int)sizeof(struct llog_logid)); - LASSERTF(offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n", - (long long)offsetof(struct llog_logid, lgl_oid)); + LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_logid, lgl_oid)); LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid)); - LASSERTF(offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n", - (long long)offsetof(struct llog_logid, lgl_ogr)); + LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n", + (long long)(int)offsetof(struct llog_logid, lgl_ogr)); LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr)); - LASSERTF(offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n", - (long long)offsetof(struct llog_logid, lgl_ogen)); + LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_logid, lgl_ogen)); LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen)); LASSERTF(OST_SZ_REC == 274730752, " found %lld\n", @@ -1854,256 +1861,256 @@ void lustre_assert_wire_constants(void) /* Checks for struct llog_catid */ LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n", (long long)(int)sizeof(struct llog_catid)); - LASSERTF(offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n", - (long long)offsetof(struct llog_catid, lci_logid)); + LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_catid, lci_logid)); LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n", (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid)); /* Checks for struct llog_rec_hdr */ LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n", (long long)(int)sizeof(struct llog_rec_hdr)); - LASSERTF(offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n", - (long long)offsetof(struct llog_rec_hdr, lrh_len)); + LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_rec_hdr, lrh_len)); LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len)); - LASSERTF(offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n", - (long long)offsetof(struct llog_rec_hdr, lrh_index)); + LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n", + (long long)(int)offsetof(struct llog_rec_hdr, lrh_index)); LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index)); - LASSERTF(offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n", - (long long)offsetof(struct llog_rec_hdr, lrh_type)); + LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n", + (long long)(int)offsetof(struct llog_rec_hdr, lrh_type)); LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type)); /* Checks for struct llog_rec_tail */ LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n", (long long)(int)sizeof(struct llog_rec_tail)); - LASSERTF(offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n", - (long long)offsetof(struct llog_rec_tail, lrt_len)); + LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_rec_tail, lrt_len)); LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len)); - LASSERTF(offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n", - (long long)offsetof(struct llog_rec_tail, lrt_index)); + LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n", + (long long)(int)offsetof(struct llog_rec_tail, lrt_index)); LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index)); /* Checks for struct llog_logid_rec */ LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n", (long long)(int)sizeof(struct llog_logid_rec)); - LASSERTF(offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_logid_rec, lid_hdr)); + LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_logid_rec, lid_hdr)); LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr)); - LASSERTF(offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n", - (long long)offsetof(struct llog_logid_rec, lid_id)); + LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_logid_rec, lid_id)); LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n", (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id)); - LASSERTF(offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n", - (long long)offsetof(struct llog_logid_rec, lid_tail)); + LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n", + (long long)(int)offsetof(struct llog_logid_rec, lid_tail)); LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail)); /* Checks for struct llog_create_rec */ LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n", (long long)(int)sizeof(struct llog_create_rec)); - LASSERTF(offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_create_rec, lcr_hdr)); + LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_create_rec, lcr_hdr)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr)); - LASSERTF(offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n", - (long long)offsetof(struct llog_create_rec, lcr_fid)); + LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_create_rec, lcr_fid)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid)); - LASSERTF(offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n", - (long long)offsetof(struct llog_create_rec, lcr_oid)); + LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_create_rec, lcr_oid)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid)); - LASSERTF(offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n", - (long long)offsetof(struct llog_create_rec, lcr_ogen)); + LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n", + (long long)(int)offsetof(struct llog_create_rec, lcr_ogen)); LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen)); /* Checks for struct llog_orphan_rec */ LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n", (long long)(int)sizeof(struct llog_orphan_rec)); - LASSERTF(offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_orphan_rec, lor_hdr)); + LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr)); LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr)); - LASSERTF(offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n", - (long long)offsetof(struct llog_orphan_rec, lor_oid)); + LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_orphan_rec, lor_oid)); LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid)); - LASSERTF(offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n", - (long long)offsetof(struct llog_orphan_rec, lor_ogen)); + LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen)); LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen)); - LASSERTF(offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n", - (long long)offsetof(struct llog_orphan_rec, lor_tail)); + LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_orphan_rec, lor_tail)); LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail)); /* Checks for struct llog_unlink_rec */ LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n", (long long)(int)sizeof(struct llog_unlink_rec)); - LASSERTF(offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_unlink_rec, lur_hdr)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr)); - LASSERTF(offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n", - (long long)offsetof(struct llog_unlink_rec, lur_oid)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_oid)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid)); - LASSERTF(offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n", - (long long)offsetof(struct llog_unlink_rec, lur_ogen)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen)); - LASSERTF(offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n", - (long long)offsetof(struct llog_unlink_rec, lur_tail)); + LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_unlink_rec, lur_tail)); LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail)); /* Checks for struct llog_size_change_rec */ LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n", (long long)(int)sizeof(struct llog_size_change_rec)); - LASSERTF(offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_size_change_rec, lsc_hdr)); + LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr)); LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr)); - LASSERTF(offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n", - (long long)offsetof(struct llog_size_change_rec, lsc_fid)); + LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid)); LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid)); - LASSERTF(offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n", - (long long)offsetof(struct llog_size_change_rec, lsc_io_epoch)); + LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch)); LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch)); - LASSERTF(offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n", - (long long)offsetof(struct llog_size_change_rec, lsc_tail)); + LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n", + (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail)); LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail)); /* Checks for struct llog_gen */ LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n", (long long)(int)sizeof(struct llog_gen)); - LASSERTF(offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n", - (long long)offsetof(struct llog_gen, mnt_cnt)); + LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_gen, mnt_cnt)); LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt)); - LASSERTF(offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n", - (long long)offsetof(struct llog_gen, conn_cnt)); + LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n", + (long long)(int)offsetof(struct llog_gen, conn_cnt)); LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt)); /* Checks for struct llog_gen_rec */ LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n", (long long)(int)sizeof(struct llog_gen_rec)); - LASSERTF(offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_gen_rec, lgr_hdr)); + LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr)); LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr)); - LASSERTF(offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n", - (long long)offsetof(struct llog_gen_rec, lgr_gen)); + LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_gen_rec, lgr_gen)); LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen)); - LASSERTF(offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n", - (long long)offsetof(struct llog_gen_rec, lgr_tail)); + LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_gen_rec, lgr_tail)); LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail)); /* Checks for struct llog_log_hdr */ LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n", (long long)(int)sizeof(struct llog_log_hdr)); - LASSERTF(offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_hdr)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_hdr)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr)); - LASSERTF(offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_timestamp)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp)); - LASSERTF(offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_count)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_count)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count)); - LASSERTF(offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_bitmap_offset)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset)); - LASSERTF(offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_size)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_size)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size)); - LASSERTF(offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_flags)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_flags)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags)); - LASSERTF(offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_cat_idx)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx)); - LASSERTF(offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_tgtuuid)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid)); - LASSERTF(offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_reserved)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_reserved)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved)); - LASSERTF(offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_bitmap)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap)); - LASSERTF(offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n", - (long long)offsetof(struct llog_log_hdr, llh_tail)); + LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n", + (long long)(int)offsetof(struct llog_log_hdr, llh_tail)); LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n", (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail)); /* Checks for struct llog_cookie */ LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n", (long long)(int)sizeof(struct llog_cookie)); - LASSERTF(offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n", - (long long)offsetof(struct llog_cookie, lgc_lgl)); + LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n", + (long long)(int)offsetof(struct llog_cookie, lgc_lgl)); LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n", (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl)); - LASSERTF(offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n", - (long long)offsetof(struct llog_cookie, lgc_subsys)); + LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n", + (long long)(int)offsetof(struct llog_cookie, lgc_subsys)); LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys)); - LASSERTF(offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n", - (long long)offsetof(struct llog_cookie, lgc_index)); + LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n", + (long long)(int)offsetof(struct llog_cookie, lgc_index)); LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n", (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index)); /* Checks for struct llogd_body */ LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n", (long long)(int)sizeof(struct llogd_body)); - LASSERTF(offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_logid)); + LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_logid)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid)); - LASSERTF(offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_ctxt_idx)); + LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx)); - LASSERTF(offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_llh_flags)); + LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_llh_flags)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags)); - LASSERTF(offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_index)); + LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_index)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index)); - LASSERTF(offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_saved_index)); + LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_saved_index)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index)); - LASSERTF(offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_len)); + LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_len)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len)); - LASSERTF(offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n", - (long long)offsetof(struct llogd_body, lgd_cur_offset)); + LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n", + (long long)(int)offsetof(struct llogd_body, lgd_cur_offset)); LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n", (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset)); LASSERTF(LLOG_ORIGIN_HANDLE_CREATE == 501, " found %lld\n", @@ -2124,17 +2131,16 @@ void lustre_assert_wire_constants(void) /* Checks for struct llogd_conn_body */ LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n", (long long)(int)sizeof(struct llogd_conn_body)); - LASSERTF(offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n", - (long long)offsetof(struct llogd_conn_body, lgdc_gen)); + LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n", + (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen)); LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n", (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen)); - LASSERTF(offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n", - (long long)offsetof(struct llogd_conn_body, lgdc_logid)); + LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n", + (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid)); LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n", (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid)); - LASSERTF(offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n", - (long long)offsetof(struct llogd_conn_body, lgdc_ctxt_idx)); + LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n", + (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx)); LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx)); } - diff --git a/lustre/utils/llmount.c b/lustre/utils/llmount.c index ab4cb63..363864c 100644 --- a/lustre/utils/llmount.c +++ b/lustre/utils/llmount.c @@ -240,6 +240,7 @@ struct opt_map { static const struct opt_map opt_map[] = { { "defaults", 0, 0, 0 }, /* default options */ { "rw", 1, 1, MS_RDONLY }, /* read-write */ + { "ro", 0, 0, MS_RDONLY }, /* read-only */ { "exec", 0, 1, MS_NOEXEC }, /* permit execution of binaries */ { "noexec", 0, 0, MS_NOEXEC }, /* don't execute binaries */ { "suid", 0, 1, MS_NOSUID }, /* honor suid executables */ diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 907db58..e9061d4 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -810,6 +810,7 @@ main(int argc, char **argv) CHECK_VALUE(MDS_UNPIN); CHECK_VALUE(MDS_SYNC); CHECK_VALUE(MDS_DONE_WRITING); + CHECK_VALUE(MDS_SET_INFO); CHECK_VALUE(MDS_LAST_OPC); CHECK_VALUE(REINT_SETATTR); -- 1.8.3.1