Whamcloud - gitweb
LUDOC-270 protocol: Add a 'basement' dir with support files
[doc/protocol.git] / basement / struct_defs.txt
1 This is all the structs defined in lustre_idl.h iand lustre_user.h, in
2 the lustre/include/lustre/ directory, in support of the message format
3 symbols. If the right column has <none> that means there is no
4 corresponding "RMF_BLA" declaration, it is either unused or used in a
5 way I haven't quite sorted out. If there is an X in the right column
6 then the RMF_BLA declaration's name is identical to the 'struct'
7 declaration, but if the "name" is different it is noted in
8 parentheses. If there is a name in the right column then the space
9 allocated for the RMF_BLA declaration is the size for this struct, but
10 the name in the RMF_BLA declaration doesn't exactly match. The
11 ptlrpc_body_v2 and ptlrpc_body_v3 structs do not appear in any
12 declarations, but there is a #DEFINE for ptlrpc_body that defines it
13 as ptlrpc_body_v3 so I treat it as matching. A #if construct will
14 substitute obd_connect_data_v1 for obdconnect_data in code from
15 Lustre-2.0 and before.
16
17 struct definiiton       RMF_* name
18 -----------------       -----------
19 close_data              X (data_version)
20 getinfo_fid2path        <none>
21 hsm_current_action      X
22 hsm_progress_kernel     hsm_progress
23 hsm_request             X
24 hsm_state_set           X
25 hsm_user_item           X
26 idx_info                X
27 layout_intent           X
28 ldlm_intent             X
29 ldlm_reply              dlm_rep
30 ldlm_request            dlm_req
31 lfsck_reply             X
32 lfsck_request           X
33 ll_fiemap_info_key      fiemap
34 llog_cookie             llog_cookies
35 llog_log_hdr            X
36 llogd_body              X
37 llogd_conn_body         X
38 lu_fid                  fid
39 lu_seq_range            fld_query_mdfld
40 lustre_capa             capa
41 lustre_capa_key         <none>
42 lustre_msg_v2           [the is the header, not a message format, per se]
43 mdc_swap_layouts        swap_layouts
44 mdt_body                X
45 mdt_ioepoch             X
46 mdt_rec_reint           rec_reint
47 mdt_rec_rename          <none>
48 mgs_config_res          X (mgs_config_read reply)
49 mgs_send_param          X
50 mgs_target_info         X
51 niobuf_remote           X
52 obd_connect_data        cdata
53 obd_connect_data_v1     <none>
54 obd_ioobj               X
55 obd_quotactl            X
56 obd_statfs              X
57 obd_uuid                tgtuuid
58 object_update           X
59 object_update_param     <none>
60 object_update_reply     X
61 object_update_request   <none>
62 object_update_result    <none>
63 ost_body                X
64 ptlrpc_body_v2          <none>
65 ptlrpc_body_v3          X (as ptlrpc_body)
66 quota_body              X
67
68 ----------------------------------------------------------------------
69 These are definitions from the header files that appear in
70 structures.txt but are not (or do not correspond to) struct
71 definitions:
72  
73 lustre_acl.h
74 #  define LUSTRE_POSIX_ACL_MAX_SIZE                                     \
75         (sizeof(posix_acl_xattr_header) +                               \
76          LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry))
77
78 lustre_idl.h
79 #define MIN_MD_SIZE (sizeof(struct lov_mds_md) + 1 * sizeof(struct lov_ost_data))
80
81 ----------------------------------------------------------------------
82
83 The following are the actual struct definitions for the two header
84 files. Which file is listed, then the struct defnition. 
85
86 lustre_idl.h
87 struct close_data {
88         struct lustre_handle    cd_handle;
89         struct lu_fid           cd_fid;
90         __u64                   cd_data_version;
91         __u64                   cd_reserved[8];
92 };
93
94 lustre_user.h
95 struct hsm_current_action {
96         /**  The current undergoing action, if there is one */
97         /* state is one of hsm_progress_states */
98         __u32                   hca_state;
99         /* action is one of hsm_user_action */
100         __u32                   hca_action;
101         struct hsm_extent       hca_location;
102 };
103
104 lustre_user.h
105 struct hsm_extent {
106         __u64 offset;
107         __u64 length;
108 } __attribute__((packed));
109
110 lustre_idl.h
111 struct hsm_progress_kernel {
112         /* Field taken from struct hsm_progress */
113         lustre_fid              hpk_fid;
114         __u64                   hpk_cookie;
115         struct hsm_extent       hpk_extent;
116         __u16                   hpk_flags;
117         __u16                   hpk_errval; /* positive val */
118         __u32                   hpk_padding1;
119         /* Additional fields */
120         __u64                   hpk_data_version;
121         __u64                   hpk_padding2;
122 } __attribute__((packed));
123
124 lustre_user.h
125 struct hsm_request {
126         __u32 hr_action;        /* enum hsm_user_action */
127         __u32 hr_archive_id;    /* archive id, used only with HUA_ARCHIVE */
128         __u64 hr_flags;         /* request flags */
129         __u32 hr_itemcount;     /* item count in hur_user_item vector */
130         __u32 hr_data_len;
131 };
132
133 lustre_idl.h
134 struct hsm_state_set {
135         __u32   hss_valid;
136         __u32   hss_archive_id;
137         __u64   hss_setmask;
138         __u64   hss_clearmask;
139 };
140
141 lustre_user.h
142 struct hsm_user_item {
143        lustre_fid        hui_fid;
144        struct hsm_extent hui_extent;
145 } __attribute__((packed));
146
147 lustre_user.h
148 struct hsm_user_state {
149         /** Current HSM states, from enum hsm_states. */
150         __u32                   hus_states;
151         __u32                   hus_archive_id;
152         /**  The current undergoing action, if there is one */
153         __u32                   hus_in_progress_state;
154         __u32                   hus_in_progress_action;
155         struct hsm_extent       hus_in_progress_location;
156         char                    hus_extended_info[];
157 };
158
159 lustre_idl.h
160 struct idx_info {
161         __u32           ii_magic;
162
163         /* reply: see idx_info_flags below */
164         __u32           ii_flags;
165
166         /* request & reply: number of lu_idxpage (to be) transferred */
167         __u16           ii_count;
168         __u16           ii_pad0;
169
170         /* request: requested attributes passed down to the iterator API */
171         __u32           ii_attrs;
172
173         /* request & reply: index file identifier (FID) */
174         struct lu_fid   ii_fid;
175
176         /* reply: version of the index file before starting to walk the index.
177          * Please note that the version can be modified at any time during the
178          * transfer */
179         __u64           ii_version;
180
181         /* request: hash to start with:
182          * reply: hash of the first entry of the first lu_idxpage and hash
183          *        of the entry to read next if any */
184         __u64           ii_hash_start;
185         __u64           ii_hash_end;
186
187         /* reply: size of keys in lu_idxpages, minimal one if II_FL_VARKEY is
188          * set */
189         __u16           ii_keysize;
190
191         /* reply: size of records in lu_idxpages, minimal one if II_FL_VARREC
192          * is set */
193         __u16           ii_recsize;
194
195         __u32           ii_pad1;
196         __u64           ii_pad2;
197         __u64           ii_pad3;
198 };
199
200 lustre_idl.h
201 struct layout_intent {
202         __u32 li_opc; /* intent operation for enqueue, read, write etc */
203         __u32 li_flags;
204         __u64 li_start;
205         __u64 li_end;
206 };
207
208 lustre_idl.h
209 union ldlm_gl_desc {
210         struct ldlm_gl_lquota_desc      lquota_desc;
211 };
212
213 lustre_idl.h
214 struct ldlm_gl_lquota_desc {
215         union lquota_id gl_id;    /* quota ID subject to the glimpse */
216         __u64           gl_flags; /* see LQUOTA_FL* below */
217         __u64           gl_ver;   /* new index version */
218         __u64           gl_hardlimit; /* new hardlimit or qunit value */
219         __u64           gl_softlimit; /* new softlimit */
220         __u64           gl_time;
221         __u64           gl_pad2;
222 };
223
224 lustre_idl.h
225 struct ldlm_intent {
226         __u64 opc;
227 };
228
229 lustre_idl.h
230 struct ldlm_lock_desc {
231         struct ldlm_resource_desc l_resource;
232         ldlm_mode_t l_req_mode;
233         ldlm_mode_t l_granted_mode;
234         ldlm_wire_policy_data_t l_policy_data;
235 };
236
237 lustre_idl.h
238 struct ldlm_reply {
239         __u32 lock_flags;
240         __u32 lock_padding;     /* also fix lustre_swab_ldlm_reply */
241         struct ldlm_lock_desc lock_desc;
242         struct lustre_handle lock_handle;
243         __u64  lock_policy_res1;
244         __u64  lock_policy_res2;
245 };
246
247 lustre_idl.h
248 struct ldlm_request {
249         __u32 lock_flags;
250         __u32 lock_count;
251         struct ldlm_lock_desc lock_desc;
252         struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES];
253 };
254
255 lustre_idl.h
256 #define RES_NAME_SIZE 4
257 struct ldlm_res_id {
258         __u64 name[RES_NAME_SIZE];
259 };
260
261 lustre_idl.h
262 struct ldlm_resource_desc {
263         ldlm_type_t lr_type;
264         __u32 lr_padding;       /* also fix lustre_swab_ldlm_resource_desc */
265         struct ldlm_res_id lr_name;
266 };
267
268 lustre_idl.h
269 struct lfsck_reply {
270         __u32           lr_status;
271         __u32           lr_padding_1;
272         __u64           lr_padding_2;
273 };
274
275 lustre_idl.h
276 struct lfsck_request {
277         __u32           lr_event;
278         __u32           lr_index;
279         __u32           lr_flags;
280         __u32           lr_valid;
281         union {
282                 __u32   lr_speed;
283                 __u32   lr_status;
284                 __u32   lr_type;
285         };
286         __u16           lr_version;
287         __u16           lr_active;
288         __u16           lr_param;
289         __u16           lr_async_windows;
290         __u32           lr_flags2;
291         struct lu_fid   lr_fid;
292         struct lu_fid   lr_fid2;
293         struct lu_fid   lr_fid3;
294         __u64           lr_padding_1;
295         __u64           lr_padding_2;
296 };
297
298 lustre_idl.h
299 struct ll_fiemap_info_key {
300         char    name[8];
301         struct  obdo oa;
302         struct  ll_user_fiemap fiemap;
303 };
304
305 ll_fiemap.h
306 struct ll_user_fiemap {
307         __u64 fm_start;  /* logical offset (inclusive) at
308                           * which to start mapping (in) */
309         __u64 fm_length; /* logical length of mapping which
310                           * userspace wants (in) */
311         __u32 fm_flags;  /* FIEMAP_FLAG_* flags for request (in/out) */
312         __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
313         __u32 fm_extent_count;  /* size of fm_extents array (in) */
314         __u32 fm_reserved;
315         struct ll_fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
316 };
317
318 ll_fiemap.h
319 struct ll_fiemap_extent {
320         __u64 fe_logical;  /* logical offset in bytes for the start of
321                             * the extent from the beginning of the file */
322         __u64 fe_physical; /* physical offset in bytes for the start
323                             * of the extent from the beginning of the disk */
324         __u64 fe_length;   /* length in bytes for this extent */
325         __u64 fe_reserved64[2];
326         __u32 fe_flags;    /* FIEMAP_EXTENT_* flags for this extent */
327         __u32 fe_device;   /* device number for this extent */
328         __u32 fe_reserved[2];
329 };
330
331 lustre_idl.h
332 struct llog_cookie {
333         struct llog_logid       lgc_lgl;
334         __u32                   lgc_subsys;
335         __u32                   lgc_index;
336         __u32                   lgc_padding;
337 } __attribute__((packed));
338
339 lustre_idl.h
340 struct llog_gen {
341         __u64 mnt_cnt;
342         __u64 conn_cnt;
343 } __attribute__((packed));
344
345 lustre_idl.h
346 struct llog_log_hdr {
347         struct llog_rec_hdr     llh_hdr;
348         __s64                   llh_timestamp;
349         __u32                   llh_count;
350         __u32                   llh_bitmap_offset;
351         __u32                   llh_size;
352         __u32                   llh_flags;
353         __u32                   llh_cat_idx;
354         /* for a catalog the first plain slot is next to it */
355         struct obd_uuid         llh_tgtuuid;
356         __u32                   llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23];
357         __u32                   llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)];
358         struct llog_rec_tail    llh_tail;
359 } __attribute__((packed));
360
361 lustre_idl.h
362 struct llog_logid {
363         struct ost_id           lgl_oi;
364         __u32                   lgl_ogen;
365 } __attribute__((packed));
366
367 lustre_idl.h
368 struct llog_rec_hdr {
369         __u32   lrh_len;
370         __u32   lrh_index;
371         __u32   lrh_type;
372         __u32   lrh_id;
373 };
374
375 lustre_idl.h
376 struct llog_rec_tail {
377         __u32   lrt_len;
378         __u32   lrt_index;
379 };
380
381 lustre_idl.h
382 struct llogd_body {
383         struct llog_logid  lgd_logid;
384         __u32 lgd_ctxt_idx;
385         __u32 lgd_llh_flags;
386         __u32 lgd_index;
387         __u32 lgd_saved_index;
388         __u32 lgd_len;
389         __u64 lgd_cur_offset;
390 } __attribute__((packed));
391
392 lustre_idl.h
393 struct llogd_conn_body {
394         struct llog_gen         lgdc_gen;
395         struct llog_logid       lgdc_logid;
396         __u32                   lgdc_ctxt_idx;
397 } __attribute__((packed));
398
399 #define lov_mds_md lov_mds_md_v1
400 struct lov_mds_md_v1 {            /* LOV EA mds/wire data (little-endian) */
401         __u32 lmm_magic;          /* magic number = LOV_MAGIC_V1 */
402         __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
403         struct ost_id   lmm_oi;   /* LOV object ID */
404         __u32 lmm_stripe_size;    /* size of stripe in bytes */
405         /* lmm_stripe_count used to be __u32 */
406         __u16 lmm_stripe_count;   /* num stripes in use for this object */
407         __u16 lmm_layout_gen;     /* layout generation number */
408         struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
409 };
410
411 lustre_user.h
412 #define lov_ost_data lov_ost_data_v1
413 struct lov_ost_data_v1 {          /* per-stripe data structure (little-endian)*/
414         struct ost_id l_ost_oi;   /* OST object ID */
415         __u32 l_ost_gen;          /* generation of this l_ost_idx */
416         __u32 l_ost_idx;          /* OST index in LOV (lov_tgt_desc->tgts) */
417 };
418
419 lustre_user.h
420 struct lu_fid {
421        /**
422         * FID sequence. Sequence is a unit of migration: all files (objects)
423         * with FIDs from a given sequence are stored on the same server.
424         * Lustre should support 2^64 objects, so even if each sequence
425         * has only a single object we can still enumerate 2^64 objects.
426         **/
427         __u64 f_seq;
428         /* FID number within sequence. */
429         __u32 f_oid;
430         /**
431          * FID version, used to distinguish different versions (in the sense
432          * of snapshots, etc.) of the same file system object. Not currently
433          * used.
434          **/
435         __u32 f_ver;
436 };
437
438 lustre_idl.h
439 struct lu_seq_range {
440         __u64 lsr_start;
441         __u64 lsr_end;
442         __u32 lsr_index;
443         __u32 lsr_flags;
444 };
445
446 lustre_idl.h
447 struct lustre_capa {
448         struct lu_fid   lc_fid;         /** fid */
449         __u64           lc_opc;         /** operations allowed */
450         __u64           lc_uid;         /** file owner */
451         __u64           lc_gid;         /** file group */
452         __u32           lc_flags;       /** HMAC algorithm & flags */
453         __u32           lc_keyid;       /** key# used for the capability */
454         __u32           lc_timeout;     /** capa timeout value (sec) */
455         __u32           lc_expiry;      /** expiry time (sec) */
456         __u8            lc_hmac[CAPA_HMAC_MAX_LEN];   /** HMAC */
457 } __attribute__((packed));
458
459 lustre_idl.h
460 struct lustre_handle {
461         __u64 cookie;
462 };
463
464 lustre_idl.h
465 struct lustre_msg_v2 {
466         __u32 lm_bufcount;
467         __u32 lm_secflvr;
468         __u32 lm_magic;
469         __u32 lm_repsize;
470         __u32 lm_cksum;
471         __u32 lm_flags;
472         __u32 lm_padding_2;
473         __u32 lm_padding_3;
474         __u32 lm_buflens[0];
475 };
476
477 lustre_idl.h
478 struct mdc_swap_layouts {
479         __u64           msl_flags;
480 } __packed;
481
482 lustre_idl.h
483 struct mdt_body {
484         struct lu_fid mbo_fid1;
485         struct lu_fid mbo_fid2;
486         struct lustre_handle mbo_handle;
487         __u64   mbo_valid;
488         __u64   mbo_size; /* Offset, in the case of MDS_READPAGE */
489         __s64   mbo_mtime;
490         __s64   mbo_atime;
491         __s64   mbo_ctime;
492         __u64   mbo_blocks; /* XID, in the case of MDS_READPAGE */
493         __u64   mbo_ioepoch;
494         __u64   mbo_t_state; /* transient file state defined in
495                               * enum md_transient_state
496                               * was "ino" until 2.4.0 */
497         __u32   mbo_fsuid;
498         __u32   mbo_fsgid;
499         __u32   mbo_capability;
500         __u32   mbo_mode;
501         __u32   mbo_uid;
502         __u32   mbo_gid;
503         __u32   mbo_flags;
504         __u32   mbo_rdev;
505         __u32   mbo_nlink; /* #bytes to read in the case of MDS_READPAGE */
506         __u32   mbo_unused2; /* was "generation" until 2.4.0 */
507         __u32   mbo_suppgid;
508         __u32   mbo_eadatasize;
509         __u32   mbo_aclsize;
510         __u32   mbo_max_mdsize;
511         __u32   mbo_max_cookiesize;
512         __u32   mbo_uid_h; /* high 32-bits of uid, for FUID */
513         __u32   mbo_gid_h; /* high 32-bits of gid, for FUID */
514         __u32   mbo_padding_5; /* also fix lustre_swab_mdt_body */
515         __u64   mbo_padding_6;
516         __u64   mbo_padding_7;
517         __u64   mbo_padding_8;
518         __u64   mbo_padding_9;
519         __u64   mbo_padding_10;
520 }; /* 216 */
521
522 lustre_idl.h
523 struct mdt_ioepoch {
524         struct lustre_handle handle;
525         __u64  ioepoch;
526         __u32  flags;
527         __u32  padding;
528 };
529
530 lustre_idl.h
531 struct mdt_rec_reint {
532         __u32           rr_opcode;
533         __u32           rr_cap;
534         __u32           rr_fsuid;
535         __u32           rr_fsuid_h;
536         __u32           rr_fsgid;
537         __u32           rr_fsgid_h;
538         __u32           rr_suppgid1;
539         __u32           rr_suppgid1_h;
540         __u32           rr_suppgid2;
541         __u32           rr_suppgid2_h;
542         struct lu_fid   rr_fid1;
543         struct lu_fid   rr_fid2;
544         __s64           rr_mtime;
545         __s64           rr_atime;
546         __s64           rr_ctime;
547         __u64           rr_size;
548         __u64           rr_blocks;
549         __u32           rr_bias;
550         __u32           rr_mode;
551         __u32           rr_flags;
552         __u32           rr_flags_h;
553         __u32           rr_umask;
554         __u32           rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */
555 };
556
557 lustre_idl.h
558 struct mgs_config_res {
559         __u64    mcr_offset;    /* index of last config log */
560         __u64    mcr_size;      /* size of the log */
561 };
562
563 lustre_idl.h
564 struct mgs_send_param {
565         char             mgs_param[MGS_PARAM_MAXLEN];
566 };
567
568 lustre_idl.h
569 struct mgs_target_info {
570         __u32            mti_lustre_ver;
571         __u32            mti_stripe_index;
572         __u32            mti_config_ver;
573         __u32            mti_flags;
574         __u32            mti_nid_count;
575         __u32            mti_instance; /* Running instance of target */
576         char             mti_fsname[MTI_NAME_MAXLEN];
577         char             mti_svname[MTI_NAME_MAXLEN];
578         char             mti_uuid[sizeof(struct obd_uuid)];
579         __u64            mti_nids[MTI_NIDS_MAX];     /* host nids (lnet_nid_t)*/
580         char             mti_params[MTI_PARAM_MAXLEN];
581 };
582
583 lustre_idl.h
584 struct niobuf_remote {
585         __u64   rnb_offset;
586         __u32   rnb_len;
587         __u32   rnb_flags;
588 };
589
590 lustre_idl.h
591 struct obd_connect_data {
592         __u64 ocd_connect_flags; /* OBD_CONNECT_* per above */
593         __u32 ocd_version;       /* lustre release version number */
594         __u32 ocd_grant;         /* initial cache grant amount (bytes) */
595         __u32 ocd_index;         /* LOV index to connect to */
596         __u32 ocd_brw_size;      /* Maximum BRW size in bytes */
597         __u64 ocd_ibits_known;   /* inode bits this client understands */
598         __u8  ocd_blocksize;     /* log2 of the backend filesystem blocksize */
599         __u8  ocd_inodespace;    /* log2 of the per-inode space consumption */
600         __u16 ocd_grant_extent;  /* per-extent grant overhead, in 1K blocks */
601         __u32 ocd_unused;        /* also fix lustre_swab_connect */
602         __u64 ocd_transno;       /* first transno from client to be replayed */
603         __u32 ocd_group;         /* MDS group on OST */
604         __u32 ocd_cksum_types;   /* supported checksum algorithms */
605         __u32 ocd_max_easize;    /* How big LOV EA can be on MDS */
606         __u32 ocd_instance;      /* instance # of this target */
607         __u64 ocd_maxbytes;      /* Maximum stripe size in bytes */
608         /* Fields after ocd_maxbytes are only accessible by the receiver
609          * if the corresponding flag in ocd_connect_flags is set. Accessing
610          * any field after ocd_maxbytes on the receiver without a valid flag
611          * may result in out-of-bound memory access and kernel oops. */
612         __u64 padding1;          /* added 2.1.0. also fix lustre_swab_connect */
613         __u64 padding2;          /* added 2.1.0. also fix lustre_swab_connect */
614         __u64 padding3;          /* added 2.1.0. also fix lustre_swab_connect */
615         __u64 padding4;          /* added 2.1.0. also fix lustre_swab_connect */
616         __u64 padding5;          /* added 2.1.0. also fix lustre_swab_connect */
617         __u64 padding6;          /* added 2.1.0. also fix lustre_swab_connect */
618         __u64 padding7;          /* added 2.1.0. also fix lustre_swab_connect */
619         __u64 padding8;          /* added 2.1.0. also fix lustre_swab_connect */
620         __u64 padding9;          /* added 2.1.0. also fix lustre_swab_connect */
621         __u64 paddingA;          /* added 2.1.0. also fix lustre_swab_connect */
622         __u64 paddingB;          /* added 2.1.0. also fix lustre_swab_connect */
623         __u64 paddingC;          /* added 2.1.0. also fix lustre_swab_connect */
624         __u64 paddingD;          /* added 2.1.0. also fix lustre_swab_connect */
625         __u64 paddingE;          /* added 2.1.0. also fix lustre_swab_connect */
626         __u64 paddingF;          /* added 2.1.0. also fix lustre_swab_connect */
627 };
628
629 lustre_user.h
630 struct obd_dqblk {
631         __u64 dqb_bhardlimit;
632         __u64 dqb_bsoftlimit;
633         __u64 dqb_curspace;
634         __u64 dqb_ihardlimit;
635         __u64 dqb_isoftlimit;
636         __u64 dqb_curinodes;
637         __u64 dqb_btime;
638         __u64 dqb_itime;
639         __u32 dqb_valid;
640         __u32 dqb_padding;
641 };
642
643 lustre_user.h
644 struct obd_dqinfo {
645         __u64 dqi_bgrace;
646         __u64 dqi_igrace;
647         __u32 dqi_flags;
648         __u32 dqi_valid;
649 };
650
651 lustre_idl.h
652 struct obd_ioobj {
653         struct ost_id   ioo_oid;        /* object ID, if multi-obj BRW */
654         __u32           ioo_max_brw;    /* low 16 bits were o_mode before 2.4,
655                                          * now (PTLRPC_BULK_OPS_COUNT - 1) in
656                                          * high 16 bits in 2.4 and later */
657         __u32           ioo_bufcnt;     /* number of niobufs for this object */
658 };
659
660 lustre_idl.h
661 struct obd_quotactl {
662         __u32                   qc_cmd;
663         __u32                   qc_type; /* see Q_* flag below */
664         __u32                   qc_id;
665         __u32                   qc_stat;
666         struct obd_dqinfo       qc_dqinfo;
667         struct obd_dqblk        qc_dqblk;
668 };
669
670 lustre_user.h
671 struct obd_statfs {
672         __u64           os_type;
673         __u64           os_blocks;
674         __u64           os_bfree;
675         __u64           os_bavail;
676         __u64           os_files;
677         __u64           os_ffree;
678         __u8            os_fsid[40];
679         __u32           os_bsize;
680         __u32           os_namelen;
681         __u64           os_maxbytes;
682         __u32           os_state;       /**< obd_statfs_state OS_STATE_* flag */
683         __u32           os_fprecreated; /* objs available now to the caller */
684                                         /* used in QoS code to find preferred
685                                          * OSTs */
686         __u32           os_spare2;
687         __u32           os_spare3;
688         __u32           os_spare4;
689         __u32           os_spare5;
690         __u32           os_spare6;
691         __u32           os_spare7;
692         __u32           os_spare8;
693         __u32           os_spare9;
694 };
695
696 lustre_user.h
697 #define UUID_MAX        40
698 struct obd_uuid {
699         char uuid[UUID_MAX];
700 };
701
702 struct obdo {
703         __u64                   o_valid;        /* hot fields in this obdo */
704         struct ost_id           o_oi;
705         __u64                   o_parent_seq;
706         __u64                   o_size;         /* o_size-o_blocks == ost_lvb */
707         __s64                   o_mtime;
708         __s64                   o_atime;
709         __s64                   o_ctime;
710         __u64                   o_blocks;       /* brw: cli sent cached bytes */
711         __u64                   o_grant;
712
713         /* 32-bit fields start here: keep an even number of them via padding */
714         __u32                   o_blksize;      /* optimal IO blocksize */
715         __u32                   o_mode;         /* brw: cli sent cache remain */
716         __u32                   o_uid;
717         __u32                   o_gid;
718         __u32                   o_flags;
719         __u32                   o_nlink;        /* brw: checksum */
720         __u32                   o_parent_oid;
721         __u32                   o_misc;         /* brw: o_dropped */
722
723         __u64                   o_ioepoch;      /* epoch in ost writes */
724         __u32                   o_stripe_idx;   /* holds stripe idx */
725         __u32                   o_parent_ver;
726         struct lustre_handle    o_handle;       /* brw: lock handle to prolong
727                                                  * locks */
728         struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from
729                                                  * MDS */
730         __u32                   o_uid_h;
731         __u32                   o_gid_h;
732
733         __u64                   o_data_version; /* getattr: sum of iversion for
734                                                  * each stripe.
735                                                  * brw: grant space consumed on
736                                                  * the client for the write */
737         __u64                   o_padding_4;
738         __u64                   o_padding_5;
739         __u64                   o_padding_6;
740 };
741
742 lustre_idl.h
743 struct ost_body {
744         struct  obdo oa;
745 };
746
747 lustre_user.h
748 struct ost_id {
749         union {
750                 struct {
751                         __u64   oi_id;
752                         __u64   oi_seq;
753                 } oi;
754                 struct lu_fid oi_fid;
755         };
756 };
757
758 lustre_idl.h
759 struct ptlrpc_body_v3 {
760         struct lustre_handle pb_handle;
761         __u32 pb_type;
762         __u32 pb_version;
763         __u32 pb_opc;
764         __u32 pb_status;
765         __u64 pb_last_xid;
766         __u64 pb_last_seen;
767         __u64 pb_last_committed;
768         __u64 pb_transno;
769         __u32 pb_flags;
770         __u32 pb_op_flags;
771         __u32 pb_conn_cnt;
772         __u32 pb_timeout;  /* for req, the deadline, for rep, the service est */
773         __u32 pb_service_time; /* for rep, actual service time */
774         __u32 pb_limit;
775         __u64 pb_slv;
776         /* VBR: pre-versions */
777         __u64 pb_pre_versions[PTLRPC_NUM_VERSIONS];
778         /* padding for future needs */
779         __u64 pb_padding[4];
780         char  pb_jobid[LUSTRE_JOBID_SIZE];
781 };
782
783 lustre_idl.h
784 struct quota_body {
785         struct lu_fid   qb_fid;     /* FID of global index packing the pool ID
786                                       * and type (data or metadata) as well as
787                                       * the quota type (user or group). */
788         union lquota_id qb_id;      /* uid or gid or directory FID */
789         __u32           qb_flags;   /* see below */
790         __u32           qb_padding;
791         __u64           qb_count;   /* acquire/release count (kbytes/inodes) */
792         __u64           qb_usage;   /* current slave usage (kbytes/inodes) */
793         __u64           qb_slv_ver; /* slave index file version */
794         struct lustre_handle    qb_lockh;     /* per-ID lock handle */
795         struct lustre_handle    qb_glb_lockh; /* global lock handle */
796         __u64           qb_padding1[4];
797 };