Whamcloud - gitweb
a91c303fd1f2868ce95da079aee2cde53c5a4105
[doc/protocol.git] / ost_setattr.txt
1 RPC 2: OST_SETATTR
2 ~~~~~~~~~~~~~~~~~~
3 [[ost-setattr-rpc]]
4
5 OST_SETATTR (pb_opc = 2) is an RPC that sets resource attributes.
6
7 .OST_SETATTR Request Packet Structure
8 image::ost-setattr-request.png["OST_SETATTR Request Packet Structure",height=50]
9
10 //////////////////////////////////////////////////////////////////////
11 The ost-setattr-request.png diagram resembles this text art:
12
13        OST_SETATTR:
14       --request-----------------
15       | ptlrpc_body | ost_body |
16       --------------------------
17 //////////////////////////////////////////////////////////////////////
18
19 include::struct_ptlrpc_body.txt[]
20
21 [NOTE]
22 The RPC descriptor just described is the first buffer in the
23 OST_SETATTR request message. It will also appear as the first buffer
24 of every other RPC request or reply sent between entities. Refer back
25 to the above discussion when examining other RPC messages. The next
26 section describes the 'struct ost_body' which is the second (and
27 final) buffer in an OST_SETATTR request message.
28
29 include::struct_ost_body.txt[]
30
31 The above discussion described the structure of the OST_SETATTR
32 request message. In this case the reply message sturcture looks much
33 the same. It uses the same to buffers, and oly changes their contents
34 to reflect that the message is a reply rather than a requsest.
35
36 .OST_SETATTR Reply Packet Structure
37 image::ost-setattr-reply.png["OST_SETATTR Reply Packet Structure",height=50]
38
39 //////////////////////////////////////////////////////////////////////
40 The ost-setattr-reply.png diagram resembles this text art:
41
42        OST_SETATTR:
43       --reply-------------------
44       | ptlrpc_body | ost_body |
45       --------------------------
46 //////////////////////////////////////////////////////////////////////
47
48 'ptlrpc_body'::
49 The RPC descriptor. See <<struct-ptlrpc-body>>.
50
51 'ost_body'::
52 Metadata about the resource. See <<struct-ost-body>>.
53