Whamcloud - gitweb
LUDOC-296 protocol: remove internal details from descriptions
[doc/protocol.git] / struct_layout_intent.txt
1 Layout Intent
2 ^^^^^^^^^^^^^
3 [[struct-layout-intent]]
4
5 An LDLM_ENQUEUE RPC with a layout intent uses the 'layout_intent'
6 structure to specify the desired use for the layout.
7
8 [source,c]
9 ----
10 struct layout_intent {
11         __u32 li_opc;
12         __u32 li_flags;
13         __u64 li_start;
14         __u64 li_end;
15 };
16 ----
17
18 The uses for the layout that the 'li_opc' field can specify are:
19
20 [source,c]
21 ----
22 enum {
23         LAYOUT_INTENT_ACCESS    = 0,
24         LAYOUT_INTENT_READ      = 1,
25         LAYOUT_INTENT_WRITE     = 2,
26         LAYOUT_INTENT_GLIMPSE   = 3,
27         LAYOUT_INTENT_TRUNC     = 4,
28         LAYOUT_INTENT_RELEASE   = 5,
29         LAYOUT_INTENT_RESTORE   = 6
30 };
31 ----
32
33 The other fields - 'li_flags', 'li_start', and 'li_end' - are reserved for
34 future use.