Whamcloud - gitweb
LUDOC 299 protocol: Spell-check document
[doc/protocol.git] / struct_mdt_rec_reint.txt
1 Generic MDS_REINT
2 ^^^^^^^^^^^^^^^^^
3 [[struct-mdt-rec-reint]]
4
5 An 'mdt_rec_reint' structure specifies the generic form for MDS_REINT
6 requests. Each sub-operation, as defined by the 'rr_opcode' field, has
7 its own variant of this structure. Each variant has the same size as
8 the generic 'mdt_rec_reint', but interprets its fields slightly
9 differently.  Note that in order for swabbing to take place correctly
10 the sequence of field sizes must the same in every variant as it is in
11 the generic version (not just the overall size of the structure).
12
13 [source,c]
14 ----
15 struct mdt_rec_reint {
16         __u32           rr_opcode;
17         __u32           rr_cap;
18         __u32           rr_fsuid;
19         __u32           rr_fsuid_h;
20         __u32           rr_fsgid;
21         __u32           rr_fsgid_h;
22         __u32           rr_suppgid1;
23         __u32           rr_suppgid1_h;
24         __u32           rr_suppgid2;
25         __u32           rr_suppgid2_h;
26         struct lu_fid   rr_fid1;
27         struct lu_fid   rr_fid2;
28         __u64           rr_mtime;
29         __u64           rr_atime;
30         __u64           rr_ctime;
31         __u64           rr_size;
32         __u64           rr_blocks;
33         __u32           rr_bias;
34         __u32           rr_mode;
35         __u32           rr_flags;
36         __u32           rr_flags_h;
37         __u32           rr_umask;
38         __u32           rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */
39 };
40 ----
41
42 The 'rr_opcode' field defines one among the several sub-commands for
43 MDS REINT RPCs. See the list above.  Based on that opcode one of the
44 variants of the structure will actually be used. See
45 <<mds-reint-setattr-rpc>> for one example.
46
47 The 'rr_cap' field is not used (and has been dropped in more recent
48 code updates).
49
50 The 'rr_fsuid' field gives the UID of the file system mount point.
51
52 The 'rr_fsuid_h' field gives the high bytes of a the file system mount
53 point UID in an environment where UIDs are 64-bit. The same holds for
54 the other '_h' fields.
55
56 The 'rr_fsgid' field gives the GID of the file system mount point.
57
58 The 'rr_suppgid1' and 'rr_suppgid2' fields are supplementary GID
59 information for kernels that have it.
60
61 The 'rr_fid1' and 'rr_fid2' fields specify the FIDs (See
62 <<struct-lu-fid>>) for the resources being operated upon. If only one
63 resource is being acted upon then 'rr_fid2' is not used.
64
65 The 'rr_mtime', 'rr_atime', and 'rr_ctime' fields give the object
66 timestamps in microseconds for the last modification time, the last
67 access time, and the last metadata change time, respectively.
68
69 The 'rr_size' field gives the value of the size attribute.
70
71 The 'rr_blocks' field gives the value of the number-of-blocks
72 attribute.
73
74 The 'rr_bias' field adds additional optional information to the
75 REINT. The possible values are:
76
77 .MDS Operation Bias
78 ****
79 [source,c]
80 ----
81 enum mds_op_bias {
82         MDS_CHECK_SPLIT         = 1 << 0,
83         MDS_CROSS_REF           = 1 << 1,
84         MDS_VTX_BYPASS          = 1 << 2,
85         MDS_PERM_BYPASS         = 1 << 3,
86         MDS_SOM                 = 1 << 4,
87         MDS_QUOTA_IGNORE        = 1 << 5,
88         MDS_KEEP_ORPHAN         = 1 << 7,
89         MDS_RECOV_OPEN          = 1 << 8,
90         MDS_DATA_MODIFIED       = 1 << 9,
91         MDS_CREATE_VOLATILE     = 1 << 10,
92         MDS_OWNEROVERRIDE       = 1 << 11,
93         MDS_HSM_RELEASE         = 1 << 12,
94 };
95 ----
96 ****
97
98 For example, MDS_DATA_MODIFIED signals to the HSM system that the MDT
99 should set the corresponding HSM extended attribute. We'll return to
100 this topic with more details about the individual flags at a later
101 date.
102
103 The 'rr_mode' field gives the value of the mode attribute.
104
105 The 'rr_flags' and 'rr_flags_h' fields give the value (and the high
106 order bytes of the value, respectively, if there are high order bytes)
107 of the flags attribute.
108
109 The 'rr_umask' gives the value of the 'umask' to apply in, for
110 example, a REINT_CREATE.