Whamcloud - gitweb
LU-11997 ptlrpc: Properly swab ll_fiemap_info_key
[fs/lustre-release.git] / lustre / doc / llapi_layout_comp_use.3
1 .TH llapi_layout_comp_use 3 "2017 Apr 7" "Lustre User API"
2 .SH NAME
3 llapi_layout_comp_use \- change current component to relative position
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_layout_comp_use(struct llapi_layout *" layout ",
9 .BI "                          enum llapi_layout_comp_use *" pos );
10 .fi
11 .SH DESCRIPTION
12 .PP
13 Changes the currently active component of
14 .I layout
15 to the relative position given by
16 .IR pos .
17 Possible values for
18 .I pos
19 are:
20 .PP
21 .BR LLAPI_LAYOUT_COMP_USE_FIRST :
22 The first component of the layout.
23 .PP
24 .BR LLAPI_LAYOUT_COMP_USE_LAST :
25 The last component of the layout.
26 .PP
27 .BR LLAPI_LAYOUT_COMP_USE_NEXT :
28 The next component after the current one.
29 .PP
30 .BR LLAPI_LAYOUT_COMP_USE_PREV :
31 The previous component before the current one.
32 .SH RETURN VALUES
33 Return 0 on success, and 1 when there is no next or previous component.
34 Otherwise, if an error occurred -1 is returned and
35 .I errno
36 is set appropriately.
37 .SH ERRORS
38 .TP 15
39 .SM EINVAL
40 An invalid argument was specified.
41 .TP 15
42 .SM ENOENT
43 No such component ID exists.
44 .SH "SEE ALSO"
45 .BR llapi_layout_alloc (3),
46 .BR llapi_layout_file_open (3),
47 .BR llapi_layout_comp_del (3),
48 .BR llapi_layout_comp_use_id (3),
49 .BR llapi_layout (7),
50 .BR lustreapi (7)