This is all the structs defined in lustre_idl.h iand lustre_user.h, in the lustre/include/lustre/ directory, in support of the message format symbols. If the right column has that means there is no corresponding "RMF_BLA" declaration, it is either unused or used in a way I haven't quite sorted out. If there is an X in the right column then the RMF_BLA declaration's name is identical to the 'struct' declaration, but if the "name" is different it is noted in parentheses. If there is a name in the right column then the space allocated for the RMF_BLA declaration is the size for this struct, but the name in the RMF_BLA declaration doesn't exactly match. The ptlrpc_body_v2 and ptlrpc_body_v3 structs do not appear in any declarations, but there is a #DEFINE for ptlrpc_body that defines it as ptlrpc_body_v3 so I treat it as matching. A #if construct will substitute obd_connect_data_v1 for obdconnect_data in code from Lustre-2.0 and before. struct definiiton RMF_* name ----------------- ----------- close_data X (data_version) getinfo_fid2path hsm_current_action X hsm_progress_kernel hsm_progress hsm_request X hsm_state_set X hsm_user_item X idx_info X layout_intent X ldlm_intent X ldlm_reply dlm_rep ldlm_request dlm_req lfsck_reply X lfsck_request X ll_fiemap_info_key fiemap llog_cookie llog_cookies llog_log_hdr X llogd_body X llogd_conn_body X lu_fid fid lu_seq_range fld_query_mdfld lustre_capa capa lustre_capa_key lustre_msg_v2 [the is the header, not a message format, per se] mdc_swap_layouts swap_layouts mdt_body X mdt_ioepoch X mdt_rec_reint rec_reint mdt_rec_rename mgs_config_res X (mgs_config_read reply) mgs_send_param X mgs_target_info X niobuf_remote X obd_connect_data cdata obd_connect_data_v1 obd_ioobj X obd_quotactl X obd_statfs X obd_uuid tgtuuid object_update X object_update_param object_update_reply X object_update_request object_update_result ost_body X ptlrpc_body_v2 ptlrpc_body_v3 X (as ptlrpc_body) quota_body X ---------------------------------------------------------------------- These are definitions from the header files that appear in structures.txt but are not (or do not correspond to) struct definitions: lustre_acl.h # define LUSTRE_POSIX_ACL_MAX_SIZE \ (sizeof(posix_acl_xattr_header) + \ LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) lustre_idl.h #define MIN_MD_SIZE (sizeof(struct lov_mds_md) + 1 * sizeof(struct lov_ost_data)) ---------------------------------------------------------------------- The following are the actual struct definitions for the two header files. Which file is listed, then the struct defnition. lustre_idl.h struct close_data { struct lustre_handle cd_handle; struct lu_fid cd_fid; __u64 cd_data_version; __u64 cd_reserved[8]; }; lustre_user.h struct hsm_current_action { /** The current undergoing action, if there is one */ /* state is one of hsm_progress_states */ __u32 hca_state; /* action is one of hsm_user_action */ __u32 hca_action; struct hsm_extent hca_location; }; lustre_user.h struct hsm_extent { __u64 offset; __u64 length; } __attribute__((packed)); lustre_idl.h struct hsm_progress_kernel { /* Field taken from struct hsm_progress */ lustre_fid hpk_fid; __u64 hpk_cookie; struct hsm_extent hpk_extent; __u16 hpk_flags; __u16 hpk_errval; /* positive val */ __u32 hpk_padding1; /* Additional fields */ __u64 hpk_data_version; __u64 hpk_padding2; } __attribute__((packed)); lustre_user.h struct hsm_request { __u32 hr_action; /* enum hsm_user_action */ __u32 hr_archive_id; /* archive id, used only with HUA_ARCHIVE */ __u64 hr_flags; /* request flags */ __u32 hr_itemcount; /* item count in hur_user_item vector */ __u32 hr_data_len; }; lustre_idl.h struct hsm_state_set { __u32 hss_valid; __u32 hss_archive_id; __u64 hss_setmask; __u64 hss_clearmask; }; lustre_user.h struct hsm_user_item { lustre_fid hui_fid; struct hsm_extent hui_extent; } __attribute__((packed)); lustre_user.h struct hsm_user_state { /** Current HSM states, from enum hsm_states. */ __u32 hus_states; __u32 hus_archive_id; /** The current undergoing action, if there is one */ __u32 hus_in_progress_state; __u32 hus_in_progress_action; struct hsm_extent hus_in_progress_location; char hus_extended_info[]; }; lustre_idl.h struct idx_info { __u32 ii_magic; /* reply: see idx_info_flags below */ __u32 ii_flags; /* request & reply: number of lu_idxpage (to be) transferred */ __u16 ii_count; __u16 ii_pad0; /* request: requested attributes passed down to the iterator API */ __u32 ii_attrs; /* request & reply: index file identifier (FID) */ struct lu_fid ii_fid; /* reply: version of the index file before starting to walk the index. * Please note that the version can be modified at any time during the * transfer */ __u64 ii_version; /* request: hash to start with: * reply: hash of the first entry of the first lu_idxpage and hash * of the entry to read next if any */ __u64 ii_hash_start; __u64 ii_hash_end; /* reply: size of keys in lu_idxpages, minimal one if II_FL_VARKEY is * set */ __u16 ii_keysize; /* reply: size of records in lu_idxpages, minimal one if II_FL_VARREC * is set */ __u16 ii_recsize; __u32 ii_pad1; __u64 ii_pad2; __u64 ii_pad3; }; lustre_idl.h struct layout_intent { __u32 li_opc; /* intent operation for enqueue, read, write etc */ __u32 li_flags; __u64 li_start; __u64 li_end; }; lustre_idl.h union ldlm_gl_desc { struct ldlm_gl_lquota_desc lquota_desc; }; lustre_idl.h struct ldlm_gl_lquota_desc { union lquota_id gl_id; /* quota ID subject to the glimpse */ __u64 gl_flags; /* see LQUOTA_FL* below */ __u64 gl_ver; /* new index version */ __u64 gl_hardlimit; /* new hardlimit or qunit value */ __u64 gl_softlimit; /* new softlimit */ __u64 gl_time; __u64 gl_pad2; }; lustre_idl.h struct ldlm_intent { __u64 opc; }; lustre_idl.h struct ldlm_lock_desc { struct ldlm_resource_desc l_resource; ldlm_mode_t l_req_mode; ldlm_mode_t l_granted_mode; ldlm_wire_policy_data_t l_policy_data; }; lustre_idl.h struct ldlm_reply { __u32 lock_flags; __u32 lock_padding; /* also fix lustre_swab_ldlm_reply */ struct ldlm_lock_desc lock_desc; struct lustre_handle lock_handle; __u64 lock_policy_res1; __u64 lock_policy_res2; }; lustre_idl.h struct ldlm_request { __u32 lock_flags; __u32 lock_count; struct ldlm_lock_desc lock_desc; struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES]; }; lustre_idl.h #define RES_NAME_SIZE 4 struct ldlm_res_id { __u64 name[RES_NAME_SIZE]; }; lustre_idl.h struct ldlm_resource_desc { ldlm_type_t lr_type; __u32 lr_padding; /* also fix lustre_swab_ldlm_resource_desc */ struct ldlm_res_id lr_name; }; lustre_idl.h struct lfsck_reply { __u32 lr_status; __u32 lr_padding_1; __u64 lr_padding_2; }; lustre_idl.h struct lfsck_request { __u32 lr_event; __u32 lr_index; __u32 lr_flags; __u32 lr_valid; union { __u32 lr_speed; __u32 lr_status; __u32 lr_type; }; __u16 lr_version; __u16 lr_active; __u16 lr_param; __u16 lr_async_windows; __u32 lr_flags2; struct lu_fid lr_fid; struct lu_fid lr_fid2; struct lu_fid lr_fid3; __u64 lr_padding_1; __u64 lr_padding_2; }; lustre_idl.h struct ll_fiemap_info_key { char name[8]; struct obdo oa; struct ll_user_fiemap fiemap; }; ll_fiemap.h struct ll_user_fiemap { __u64 fm_start; /* logical offset (inclusive) at * which to start mapping (in) */ __u64 fm_length; /* logical length of mapping which * userspace wants (in) */ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */ __u32 fm_mapped_extents;/* number of extents that were mapped (out) */ __u32 fm_extent_count; /* size of fm_extents array (in) */ __u32 fm_reserved; struct ll_fiemap_extent fm_extents[0]; /* array of mapped extents (out) */ }; ll_fiemap.h struct ll_fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of * the extent from the beginning of the file */ __u64 fe_physical; /* physical offset in bytes for the start * of the extent from the beginning of the disk */ __u64 fe_length; /* length in bytes for this extent */ __u64 fe_reserved64[2]; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_device; /* device number for this extent */ __u32 fe_reserved[2]; }; lustre_idl.h struct llog_cookie { struct llog_logid lgc_lgl; __u32 lgc_subsys; __u32 lgc_index; __u32 lgc_padding; } __attribute__((packed)); lustre_idl.h struct llog_gen { __u64 mnt_cnt; __u64 conn_cnt; } __attribute__((packed)); lustre_idl.h struct llog_log_hdr { struct llog_rec_hdr llh_hdr; __s64 llh_timestamp; __u32 llh_count; __u32 llh_bitmap_offset; __u32 llh_size; __u32 llh_flags; __u32 llh_cat_idx; /* for a catalog the first plain slot is next to it */ struct obd_uuid llh_tgtuuid; __u32 llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23]; __u32 llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)]; struct llog_rec_tail llh_tail; } __attribute__((packed)); lustre_idl.h struct llog_logid { struct ost_id lgl_oi; __u32 lgl_ogen; } __attribute__((packed)); lustre_idl.h struct llog_rec_hdr { __u32 lrh_len; __u32 lrh_index; __u32 lrh_type; __u32 lrh_id; }; lustre_idl.h struct llog_rec_tail { __u32 lrt_len; __u32 lrt_index; }; lustre_idl.h struct llogd_body { struct llog_logid lgd_logid; __u32 lgd_ctxt_idx; __u32 lgd_llh_flags; __u32 lgd_index; __u32 lgd_saved_index; __u32 lgd_len; __u64 lgd_cur_offset; } __attribute__((packed)); lustre_idl.h struct llogd_conn_body { struct llog_gen lgdc_gen; struct llog_logid lgdc_logid; __u32 lgdc_ctxt_idx; } __attribute__((packed)); #define lov_mds_md lov_mds_md_v1 struct lov_mds_md_v1 { /* LOV EA mds/wire data (little-endian) */ __u32 lmm_magic; /* magic number = LOV_MAGIC_V1 */ __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */ struct ost_id lmm_oi; /* LOV object ID */ __u32 lmm_stripe_size; /* size of stripe in bytes */ /* lmm_stripe_count used to be __u32 */ __u16 lmm_stripe_count; /* num stripes in use for this object */ __u16 lmm_layout_gen; /* layout generation number */ struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */ }; lustre_user.h #define lov_ost_data lov_ost_data_v1 struct lov_ost_data_v1 { /* per-stripe data structure (little-endian)*/ struct ost_id l_ost_oi; /* OST object ID */ __u32 l_ost_gen; /* generation of this l_ost_idx */ __u32 l_ost_idx; /* OST index in LOV (lov_tgt_desc->tgts) */ }; lustre_user.h struct lu_fid { /** * FID sequence. Sequence is a unit of migration: all files (objects) * with FIDs from a given sequence are stored on the same server. * Lustre should support 2^64 objects, so even if each sequence * has only a single object we can still enumerate 2^64 objects. **/ __u64 f_seq; /* FID number within sequence. */ __u32 f_oid; /** * FID version, used to distinguish different versions (in the sense * of snapshots, etc.) of the same file system object. Not currently * used. **/ __u32 f_ver; }; lustre_idl.h struct lu_seq_range { __u64 lsr_start; __u64 lsr_end; __u32 lsr_index; __u32 lsr_flags; }; lustre_idl.h struct lustre_capa { struct lu_fid lc_fid; /** fid */ __u64 lc_opc; /** operations allowed */ __u64 lc_uid; /** file owner */ __u64 lc_gid; /** file group */ __u32 lc_flags; /** HMAC algorithm & flags */ __u32 lc_keyid; /** key# used for the capability */ __u32 lc_timeout; /** capa timeout value (sec) */ __u32 lc_expiry; /** expiry time (sec) */ __u8 lc_hmac[CAPA_HMAC_MAX_LEN]; /** HMAC */ } __attribute__((packed)); lustre_idl.h struct lustre_handle { __u64 cookie; }; lustre_idl.h struct lustre_msg_v2 { __u32 lm_bufcount; __u32 lm_secflvr; __u32 lm_magic; __u32 lm_repsize; __u32 lm_cksum; __u32 lm_flags; __u32 lm_padding_2; __u32 lm_padding_3; __u32 lm_buflens[0]; }; lustre_idl.h struct mdc_swap_layouts { __u64 msl_flags; } __packed; lustre_idl.h struct mdt_body { struct lu_fid mbo_fid1; struct lu_fid mbo_fid2; struct lustre_handle mbo_handle; __u64 mbo_valid; __u64 mbo_size; /* Offset, in the case of MDS_READPAGE */ __s64 mbo_mtime; __s64 mbo_atime; __s64 mbo_ctime; __u64 mbo_blocks; /* XID, in the case of MDS_READPAGE */ __u64 mbo_ioepoch; __u64 mbo_t_state; /* transient file state defined in * enum md_transient_state * was "ino" until 2.4.0 */ __u32 mbo_fsuid; __u32 mbo_fsgid; __u32 mbo_capability; __u32 mbo_mode; __u32 mbo_uid; __u32 mbo_gid; __u32 mbo_flags; __u32 mbo_rdev; __u32 mbo_nlink; /* #bytes to read in the case of MDS_READPAGE */ __u32 mbo_unused2; /* was "generation" until 2.4.0 */ __u32 mbo_suppgid; __u32 mbo_eadatasize; __u32 mbo_aclsize; __u32 mbo_max_mdsize; __u32 mbo_max_cookiesize; __u32 mbo_uid_h; /* high 32-bits of uid, for FUID */ __u32 mbo_gid_h; /* high 32-bits of gid, for FUID */ __u32 mbo_padding_5; /* also fix lustre_swab_mdt_body */ __u64 mbo_padding_6; __u64 mbo_padding_7; __u64 mbo_padding_8; __u64 mbo_padding_9; __u64 mbo_padding_10; }; /* 216 */ lustre_idl.h struct mdt_ioepoch { struct lustre_handle handle; __u64 ioepoch; __u32 flags; __u32 padding; }; lustre_idl.h struct mdt_rec_reint { __u32 rr_opcode; __u32 rr_cap; __u32 rr_fsuid; __u32 rr_fsuid_h; __u32 rr_fsgid; __u32 rr_fsgid_h; __u32 rr_suppgid1; __u32 rr_suppgid1_h; __u32 rr_suppgid2; __u32 rr_suppgid2_h; struct lu_fid rr_fid1; struct lu_fid rr_fid2; __s64 rr_mtime; __s64 rr_atime; __s64 rr_ctime; __u64 rr_size; __u64 rr_blocks; __u32 rr_bias; __u32 rr_mode; __u32 rr_flags; __u32 rr_flags_h; __u32 rr_umask; __u32 rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */ }; lustre_idl.h struct mgs_config_res { __u64 mcr_offset; /* index of last config log */ __u64 mcr_size; /* size of the log */ }; lustre_idl.h struct mgs_send_param { char mgs_param[MGS_PARAM_MAXLEN]; }; lustre_idl.h struct mgs_target_info { __u32 mti_lustre_ver; __u32 mti_stripe_index; __u32 mti_config_ver; __u32 mti_flags; __u32 mti_nid_count; __u32 mti_instance; /* Running instance of target */ char mti_fsname[MTI_NAME_MAXLEN]; char mti_svname[MTI_NAME_MAXLEN]; char mti_uuid[sizeof(struct obd_uuid)]; __u64 mti_nids[MTI_NIDS_MAX]; /* host nids (lnet_nid_t)*/ char mti_params[MTI_PARAM_MAXLEN]; }; lustre_idl.h struct niobuf_remote { __u64 rnb_offset; __u32 rnb_len; __u32 rnb_flags; }; lustre_idl.h struct obd_connect_data { __u64 ocd_connect_flags; /* OBD_CONNECT_* per above */ __u32 ocd_version; /* lustre release version number */ __u32 ocd_grant; /* initial cache grant amount (bytes) */ __u32 ocd_index; /* LOV index to connect to */ __u32 ocd_brw_size; /* Maximum BRW size in bytes */ __u64 ocd_ibits_known; /* inode bits this client understands */ __u8 ocd_blocksize; /* log2 of the backend filesystem blocksize */ __u8 ocd_inodespace; /* log2 of the per-inode space consumption */ __u16 ocd_grant_extent; /* per-extent grant overhead, in 1K blocks */ __u32 ocd_unused; /* also fix lustre_swab_connect */ __u64 ocd_transno; /* first transno from client to be replayed */ __u32 ocd_group; /* MDS group on OST */ __u32 ocd_cksum_types; /* supported checksum algorithms */ __u32 ocd_max_easize; /* How big LOV EA can be on MDS */ __u32 ocd_instance; /* instance # of this target */ __u64 ocd_maxbytes; /* Maximum stripe size in bytes */ /* Fields after ocd_maxbytes are only accessible by the receiver * if the corresponding flag in ocd_connect_flags is set. Accessing * any field after ocd_maxbytes on the receiver without a valid flag * may result in out-of-bound memory access and kernel oops. */ __u64 padding1; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding2; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding3; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding4; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding5; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding6; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding7; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding8; /* added 2.1.0. also fix lustre_swab_connect */ __u64 padding9; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingA; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingB; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingC; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingD; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingE; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingF; /* added 2.1.0. also fix lustre_swab_connect */ }; lustre_user.h struct obd_dqblk { __u64 dqb_bhardlimit; __u64 dqb_bsoftlimit; __u64 dqb_curspace; __u64 dqb_ihardlimit; __u64 dqb_isoftlimit; __u64 dqb_curinodes; __u64 dqb_btime; __u64 dqb_itime; __u32 dqb_valid; __u32 dqb_padding; }; lustre_user.h struct obd_dqinfo { __u64 dqi_bgrace; __u64 dqi_igrace; __u32 dqi_flags; __u32 dqi_valid; }; lustre_idl.h struct obd_ioobj { struct ost_id ioo_oid; /* object ID, if multi-obj BRW */ __u32 ioo_max_brw; /* low 16 bits were o_mode before 2.4, * now (PTLRPC_BULK_OPS_COUNT - 1) in * high 16 bits in 2.4 and later */ __u32 ioo_bufcnt; /* number of niobufs for this object */ }; lustre_idl.h struct obd_quotactl { __u32 qc_cmd; __u32 qc_type; /* see Q_* flag below */ __u32 qc_id; __u32 qc_stat; struct obd_dqinfo qc_dqinfo; struct obd_dqblk qc_dqblk; }; lustre_user.h struct obd_statfs { __u64 os_type; __u64 os_blocks; __u64 os_bfree; __u64 os_bavail; __u64 os_files; __u64 os_ffree; __u8 os_fsid[40]; __u32 os_bsize; __u32 os_namelen; __u64 os_maxbytes; __u32 os_state; /**< obd_statfs_state OS_STATE_* flag */ __u32 os_fprecreated; /* objs available now to the caller */ /* used in QoS code to find preferred * OSTs */ __u32 os_spare2; __u32 os_spare3; __u32 os_spare4; __u32 os_spare5; __u32 os_spare6; __u32 os_spare7; __u32 os_spare8; __u32 os_spare9; }; lustre_user.h #define UUID_MAX 40 struct obd_uuid { char uuid[UUID_MAX]; }; struct obdo { __u64 o_valid; /* hot fields in this obdo */ struct ost_id o_oi; __u64 o_parent_seq; __u64 o_size; /* o_size-o_blocks == ost_lvb */ __s64 o_mtime; __s64 o_atime; __s64 o_ctime; __u64 o_blocks; /* brw: cli sent cached bytes */ __u64 o_grant; /* 32-bit fields start here: keep an even number of them via padding */ __u32 o_blksize; /* optimal IO blocksize */ __u32 o_mode; /* brw: cli sent cache remain */ __u32 o_uid; __u32 o_gid; __u32 o_flags; __u32 o_nlink; /* brw: checksum */ __u32 o_parent_oid; __u32 o_misc; /* brw: o_dropped */ __u64 o_ioepoch; /* epoch in ost writes */ __u32 o_stripe_idx; /* holds stripe idx */ __u32 o_parent_ver; struct lustre_handle o_handle; /* brw: lock handle to prolong * locks */ struct llog_cookie o_lcookie; /* destroy: unlink cookie from * MDS */ __u32 o_uid_h; __u32 o_gid_h; __u64 o_data_version; /* getattr: sum of iversion for * each stripe. * brw: grant space consumed on * the client for the write */ __u64 o_padding_4; __u64 o_padding_5; __u64 o_padding_6; }; lustre_idl.h struct ost_body { struct obdo oa; }; lustre_user.h struct ost_id { union { struct { __u64 oi_id; __u64 oi_seq; } oi; struct lu_fid oi_fid; }; }; lustre_idl.h struct ptlrpc_body_v3 { struct lustre_handle pb_handle; __u32 pb_type; __u32 pb_version; __u32 pb_opc; __u32 pb_status; __u64 pb_last_xid; __u64 pb_last_seen; __u64 pb_last_committed; __u64 pb_transno; __u32 pb_flags; __u32 pb_op_flags; __u32 pb_conn_cnt; __u32 pb_timeout; /* for req, the deadline, for rep, the service est */ __u32 pb_service_time; /* for rep, actual service time */ __u32 pb_limit; __u64 pb_slv; /* VBR: pre-versions */ __u64 pb_pre_versions[PTLRPC_NUM_VERSIONS]; /* padding for future needs */ __u64 pb_padding[4]; char pb_jobid[LUSTRE_JOBID_SIZE]; }; lustre_idl.h struct quota_body { struct lu_fid qb_fid; /* FID of global index packing the pool ID * and type (data or metadata) as well as * the quota type (user or group). */ union lquota_id qb_id; /* uid or gid or directory FID */ __u32 qb_flags; /* see below */ __u32 qb_padding; __u64 qb_count; /* acquire/release count (kbytes/inodes) */ __u64 qb_usage; /* current slave usage (kbytes/inodes) */ __u64 qb_slv_ver; /* slave index file version */ struct lustre_handle qb_lockh; /* per-ID lock handle */ struct lustre_handle qb_glb_lockh; /* global lock handle */ __u64 qb_padding1[4]; };