--- /dev/null
+Generic MDS_REINT
+^^^^^^^^^^^^^^^^^
+[[struct-mdt-rec-reint]]
+
+An 'mdt_rec_reint' structure specifies the generic form for MDS_REINT
+requests. Each sub-operation, as defned by the 'rr_opcode' field, has
+its own variant of this structure. Each variant has the same size as
+the generic 'mdt_rec_reint', but interprets its fields slightly
+differently. Note that in order for swabbing to take place correctly
+the sequence of field sizes must the same in every variant as it is in
+the generic version (not just the overal size of the sturcture).
+
+[source,c]
+----
+struct mdt_rec_reint {
+ __u32 rr_opcode;
+ __u32 rr_cap;
+ __u32 rr_fsuid;
+ __u32 rr_fsuid_h;
+ __u32 rr_fsgid;
+ __u32 rr_fsgid_h;
+ __u32 rr_suppgid1;
+ __u32 rr_suppgid1_h;
+ __u32 rr_suppgid2;
+ __u32 rr_suppgid2_h;
+ struct lu_fid rr_fid1;
+ struct lu_fid rr_fid2;
+ __u64 rr_mtime;
+ __u64 rr_atime;
+ __u64 rr_ctime;
+ __u64 rr_size;
+ __u64 rr_blocks;
+ __u32 rr_bias;
+ __u32 rr_mode;
+ __u32 rr_flags;
+ __u32 rr_flags_h;
+ __u32 rr_umask;
+ __u32 rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */
+};
+----
+
+The 'rr_opcode' field defines one among the several sub-commands for
+MDS REINT RPCs. Those opcodes are:
+
+[source,c]
+----
+typedef enum {
+ REINT_SETATTR = 1,
+ REINT_CREATE = 2,
+ REINT_LINK = 3,
+ REINT_UNLINK = 4,
+ REINT_RENAME = 5,
+ REINT_OPEN = 6,
+ REINT_SETXATTR = 7,
+} mds_reint_t;
+----
+
+Based on that opcode one of the variants of the structure will
+actually be used. See <<mds-reint-setattr-rpc>> for one example.
+
+The 'rr_cap' field is not used (and has been dropped in more recent
+code updates).
+
+The 'rr_fsuid' field gives the UID of the file system mount point.
+
+The 'rr_fsuid_h' field gives the high bytes of a the file system mount
+point UID in an environment where UIDs are 64-bit. The same holds for
+the other '_h' fields.
+
+The 'rr_fsgid' field gives the GID of the file system mount point.
+For each opcode there is a variant of the 'mdt_rec_reint' that has
+identical byte fields, but slightly modified semantics. The following
+is for the REINT_SETATTR sub-operation.
+
+The 'rr_suppgid1' and 'rr_suppgid2' fields are supplementary GID
+information for kernels that have it.
+
+The 'rr_fid1' and 'rr_fid2' fields specify the file IDs for the
+resources being operated upon. If only one resource is being acted
+upon then 'rr_fid2' is not used.
+
+The 'rr_mtime' 'rr_atime' and 'rr_ctime' fields give the object
+timestamps in seconds for the last modification time, the last
+access time, and the last metadata change time, respectively.
+
+The 'rr_size' field gives the value of the size attribute.
+
+The 'rr_blocks' field gives the value of the number-of-blocks
+attribute.
+
+The 'rr_bias' field adds additional optional information to the
+REINT. The possible values are:
+
+[source,c]
+----
+enum mds_op_bias {
+ MDS_CHECK_SPLIT = 1 << 0,
+ MDS_CROSS_REF = 1 << 1,
+ MDS_VTX_BYPASS = 1 << 2,
+ MDS_PERM_BYPASS = 1 << 3,
+ MDS_SOM = 1 << 4,
+ MDS_QUOTA_IGNORE = 1 << 5,
+ MDS_KEEP_ORPHAN = 1 << 7,
+ MDS_RECOV_OPEN = 1 << 8,
+ MDS_DATA_MODIFIED = 1 << 9,
+ MDS_CREATE_VOLATILE = 1 << 10,
+ MDS_OWNEROVERRIDE = 1 << 11,
+ MDS_HSM_RELEASE = 1 << 12,
+};
+----
+
+For example, MDS_DATA_MODIFIED signals to the HSM system that the MDT
+should set the corresponding HSM extended attribute. We'll return to
+this topic with more details about the individual flags at a later
+date.
+
+The 'rr_mode' field gives the value of the mode attribute.
+
+The 'rr_flags' and 'rr_flags_h' fields give the value (and the high
+order bytes of the value, respectively, if there are high order bytes)
+of the flags attribute.
+
+The 'rr_umask' gives the value of the 'umask' to apply in, for
+example, a REINT_CREATE.