Whamcloud - gitweb
LUDOC-296 protocol: Rearrange presentation to be more top-down
[doc/protocol.git] / struct_mgs_config_body.txt
diff --git a/struct_mgs_config_body.txt b/struct_mgs_config_body.txt
new file mode 100644 (file)
index 0000000..ef03485
--- /dev/null
@@ -0,0 +1,40 @@
+MGS Configuration Data
+^^^^^^^^^^^^^^^^^^^^^^
+
+[source,c]
+----
+#define MTI_NAME_MAXLEN  64
+struct mgs_config_body {
+        char     mcb_name[MTI_NAME_MAXLEN]; /* logname */
+        __u64    mcb_offset;    /* next index of config log to request */
+        __u16    mcb_type;      /* type of log: CONFIG_T_[CONFIG|RECOVER] */
+        __u8     mcb_reserved;
+        __u8     mcb_bits;      /* bits unit size of config log */
+        __u32    mcb_units;     /* # of units for bulk transfer */
+};
+----
+
+The 'mgs_config_body' structure has information identifying to the MGS
+which Lustre file system the client is requesting configuration information
+from.  'mcb_name' contains the filesystem name (fsname).  'mcb_offset'
+contains the next record number in the configuration llog to process
+(see <<llog>> for details), not the byte offset or bulk transfer units.
+'mcb_bits' is the log2 of the units of minimum bulk transfer size,
+typically 4096 or 8192 bytes, while 'mcb_units' is the maximum number of
+2^mcb_bits sized units that can be transferred in a single request.
+
+[source,c]
+----
+struct mgs_config_res {
+        __u64    mcr_offset;    /* index of last config log */
+        __u64    mcr_size;      /* size of the log */
+};
+----
+
+The 'mgs_config_res' structure returns information describing the
+replied configuration llog data requested in 'mgs_config_body'.
+'mcr_offset' contains the last configuration record number returned
+by this reply.  'mcr_size' contains the maximum record index in the
+entire configuration llog.  When 'mcr_offset' equals 'mcr_size' there
+are no more records to process in the log.
+