5 An 'mdt_body' structure conveys information about the metadata for a
6 single resource, typically an MDT inode.
11 struct lu_fid mbo_fid1; /* OBD_MD_FLID */
12 struct lu_fid mbo_fid2; /* OBD_MD_FLID */
13 struct lustre_handle mbo_handle;
15 __u64 mbo_size; /* OBD_MD_FLSIZE */
16 __s64 mbo_mtime; /* OBD_MD_FLATIME */
17 __s64 mbo_atime; /* OBD_MD_FLMTIME */
18 __s64 mbo_ctime; /* OBD_MD_FLCTIME */
19 __u64 mbo_blocks; /* OBD_MD_FLBLOCKS */
21 __u64 mbo_t_state; /* OBD_MD_TSTATE */
25 __u32 mbo_mode; /* OBD_MD_FLMODE */
26 __u32 mbo_uid; /* OBD_MD_FLUID */
27 __u32 mbo_gid; /* OBD_MD_FLGID */
28 __u32 mbo_flags; /* OBD_MD_FLFLAGS */
29 __u32 mbo_rdev; /* OBD_MD_FLRDEV */
30 __u32 mbo_nlink; /* OBD_MD_FLNLINK */
33 __u32 mbo_eadatasize; /* OBD_MD_FLEASIZE */
34 __u32 mbo_aclsize; /* OBD_MD_FLACL */
35 __u32 mbo_max_mdsize; /* OBD_MD_FLMODEASIZE */
36 __u32 mbo_max_cookiesize; /* OBD_MD_FLMODEASIZE */
48 For an operation that involves two resources both the 'mbo_fid1' and
49 'mbo_fid2' fields will be filled in. If the 'mdt_body' is part of an
50 RPC affecting or involving only a single resource then 'mbo_fid1' will
51 designate that resource and 'mbo_fid2' will be cleared.
53 include::struct_lu_fid.txt[]
55 The 'mbo_handle' field indicates the identity of an open file related
56 to the operation, if any. If there is no lock then it is just 0.
58 The 'mbo_valid' field identifies which of the remaining fields are
59 actually in force. The flags in 'mbo_valid' are:
63 #define OBD_MD_FLID (0x00000001ULL)
64 #define OBD_MD_FLATIME (0x00000002ULL)
65 #define OBD_MD_FLMTIME (0x00000004ULL)
66 #define OBD_MD_FLCTIME (0x00000008ULL)
67 #define OBD_MD_FLSIZE (0x00000010ULL)
68 #define OBD_MD_FLBLOCKS (0x00000020ULL)
69 #define OBD_MD_FLMODE (0x00000080ULL)
70 #define OBD_MD_FLUID (0x00000200ULL)
71 #define OBD_MD_FLGID (0x00000400ULL)
72 #define OBD_MD_FLFLAGS (0x00000800ULL)
73 #define OBD_MD_FLNLINK (0x00002000ULL)
74 #define OBD_MD_FLRDEV (0x00010000ULL)
75 #define OBD_MD_FLEASIZE (0x00020000ULL)
76 #define OBD_MD_FLMODEASIZE (0x80000000ULL)
77 #define OBD_MD_TSTATE (0x0000000800000000ULL)
78 #define OBD_MD_FLACL (0x0000008000000000ULL)
81 Which flag is associated with which field is indicated in the comments
82 beside the fields in the struct definition above. The fields without
83 corresponding flags in the 'mbo_valid' field should be considered
84 valid, though I'm not sure how much they actually get used.
86 Many of the fields have names and meanings that correspond directly to
87 those in 'struct mdt_rec_setattr' (ex. 'atime', 'size', 'mode',
88 etc). Mainly these are the conventional metadata attributes, and
89 should be self-explanatory. The ones that are a little less obvious are
92 The 'mbo_ioepoch' field is no longer in use.
94 The 'mbo_t_state' field indicates if there is a "transient state", as
95 when an HSM "restore" is in operation.
97 The 'mbo_rdev' field holds the special device number for a block or
98 character device associated with the resource, if there is one. It will
99 be 0 for a regular file.
101 The 'mbo_nlink' field gives the number of hard links to the resource.
103 The 'mbo_eadatasize' field gives the size of the extended attributes,
104 which hold such information as the resource's layout.
106 The 'mbo_aclsize' field indicates the size of the POSIX access control
107 lists (ACLs) in bytes.
109 The 'mbo_max_mdsize' field indicates the maximu size of the file layout,
110 as described in <<struct-lov-mds-md>>
112 The 'mbo_max_cookiesize' field is unused since Lustre 2.4. It
113 formerly held the maximum permissible size of llog cookies for
114 destroyed OST objects.