Whamcloud - gitweb
LUDOC-296 protocol: Rearrange presentation to be more top-down
[doc/protocol.git] / struct_mdt_rec_setxattr.txt
1 REINT_SETXATTR Structure
2 ^^^^^^^^^^^^^^^^^^^^^^^^
3 [[struct-mdt-rec-setxattr]]
4
5 The variant of the 'mdt_rec_reint' for the 'setxattr' operation is:
6
7 [source,c]
8 ----
9 struct mdt_rec_setxattr {
10         __u32           sx_opcode;
11         __u32           sx_cap;
12         __u32           sx_fsuid;
13         __u32           sx_fsuid_h;
14         __u32           sx_fsgid;
15         __u32           sx_fsgid_h;
16         __u32           sx_suppgid1;
17         __u32           sx_suppgid1_h;
18         __u32           sx_suppgid2;
19         __u32           sx_suppgid2_h;
20         struct lu_fid   sx_fid;
21         __u64           sx_padding_1;
22         __u32           sx_padding_2;
23         __u32           sx_padding_3;
24         __u64           sx_valid;
25         __s64           sx_time;
26         __u64           sx_padding_5;
27         __u64           sx_padding_6;
28         __u64           sx_padding_7;
29         __u32           sx_size;
30         __u32           sx_flags;
31         __u32           sx_padding_8;
32         __u32           sx_padding_9;
33         __u32           sx_padding_10;
34         __u32           sx_padding_11;
35 };
36 ----
37
38 The 'setxattr' variant modifies the semantics of the generic REINT
39 fields as follows:
40
41 There is only one FID to be operated upon, and the 'sx_valid',
42 and the second 'struct lu_fid' is just "padding".
43
44 The 'sx_valid' field identifies which of the other fields in the
45 structure are to be honored. If the corresponding flag bit is not set
46 then the value of the corresponding field is to be ignored. The flag
47 values draw from the same set of definitions as
48 <<struct-mdt-rec-setattr>>.
49
50 .Flags for 'sx_valid' field of 'struct mdt_rec_setxattr'
51 [options="header"]
52 |====
53 | Flag                | Meaning
54 | OBD_MD_FLCTIME      | ctime attribute
55 |====
56
57 The 'sx_time' field is set to the 'ctime' value for the update and the
58 OBD_MD_FLCTIME value is used in the 'sx_valid' field to indicate the
59 value is to be honored. Fixme: The other flag values for 'sx_valid'
60 are not clear in the code, so I need to dig into them more
61 deeply. Similarly, the use and possible values for the 'sx_flags'
62 field are not obvious.
63