Whamcloud - gitweb
8d9801b5b6f2337129acb32ddb2b0580398b789c
[doc/protocol.git] / mds_reint.txt
1 Command 36: MDS_REINT
2 ~~~~~~~~~~~~~~~~~~~~~
3 [[mds-reint-rpm]]
4
5 An RPC that implements an operation that will change the information
6 on an MDT. There are a variety of operations all gathered under the
7 MDS_REINT 'opcode'.
8
9 ----
10 typedef enum {
11         REINT_SETATTR  = 1,
12         REINT_CREATE   = 2,
13         REINT_LINK     = 3,
14         REINT_UNLINK   = 4,
15         REINT_RENAME   = 5,
16         REINT_OPEN     = 6,
17         REINT_SETXATTR = 7,
18         REINT_RMENTRY  = 8,
19         REINT_MIGRATE  = 9,
20         REINT_MAX
21 } mds_reint_t, mdt_reint_t;
22 ----
23
24 REINT_SETATTR
25 ^^^^^^^^^^^^^
26 [[mds-reint-setattr-rpc]]
27
28 An RPC that implements the 'setattr' sub-command of the MDS_REINT.
29
30 .MDS_REINT:REINT_SETATTR Generic Packet Structure
31 image::mds-reint-setattr-generic.png["MDS_REINT:REINT_SETATTR Generic Packet Structure",height=100]
32
33 //////////////////////////////////////////////////////////////////////
34 The mds-reint-setattr-generic.png diagram resembles this text art:
35
36         MDS_REINT:
37       --REINT_SETATTR-request-------------------------------------
38       | ptlrpc_body | mdt_rec_setattr | lustre_capa | mdt_ioepoc |
39         eadata | llog_cookie | ldlm_request |
40       ------------------------------------------------------------
41
42       --REINT_SETATTR-reply----------------------------------
43       | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa |
44         lustre_capa |
45       -------------------------------------------------------
46 //////////////////////////////////////////////////////////////////////
47
48 The second buffer ('mdt_rec_setattr' in the above) is one of the
49 variants specific to the particular REINT as given by the
50 'mdt_reint_t' opcode. Each such variant has the same number and size
51 of fields, but how the fields are interpreted varies slightly between
52 variiants. For all the variant structures refer to
53 <<mds-reint-structs>>.
54
55 REINT_SETXATTR
56 ^^^^^^^^^^^^^^
57 [[mds-reint-setxattr-rpc]]
58
59 An RPC that implements the 'setxattr' sub-command of the MDS_REINT.
60
61 .MDS_REINT:REINT_SETXATTR Generic Packet Structure
62 image::mds-reint-setxattr-generic.png["MDS_REINT:REINT_SETXATTR Generic Packet Structure",height=100]
63
64 //////////////////////////////////////////////////////////////////////
65 The mds-reint-setxattr-generic.png diagram resembles this text art:
66
67         MDS_REINT:
68       --REINT_SETXATTR-request-------------------------------------
69       | ptlrpc_body | mdt_rec_setxattr | lustre_capa | mdt_ioepoc |
70         eadata | llog_cookie | ldlm_request |
71       -------------------------------------------------------------
72
73       --REINT_SETXATTR-reply---------------------------------
74       | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa |
75         lustre_capa |
76       -------------------------------------------------------
77 //////////////////////////////////////////////////////////////////////
78
79 'ptlrpc_body'::
80 RPC descriptor.
81
82 'mdt_rec_setattr'::
83 Information pertinent to setting attributes on the MDT.
84
85 'mdt_rec_setxattr'::
86 Information pertinent to setting extended attributes on the MDT.
87
88 'lustre_capa'::
89 So called "capabilities" structure. This is deprecated in recent
90 versions of Lustre, and commonly appears in the packet header as a zero
91 length buffer.
92
93 'mdt_ioepoch'::
94 Identifying "epoch" information. This buffer is optional and will
95 appear as zero length in some packets.
96
97 'eadata'::
98 Information about extended attributes. This buffer is optional and will
99 appear as zero length in some packets.
100
101 'llog_cookie'::
102 A log handle.  This buffer is optional and will appear as zero length
103 in some packets.
104
105 'ldlm_request'::
106 A structure specifying a lock that can be the subject of early lock
107 cancellation. See <<early-lock-cancellation>>.
108
109 'mdt_body'::
110 Metadata about the resource.
111
112 'mdt_md'::
113 Layout data for the resource. This buffer is optional and will appear
114 as zero length in some packets.
115
116 'acl'::
117 Access control list data. This buffer is optional and will appear as
118 zero length in some packets.
119