Whamcloud - gitweb
LUDOC-297 protocol: Update protocol document
[doc/protocol.git] / ost_statfs.txt
index dda2a61..8af2b77 100644 (file)
@@ -2,12 +2,45 @@ RPC 13: OST_STATFS
 ~~~~~~~~~~~~~~~~~~
 [[ost-statfs-rpc]]
 
-OST_STATFS ('pb_opc' = 13) is an RPC that queries data about the
-underlying file system for a given OST. It's form and use are nearly
-identical to the MDS_STATFS RPC. Refer to <<mds-statfs-rpc>> for
-details. The only differences in OST_STATFS are that it has a distinct
-'pb_opc' value, it carries information about an OST (instead of an
-MDT).  The MDT may send regular OST_STATFS RPCs to each OST in order
-to keep its information about free space and utilization updated.
-That allows the MDS to make more optimal file allocation decisions.
+OST_STATFS is an RPC that queries data about the underlying file
+system for a given OST.
+
+The OST_STATFS request message is a so-called "empty" message in that
+it only has a buffer for the 'ptlrpc_body' with the 'pb_opc' value
+OST_STATFS (13).
+
+The reply message conveys 'statfs' data when it succeeds, and an error
+code if it doesn't.
+
+.OST_STATFS Request Packet Structure
+image::ost-statfs-request.png["OST_STATFS Request Packet Structure",height=50]
+
+//////////////////////////////////////////////////////////////////////
+The ost-statfs-request.png diagram resembles this text art:
+
+       OST_STATFS:
+      --request------
+      | ptlrpc_body |
+      ---------------
+//////////////////////////////////////////////////////////////////////
+
+'ptlrpc_body'::
+RPC descriptor. See <<struct-ptlrpc-body>>.
+
+.OST_STATFS Reply Packet Structure
+image::ost-statfs-reply.png["OST_STATFS Reply Packet Structure",height=50]
+
+//////////////////////////////////////////////////////////////////////
+The ost-statfs-reply.png diagram resembles this text art:
+
+       OST_STATFS:
+      --reply---------------------
+      | ptlrpc_body | obd_statfs |
+      ----------------------------
+//////////////////////////////////////////////////////////////////////
+
+'ptlrpc_body'::
+RPC descriptor. See <<struct-ptlrpc-body>>.
+
+include::struct_obd_statfs.txt[]