Whamcloud - gitweb
LUDOC-276 protocol: Document RPCs for setattr
[doc/protocol.git] / layout_intent.txt
diff --git a/layout_intent.txt b/layout_intent.txt
new file mode 100644 (file)
index 0000000..250cd54
--- /dev/null
@@ -0,0 +1,32 @@
+Layout Intent
+^^^^^^^^^^^^^
+[[struct-layout-intent]]
+
+An LDLM_ENQUEUE RPC with a layout intent uses the 'layout_intent'
+structure to specify the desired use for the layout.
+
+----
+struct layout_intent {
+       __u32 li_opc;
+       __u32 li_flags;
+       __u64 li_start;
+       __u64 li_end;
+};
+----
+
+The uses for the layout that the 'li_opc' field can specify are:
+
+----
+enum {
+        LAYOUT_INTENT_ACCESS    = 0,
+        LAYOUT_INTENT_READ      = 1,
+        LAYOUT_INTENT_WRITE     = 2,
+        LAYOUT_INTENT_GLIMPSE   = 3,
+        LAYOUT_INTENT_TRUNC     = 4,
+        LAYOUT_INTENT_RELEASE   = 5,
+        LAYOUT_INTENT_RESTORE   = 6
+};
+----
+
+The other fields - li_flags, li_start, adn li_end - are reserved for
+future use, but do not currently play arole.