Whamcloud - gitweb
LU-8307 ldlm: cond_resched in ldlm_bl_thread_main
[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_NEXT :
25 The next component after the current one.
26 .PP
27 .BR LLAPI_LAYOUT_COMP_USE_LAST :
28 The last component of the layout.
29 .SH RETURN VALUES
30 Return 0 on success, and 1 when there is no next component. Otherwise,
31 if an error occurred -1 is returned and
32 .I errno
33 is set appropriately.
34 .SH ERRORS
35 .TP 15
36 .SM EINVAL
37 An invalid argument was specified.
38 .TP 15
39 .SM ENOENT
40 No such component ID exists.
41 .SH "SEE ALSO"
42 .BR llapi_layout_alloc (3),
43 .BR llapi_layout_file_open (3),
44 .BR llapi_layout_comp_del (3),
45 .BR llapi_layout_comp_use_id (3),
46 .BR llapi_layout (7),
47 .BR lustreapi (7)