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