Whamcloud - gitweb
LU-12616 obclass: fix MDS start/stop race
[fs/lustre-release.git] / lustre / doc / llapi_layout_comp_add.3
1 .TH llapi_layout_comp_add 3 "2017 Apr 7" "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 existing in-memory
23 .I layout
24 under construction, and
25 .I comp
26 is freed.  The
27 .I layout
28 will be turned into composite if it was plain before adding. All layout
29 attributes of
30 .I comp
31 will be inherited from the
32 .IR layout ,
33 unless otherwise specified for this component by llapi_layout_*_set(3)
34 functions.
35 .PP
36 .BR llapi_layout_comp_del (3)
37 deletes the layout component
38 .I comp
39 from the in-memory
40 .IR layout ,
41 but does not delete the component from an existing file layout on the MDT.
42 .PP
43 .SH RETURN VALUES
44 .B llapi_layout_comp_add()
45 and
46 .B llapi_layout_comp_del()
47 return 0 on success, or -1 if an error occurred (in which case,
48 .B errno
49 is set appropriately).
50 .SH ERRORS
51 .TP 15
52 .SM EINVAL
53 An invalid argument was specified.
54 .SH "SEE ALSO"
55 .BR llapi_layout_alloc (3),
56 .BR llapi_layout_free (3),
57 .BR llapi_layout_file_open (3),
58 .BR llapi_layout_file_comp_add (3),
59 .BR llapi_layout_file_comp_del (3),
60 .BR llapi_layout (7),
61 .BR lustreapi (7)