Whamcloud - gitweb
ce489814a040e6edea7b575afb9a24a28560ec0f
[doc/protocol.git] / mds_reint.txt
1 RPC 36: MDS_REINT
2 ~~~~~~~~~~~~~~~~~
3 [[mds-reint-rpc]]
4
5 An RPC that implements an operation that will change the state of
6 an object on an MDT. There are a variety of operations all gathered
7 under the 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 include::struct_mdt_rec_reint.txt[]
25
26 REINT_SETATTR RPC
27 ^^^^^^^^^^^^^^^^^
28 [[mds-reint-setattr-rpc]]
29
30 An RPC that implements the 'setattr' sub-command of the MDS_REINT.
31
32 .MDS_REINT:REINT_SETATTR Generic Packet Structure
33 image::mds-reint-setattr-generic.png["MDS_REINT:REINT_SETATTR Generic Packet Structure",height=100]
34
35 //////////////////////////////////////////////////////////////////////
36 The mds-reint-setattr-generic.png diagram resembles this text art:
37
38         MDS_REINT:
39       --REINT_SETATTR-request-------------------------------------
40       | ptlrpc_body | mdt_rec_setattr | lustre_capa | mdt_ioepoc |
41         eadata | llog_cookie | ldlm_request |
42       ------------------------------------------------------------
43
44       --REINT_SETATTR-reply----------------------------------
45       | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa |
46         lustre_capa |
47       -------------------------------------------------------
48 //////////////////////////////////////////////////////////////////////
49
50 REINT_SETXATTR RPC
51 ^^^^^^^^^^^^^^^^^^
52 [[mds-reint-setxattr-rpc]]
53
54 An RPC that implements the 'setxattr' sub-command of the MDS_REINT.
55
56 .MDS_REINT:REINT_SETXATTR Generic Packet Structure
57 image::mds-reint-setxattr-generic.png["MDS_REINT:REINT_SETXATTR Generic Packet Structure",height=100]
58
59 //////////////////////////////////////////////////////////////////////
60 The mds-reint-setxattr-generic.png diagram resembles this text art:
61
62         MDS_REINT:
63       --REINT_SETXATTR-request-------------------------------------
64       | ptlrpc_body | mdt_rec_setxattr | lustre_capa | mdt_ioepoc |
65         eadata | llog_cookie | ldlm_request |
66       -------------------------------------------------------------
67
68       --REINT_SETXATTR-reply---------------------------------
69       | ptlrpc_body | mdt_body | mdt_md | acl | lustre_capa |
70         lustre_capa |
71       -------------------------------------------------------
72 //////////////////////////////////////////////////////////////////////
73
74 'ptlrpc_body'::
75 RPC descriptor.
76
77 include::struct_mdt_rec_setattr.txt[]
78
79 include::struct_mdt_rec_setxattr.txt[]
80
81 'lustre_capa'::
82 So called "capabilities" structure. This is deprecated in recent
83 versions of Lustre, and commonly appears in the packet header as a zero
84 length buffer.
85
86 'mdt_ioepoch'::
87 Identifying "epoch" information. This buffer is optional and will
88 appear as zero length in some packets.
89
90 'eadata'::
91 Information about extended attributes. This buffer is optional and will
92 appear as zero length in some packets.
93
94 'llog_cookie'::
95 A log handle.  This buffer is optional and will appear as zero length
96 in some packets.
97
98 'ldlm_request'::
99 A structure specifying a lock that can be the subject of early lock
100 cancellation. See <<early-lock-cancellation>>.
101
102 'mdt_body'::
103 Metadata about the resource.
104
105 'mdt_md'::
106 Layout data for the resource. This buffer is optional and will appear
107 as zero length in some packets.
108
109 'acl'::
110 Access control list data. This buffer is optional and will appear as
111 zero length in some packets.
112