X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=mds_reint.txt;h=6125e28b98a2092c5cec9e8ab0b3fc07cf9c5f13;hb=HEAD;hp=ce489814a040e6edea7b575afb9a24a28560ec0f;hpb=a35c4d03a85eaab5762e11b54ed982bb9f74e5cb;p=doc%2Fprotocol.git diff --git a/mds_reint.txt b/mds_reint.txt index ce48981..6125e28 100644 --- a/mds_reint.txt +++ b/mds_reint.txt @@ -2,10 +2,15 @@ RPC 36: MDS_REINT ~~~~~~~~~~~~~~~~~ [[mds-reint-rpc]] -An RPC that implements an operation that will change the state of -an object on an MDT. There are a variety of operations all gathered -under the MDS_REINT 'opcode'. - +An MDS_REINT RPC ('pb_opc' = 36) is one that implements an operation +that will change the state of an object on an MDT. There are a variety +of operations all gathered under the MDS_REINT 'opcode'. The possible +values for the 'mdt_rec_reint' struct's 'rr_opcode' field give types +of operations that are encoded as MDS_REINT RPCs: + +.MDS Reint Opcodes ('rr_opcode') +**** +[source,c] ---- typedef enum { REINT_SETATTR = 1, @@ -16,10 +21,10 @@ typedef enum { REINT_OPEN = 6, REINT_SETXATTR = 7, REINT_RMENTRY = 8, - REINT_MIGRATE = 9, - REINT_MAX -} mds_reint_t, mdt_reint_t; + REINT_MIGRATE = 9 +}; ---- +**** include::struct_mdt_rec_reint.txt[] @@ -27,25 +32,86 @@ REINT_SETATTR RPC ^^^^^^^^^^^^^^^^^ [[mds-reint-setattr-rpc]] -An RPC that implements the 'setattr' sub-command of the MDS_REINT. +The REINT_SETATTR is an RPC that implements the 'setattr' sub-command +of the MDS_REINT. -.MDS_REINT:REINT_SETATTR Generic Packet Structure -image::mds-reint-setattr-generic.png["MDS_REINT:REINT_SETATTR Generic Packet Structure",height=100] +.MDS_REINT:REINT_SETATTR Request Packet Structure +image::mds-reint-setattr-request.png["MDS_REINT:REINT_SETATTR Request Packet Structure",height=75] ////////////////////////////////////////////////////////////////////// -The mds-reint-setattr-generic.png diagram resembles this text art: +The mds-reint-setattr-request.png diagram resembles this text art: MDS_REINT: --REINT_SETATTR-request------------------------------------- | ptlrpc_body | mdt_rec_setattr | lustre_capa | mdt_ioepoc | - eadata | llog_cookie | ldlm_request | ------------------------------------------------------------ + | eadata | llog_cookie | ldlm_request | + --------------------------------------- +////////////////////////////////////////////////////////////////////// + +'ptlrpc_body':: +RPC descriptor. See <>. + +include::struct_mdt_rec_setattr.txt[] + +After the 'mdt_rec_setattr' there are several more buffers defined for +the RPC, but those before the 'ldlm_request' are often unused and +appear as zero-length buffers in the header. + +'lustre_capa':: +A "capabilities" structure. See <>. + +'mdt_ioepoch':: +Identifying "epoch" information. This buffer is optional and will +appear as zero length in some packets. + +'eadata':: +Information about extended attributes. This buffer is optional and will +appear as zero length in some packets. + +'llog_cookie':: +A log handle. This buffer is optional and will appear as zero length +in some packets. + +'ldlm_request':: +A structure specifying a lock that can be the subject of early lock +cancellation. See <>. + +.MDS_REINT:REINT_SETATTR Reply Packet Structure +image::mds-reint-setattr-reply.png["MDS_REINT:REINT_SETATTR Reply Packet Structure",height=50] - --REINT_SETATTR-reply---------------------------------- - | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa | - lustre_capa | - ------------------------------------------------------- ////////////////////////////////////////////////////////////////////// +The mds-reint-setattr-reply.png diagram resembles this text art: + + MDS_REINT: + --REINT_SETATTR-reply-------------------------------- + | ptlrpc_body | mdt_body | mdt_md | acl | fid1_capa | + ----------------------------------------------------- + | fid2_capa | + ------------- +////////////////////////////////////////////////////////////////////// + +'ptlrpc_body':: +RPC descriptor. See <>. + +'mdt_body':: +Metadata about the resource. + +'mdt_md':: +Layout data for the resource. This buffer is optional and will appear +as zero length in some packets. This needs to be further explained. + +'acl':: +Access control list data. This buffer is optional and will appear as +zero length in some packets. + +'fid1_capa':: +The capabilities structure for the first FID in the 'mdt_body'. See +<>. + +'fid2_capa':: +The capabilities structure for the second FID in the 'mdt_body'. See +<>. REINT_SETXATTR RPC ^^^^^^^^^^^^^^^^^^ @@ -53,35 +119,31 @@ REINT_SETXATTR RPC An RPC that implements the 'setxattr' sub-command of the MDS_REINT. -.MDS_REINT:REINT_SETXATTR Generic Packet Structure -image::mds-reint-setxattr-generic.png["MDS_REINT:REINT_SETXATTR Generic Packet Structure",height=100] +.MDS_REINT:REINT_SETXATTR Request Packet Structure +image::mds-reint-setxattr-request.png["MDS_REINT:REINT_SETXATTR Request Packet Structure",height=75] ////////////////////////////////////////////////////////////////////// -The mds-reint-setxattr-generic.png diagram resembles this text art: +The mds-reint-setxattr-request.png diagram resembles this text art: MDS_REINT: --REINT_SETXATTR-request------------------------------------- | ptlrpc_body | mdt_rec_setxattr | lustre_capa | mdt_ioepoc | - eadata | llog_cookie | ldlm_request | ------------------------------------------------------------- - - --REINT_SETXATTR-reply--------------------------------- - | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa | - lustre_capa | - ------------------------------------------------------- + | eadata | llog_cookie | ldlm_request | + --------------------------------------- ////////////////////////////////////////////////////////////////////// 'ptlrpc_body':: -RPC descriptor. - -include::struct_mdt_rec_setattr.txt[] +RPC descriptor. See <>. include::struct_mdt_rec_setxattr.txt[] +Returning to the remaining buffers in the REINT_SETXATTR RPC we again +have several optional buffers followed by the 'ldlm_request'. + 'lustre_capa':: -So called "capabilities" structure. This is deprecated in recent -versions of Lustre, and commonly appears in the packet header as a zero -length buffer. +A "capabilities" structure. See <>. This buffer is +optional and will appear as zero length in some packets. 'mdt_ioepoch':: Identifying "epoch" information. This buffer is optional and will @@ -99,6 +161,23 @@ in some packets. A structure specifying a lock that can be the subject of early lock cancellation. See <>. +.MDS_REINT:REINT_SETXATTR Reply Packet Structure +image::mds-reint-setxattr-reply.png["MDS_REINT:REINT_SETXATTR Reply Packet Structure",height=50] + +////////////////////////////////////////////////////////////////////// +The mds-reint-setxattr-reply.png diagram resembles this text art: + + MDS_REINT: + --REINT_SETXATTR-reply--------------------------------- + | ptlrpc_body | mdt_body | mdt_md | acl | fid1_capa | + ------------------------------------------------------- + | fid2_capa | + ------------- +////////////////////////////////////////////////////////////////////// + +'ptlrpc_body':: +RPC descriptor. See <>. + 'mdt_body':: Metadata about the resource. @@ -110,3 +189,11 @@ as zero length in some packets. Access control list data. This buffer is optional and will appear as zero length in some packets. +'fid1_capa':: +The capabilities structure for the first FID in the 'mdt_body'. See +<>. + +'fid2_capa':: +The capabilities structure for the second FID in the 'mdt_body'. See +<>. +