Generic MDS_REINT ^^^^^^^^^^^^^^^^^ [[struct-mdt-rec-reint]] An 'mdt_rec_reint' structure specifies the generic form for MDS_REINT requests. Each sub-operation, as defined 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 overall size of the structure). [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. See the list above. Based on that opcode one of the variants of the structure will actually be used. See <> 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. 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 FIDs (See <>) 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 microseconds 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: .MDS Operation Bias **** [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.