Whamcloud - gitweb
LU-8998 docs: add llapi_ man pages to Makefile.am
[fs/lustre-release.git] / lustre / doc / llapi_layout_pattern_get.3
1 .TH llapi_layout_pattern_get 3 "2013 Oct 31" "Lustre User API"
2 .SH NAME
3 llapi_layout_pattern_get, llapi_layout_pattern_set \- get or set the
4 RAID striping pattern of a Lustre file
5 .SH SYNOPSIS
6 .nf
7 .B #include <lustre/lustreapi.h>
8 .PP
9 .BI "int llapi_layout_pattern_get(const struct llapi_layout *" layout ", uint64_t *" pattern );
10 .PP
11 .BI "int llapi_layout_pattern_set(struct llapi_layout *" layout ", uint64_t " pattern );
12 .fi
13 .SH DESCRIPTION
14 .PP
15 .B llapi_layout_pattern_get()
16 stores into
17 .I pattern
18 the RAID striping pattern used by layout
19 .IR layout .
20 .PP
21 .B llapi_layout_pattern_set()
22 sets the RAID striping pattern of
23 .I layout
24 to
25 .IR pattern .
26 Currently the only supported RAID pattern is RAID0.  If
27 .I pattern
28 is not a supported RAID pattern the return value will be -1 and errno will
29 be set to
30 .BR EOPNOTSUPP .
31 .PP
32 A
33 .I pattern
34 value of
35 .B LLAPI_LAYOUT_DEFAULT
36 means that the filesystem default RAID pattern will be used.
37 .PP
38 A
39 .I pattern
40 value of
41 .B LLAPI_LAYOUT_RAID0
42 means that the RAID0 pattern will be used.
43 .SH RETURN VALUES
44 .LP
45 .B llapi_layout_pattern_get()
46 and
47 .B llapi_layout_pattern_set()
48 return 0 on success, or -1 if an error occurred (in which case, errno is
49 set appropriately).
50 .SH ERRORS
51 .TP 15
52 .SM EINVAL
53 An invalid argument was specified.
54 .TP 15
55 .SM EOPNOTSUPP
56 An unsupported RAID pattern was specified.
57 .SH "SEE ALSO"
58 .BR llapi_layout_alloc (3),
59 .BR llapi_layout_file_open (3),
60 .BR llapi_layout (7),
61 .BR lustreapi (7)