Whamcloud - gitweb
LUDOC-297 protocol: Update protocol document
[doc/protocol.git] / mds_statfs.txt
1 RPC 41: MDS_STATFS
2 ~~~~~~~~~~~~~~~~~~
3 [[mds-statfs-rpc]]
4
5 MDS_STATFS ('pb_opc' = 41) is an RPC that queries data about the
6 underlying file system for a given MDT. It's form and use are nearly
7 identical to the OST_STATFS RPC. Refer to <<ost-statfs-rpc>> for
8 details. The only differences in MDS_STATFS are that it has a distinct
9 'pb_opc' value and it carries information about an MDT (instead of an
10 OST).  An MDT will send regular OST_STATFS RPCs to each OST in order
11 to keep its information about free space and utilization updated.
12 That allows the MDS to make more optimal file allocation decisions.
13
14 .MDS_STATFS Request Packet Structure
15 image::mds-statfs-request.png["MDS_STATFS Request Packet Structure",height=50]
16
17 //////////////////////////////////////////////////////////////////////
18 The mds-statfs-request.png diagram resembles this text art:
19
20        MDS_STATFS:
21       --request------
22       | ptlrpc_body |
23       ---------------
24 //////////////////////////////////////////////////////////////////////
25
26 'ptlrpc_body':: RPC descriptor. See <<struct-ptlrpc-body>>.
27
28 .MDS_STATFS Reply Packet Structure
29 image::mds-statfs-reply.png["MDS_STATFS Reply Packet Structure",height=50]
30
31 //////////////////////////////////////////////////////////////////////
32 The mds-statfs-reply.png diagram resembles this text art:
33
34        MDS_STATFS:
35       --reply---------------------
36       | ptlrpc_body | obd_statfs |
37       ----------------------------
38 //////////////////////////////////////////////////////////////////////
39
40 'ptlrpc_body':: RPC descriptor. See <<struct-ptlrpc-body>>.
41
42 'obd_statfs':: Statfs information about the target. See
43 <<struct-obd-statfs>>.