Whamcloud - gitweb
64aeb3129ae0c5176fc5a7e98685c696580c50d9
[fs/lustre-release.git] / lustre / doc / llapi_layout_comp_add.3
1 .TH llapi_layout_comp_add 3 "2015 Nov 4" "Lustre User API"
2 .SH NAME
3 llapi_layout_comp_add, llapi_layout_comp_del \- add or delete a layout
4 component into/from the layout.
5 .SH SYNOPSIS
6 .nf
7 .B #include <lustre/lustreapi.h>
8 .PP
9 .BI "int llapi_layout_comp_add(struct llapi_layout *" layout ",
10 .BI "                          struct llapi_layout *" comp );
11 .PP
12 .BI "int llapi_layout_comp_del(struct llapi_layout *" layout ",
13 .BI "                          struct llapi_layout *" comp );
14 .fi
15 .SH DESCRIPTION
16 .PP
17 A composite layout is made of several layout components.
18 .PP
19 .BR llapi_layout_comp_add (3)
20 adds the layout component
21 .I comp
22 into the
23 .IR layout .
24 The
25 .IR layout
26 will be turned into composite if it was plain before adding. All layout
27 attributes of
28 .I comp
29 will be inherited from the
30 .IR layout ,
31 unless otherwise specified for this component by llapi_layout_*_set(3)
32 functions.
33 .PP
34 .BR llapi_layout_comp_del (3)
35 deletes the layout component
36 .I comp
37 from the
38 .IR layout .
39 .PP
40 .SH RETURN VALUES
41 .B llapi_layout_comp_add()
42 and
43 .B llapi_layout_comp_del()
44 return 0 on success, or -1 if an error occurred (in which case, errno is
45 set appropriately).
46 .SH ERRORS
47 .TP 15
48 .SM EINVAL
49 An invalid argument was specified.
50 .SH "SEE ALSO"
51 .BR llapi_layout_alloc (3),
52 .BR llapi_layout_free (3),
53 .BR llapi_layout_file_open (3),
54 .BR llapi_layout_file_comp_add (3),
55 .BR llapi_layout (7),
56 .BR liblustreapi (7)