Whamcloud - gitweb
LUDOC-276 protocol: Document RPCs for setattr
[doc/protocol.git] / lov_mds_md.txt
diff --git a/lov_mds_md.txt b/lov_mds_md.txt
new file mode 100644 (file)
index 0000000..5d5f2f2
--- /dev/null
@@ -0,0 +1,47 @@
+MDS Lock Value Block
+^^^^^^^^^^^^^^^^^^^^
+[[struct-lov-mds-md]]
+
+The 'lov_mds_md' structure is a Lock Value Block (LVB) for layout
+locks. In replies to lock requests and other situations requiring
+layout information from an MDT the 'lov_mds_md' information provides
+details about the layout of a file across the OSTs.
+
+----
+struct lov_mds_md {
+       __u32 lmm_magic;
+       __u32 lmm_pattern;
+       struct ost_id   lmm_oi;
+       __u32 lmm_stripe_size;
+       __u16 lmm_stripe_count;
+       __u16 lmm_layout_gen;
+       struct lov_ost_data_v1 lmm_objects[0];
+};
+----
+
+The 'lmm_magic' field is filled in with the value LOV_MAGIC
+(0x0BD10BD0) when the structure is in use. If the structure is in a
+buffer of an RPC without the magic number in place, then the rest of
+the structure is ignored. 
+
+The 'lmm_pattern' field is only ever set to LOV_PATTERN_RAID0
+(0x001). 
+
+The 'lmm_oi' field gives the LOV object ID for the first OST of the
+layout. This is the OST where striping will begin.
+
+The 'lmm_stripe_size' field give the stripe size for the object. This
+is how many bytes will be on a particular OST before going to the next
+stripe. 
+
+The 'lmm_stripe_count' field gives how many OSTs the file is striped
+over.
+
+The 'lmm_layout_gen' field ges updated as the layout of the obeject is
+updated. This way out-of-date references to the layout can be
+recognized. 
+
+The 'lmm_objects' array gives per-stripe data for more complex
+(non-uniform) layouts.
+
+