Whamcloud - gitweb
16a6cec48fef220250c0ec1993fd25cf97df13bc
[doc/protocol.git] / ost_statfs.txt
1 RPC 13: OST_STATFS
2 ~~~~~~~~~~~~~~~~~~
3 [[ost-statfs-rpc]]
4
5 OST_STATFS is an RPC that queries data about the underlying file
6 system for a given OST.
7
8 The OST_STATFS request message is a so-called "empty" message in that
9 it only has a buffer for the 'ptlrpc_body' with the 'pb_opc' value
10 OST_STATFS (13).
11
12 The reply message conveys 'statfs' data when it succeeds, and an error
13 code if it doesn't.
14
15 .OST_STATFS Generic Packet Structure
16 image::ost-statfs-generic.png["OST_STATFS Generic Packet Structure",height=100]
17
18 //////////////////////////////////////////////////////////////////////
19 The ost-statfs-generic.png diagram resembles this text art:
20
21        OST_STATFS:
22       --request------
23       | ptlrpc_body |
24       ---------------
25       --reply---------------------
26       | ptlrpc_body | obd_statfs |
27       ----------------------------
28 //////////////////////////////////////////////////////////////////////
29
30 'ptlrpc_body':: RPC descriptor. Only the 'pb_opc' value (OST_STATFS =
31 41) is directly relevant to the OST_STATFS request message. The rest
32 of the 'ptlrpc_body' fields handle generic information about the
33 RPC, as discussed in <<struct-ptlrpc-body>>, including generic error
34 conditions. In a normal reply ('pb_type' = PTL_RPC_MSG_REPLY) the
35 'pb_status' field is 0.  The one error that can be returned in
36 'pb_status' that is speficially from OST_STATFS' handling is -ENOMEM,
37 which occurs if there is not enough memory to allocate a temporary
38 buffer for the 'statfs' data.
39
40 include::struct_obd_statfs.txt[]
41