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