Whamcloud - gitweb
LUDOC-296 protocol: remove internal details from descriptions
[doc/protocol.git] / struct_ost_body.txt
1 OST Body
2 ^^^^^^^^
3 [[struct-ost-body]]
4
5 The 'ost_body' structure just holds a 'struct 'obdo', which is where
6 all the actual information is conveyed.
7
8 [source,c]
9 ----
10 struct ost_body {
11         struct  obdo oa;
12 };
13 ----
14
15 Obdo
16 ^^^^
17 [[struct-obdo]]
18
19 The 'obdo' structure conveys metadata about a resource on an OST.
20
21 [source,c]
22 ----
23 struct obdo {
24         __u64                   o_valid;
25         struct ost_id           o_oi; /* OBD_MD_FLID */
26         __u64                   o_parent_seq; /* OBD_MD_FLFID */
27         __u64                   o_size; /* OBD_MD_FLSIZE */
28         __s64                   o_mtime; /* OBD_MD_FLMTIME */
29         __s64                   o_atime; /* OBD_MD_FLMTIME */
30         __s64                   o_ctime; /* OBD_MD_FLCTIME */
31         __u64                   o_blocks; /* OBD_MD_FLBLOCKS */
32         __u64                   o_grant; /* OBD_MD_FLGRANT */
33         __u32                   o_blksize; /* OBD_MD_FLBLKSZ */
34         __u32                   o_mode; /* OBD_MD_FLMODE */
35         __u32                   o_uid; /* OBD_MD_FLUID */
36         __u32                   o_gid; /* OBD_MD_FLGID */
37         __u32                   o_flags; /* OBD_MD_FLFLAGS */
38         __u32                   o_nlink; /* OBD_MD_FLNLINK */
39         __u32                   o_parent_oid;
40         __u32                   o_misc;
41         __u64                   o_ioepoch; /* OBD_MD_ */
42         __u32                   o_stripe_idx;
43         __u32                   o_parent_ver; /* OBD_MD_FLFID */
44         struct lustre_handle    o_handle; /* OBD_MD_FLHANDLE */
45         struct llog_cookie      o_lcookie; /* OBD_MD_FLCOOKIE */
46         __u32                   o_uid_h;
47         __u32                   o_gid_h;
48         __u64                   o_data_version; /* OBD_MD_FLDATAVERSION */
49         __u64                   o_padding_4;
50         __u64                   o_padding_5;
51         __u64                   o_padding_6;
52 };
53 ----
54
55 The 'o_valid' field identifies which other fields in the structure are
56 to be interpreted. The flags are the same set (with additions) used
57 for the 'mdt_body' field 'mbo_valid' (see <<struct-mdt-body>>).
58
59 [source,c]
60 ----
61 #define OBD_MD_FLID        (0x00000001ULL)
62 #define OBD_MD_FLATIME     (0x00000002ULL)
63 #define OBD_MD_FLMTIME     (0x00000004ULL)
64 #define OBD_MD_FLCTIME     (0x00000008ULL)
65 #define OBD_MD_FLSIZE      (0x00000010ULL)
66 #define OBD_MD_FLBLOCKS    (0x00000020ULL)
67 #define OBD_MD_FLBLKSZ     (0x00000040ULL)
68 #define OBD_MD_FLMODE      (0x00000080ULL)
69 #define OBD_MD_FLTYPE      (0x00000100ULL)
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_FLGENER     (0x00004000ULL)
75 /*#define OBD_MD_FLINLINE    (0x00008000ULL)
76 #define OBD_MD_FLRDEV      (0x00010000ULL)
77 #define OBD_MD_FLEASIZE    (0x00020000ULL)
78 #define OBD_MD_LINKNAME    (0x00040000ULL)
79 #define OBD_MD_FLHANDLE    (0x00080000ULL)
80 #define OBD_MD_FLCKSUM     (0x00100000ULL)
81 #define OBD_MD_FLQOS       (0x00200000ULL)
82 /*#define OBD_MD_FLOSCOPQ    (0x00400000ULL)
83 #define OBD_MD_FLCOOKIE    (0x00800000ULL)
84 #define OBD_MD_FLGROUP     (0x01000000ULL)
85 #define OBD_MD_FLFID       (0x02000000ULL)
86 #define OBD_MD_FLEPOCH     (0x04000000ULL)
87 #define OBD_MD_FLGRANT     (0x08000000ULL)
88 #define OBD_MD_FLDIREA     (0x10000000ULL)
89 #define OBD_MD_FLUSRQUOTA  (0x20000000ULL)
90 #define OBD_MD_FLGRPQUOTA  (0x40000000ULL)
91 #define OBD_MD_FLMODEASIZE (0x80000000ULL)
92 #define OBD_MD_MDS         (0x0000000100000000ULL)
93 #define OBD_MD_REINT       (0x0000000200000000ULL)
94 #define OBD_MD_MEA         (0x0000000400000000ULL)
95 #define OBD_MD_TSTATE      (0x0000000800000000ULL)
96 #define OBD_MD_FLXATTR       (0x0000001000000000ULL)
97 #define OBD_MD_FLXATTRLS     (0x0000002000000000ULL)
98 #define OBD_MD_FLXATTRRM     (0x0000004000000000ULL)
99 #define OBD_MD_FLACL         (0x0000008000000000ULL)
100 #define OBD_MD_FLRMTPERM     (0x0000010000000000ULL)
101 #define OBD_MD_FLMDSCAPA     (0x0000020000000000ULL)
102 #define OBD_MD_FLOSSCAPA     (0x0000040000000000ULL)
103 #define OBD_MD_FLCKSPLIT     (0x0000080000000000ULL)
104 #define OBD_MD_FLCROSSREF    (0x0000100000000000ULL)
105 #define OBD_MD_FLGETATTRLOCK (0x0000200000000000ULL)
106 #define OBD_MD_FLOBJCOUNT    (0x0000400000000000ULL)
107 #define OBD_MD_FLRMTLSETFACL (0x0001000000000000ULL)
108 #define OBD_MD_FLRMTLGETFACL (0x0002000000000000ULL)
109 #define OBD_MD_FLRMTRSETFACL (0x0004000000000000ULL)
110 #define OBD_MD_FLRMTRGETFACL (0x0008000000000000ULL)
111 #define OBD_MD_FLDATAVERSION (0x0010000000000000ULL)
112 #define OBD_MD_FLRELEASED    (0x0020000000000000ULL)
113 #define OBD_MD_DEFAULT_MEA   (0x0040000000000000ULL)
114 ----
115
116 The two fields here that are specific to the 'ost_body' case are the
117 'o_oi' and the 'o_stripe_idx', which give the identity of the OST and
118 the stripe index assigned to it.