Whamcloud - gitweb
LUDOC-296 protocol: Reorganize the document ot be top-down
[doc/protocol.git] / mds_statfs.txt
1 RPC 41: MDS_STATFS
2 ~~~~~~~~~~~~~~~~~~
3 [[mds-statfs-rpc]]
4
5 MDS_STATFS is an RPC that queries data about the underlying file
6 system for a given MDT. It is generated in response to an explicit
7 call for 'statfs' information from the VFS via the 'statfs(2)'
8 function.
9
10 The MDS_STATFS request message is a so-called "empty" message in that
11 it only has a buffer for the 'ptlrpc_body' with the 'pb_opc' value
12 MDS_STATFS (41).
13
14 The reply message conveys 'statfs' data when it succeeds, and an error
15 code if it doesn't.
16
17 .MDS_STATFS Generic Packet Structure
18
19 :frame: none
20 :grid: none
21 [width="50%", cols="2a"]
22 |====
23 | request
24 [cols="1"]
25 !===================
26 ! <<struct-ptlrpc-body,ptlrpc_body>> !
27 !===================
28 | reply
29 [cols="2"]
30 !===================
31 ! <<struct-ptlrpc-body,ptlrpc_body>> ! <<struct-obd_statfs,obd_statfs>> !
32 !===================
33 |====
34
35 'ptlrpc_body':: RPC descriptor. Only the 'pb_opc' value (MDS_STATFS =
36 41) is directly relevant to the MDS_STATFS request message. The rest
37 of the 'ptlrpc_body' fields handle generic information about the
38 RPC, as discussed in <<struct-ptlrpc-body>>, including  generic error
39 conditions. In a normal reply ('pb_type' = PTL_RPC_MSG_REPLY) the
40 'pb_status' field is 0.  The one error that can be returned in
41 'pb_status' that is speficially from OST_STATFS' handling is -ENOMEM,
42 which occurs if there is not enough memory to allocate a temporary
43 buffer for the 'statfs' data.
44
45 'obd_statfs'::
46 File system wide statistics corresponding to 'struct statfs' as well
47 as Lustre-specific information. See <<struct-obd-statfs>> for a
48 detailed discussion.