Whamcloud - gitweb
LU-12635 build: Support for gcc -Wimplicit-fallthrough
[fs/lustre-release.git] / lustre / doc / llapi_layout_extension_size_get.3
1 .TH llapi_layout_extension_size_get 3 "2019 May 23" "Lustre User API"
2 .SH NAME
3 llapi_layout_extension_size_get, llapi_layout_extension_size_set \- get or set
4 the extension size of an extension component of a Lustre file
5 .SH SYNOPSIS
6 .nf
7 .B #include <lustre/lustreapi.h>
8 .PP
9 .BI "int llapi_layout_extension_size_get(const struct llapi_layout *" layout ",
10 .BI "                                    uint64_t *" ext_size );
11 .PP
12 .BI "int llapi_layout_extension_size_set(struct llapi_layout *" layout ",
13 .BI "                                    uint64_t " ext_size );
14 .fi
15 .SH DESCRIPTION
16 .PP
17 The extension size is the unit of increase the previous component size when
18 writing within the region of the current extension component. At the time of the
19 change the OSTs of the previous component layout are checked if they have
20 at least \fIext_size\fR free space. In case there is not enough free space,
21 the space covered by the extension component spills over to the next component
22 (see examples in \fBlfs-setstripe (1)\fR).
23 .PP
24 In case of a random write to a middle of the extension component, the extension
25 happens from the beginning of the extension component up to the current writing
26 position plus the \fIext_size\fR. However, the check for low space is still
27 done for the \fIext_size\fR.
28 .PP
29 .B llapi_layout_extension_size_get()
30 stores into
31 .I ext_size
32 the extension size of
33 .IR layout .
34 .PP
35 .B llapi_layout_extension_size_get()
36 sets the extension size of
37 .I layout
38 to
39 .IR ext_size .
40 .SH RETURN VALUES
41 .B llapi_layout_extension_size_get()
42 and
43 .B llapi_layout_extension_size_set()
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 lfs-setstripe (1),
52 .BR llapi_layout_alloc (3),
53 .BR llapi_layout_file_open (3),
54 .BR llapi_layout_stripe_size_set (3),
55 .BR llapi_layout_stripe_size_get (3),
56 .BR llapi_layout (7),
57 .BR lustreapi (7)