Whamcloud - gitweb
LU-18101 sec: fix ACL handling on recent kernels again
[fs/lustre-release.git] / lustre / doc / llapi_layout_alloc.3
1 .TH LLAPI_LAYOUT_ALLOC 3 2024-08-27 "Lustre User API" "Lustre Library Functions"
2 .SH NAME
3 llapi_layout_alloc, llapi_layout_free \- allocate and destroy struct llapi_layout objects.
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "struct llapi_layout *llapi_layout_alloc(void);"
9 .PP
10 .BI "void llapi_layout_free(struct llapi_layout *"layout );
11 .fi
12 .SH DESCRIPTION
13 .B llapi_layout_alloc()
14 returns a pointer to a newly-allocated
15 .BR "struct llapi_layout" .
16 The
17 .B struct llapi_layout
18 is an opaque entity containing the layout information for a file in a
19 Lustre filesystem.  Its internal structure should not be directly
20 accessed by an application.  It may be used in
21 subsequent calls to the functions referenced in the
22 .BR llapi_layout (7)
23 manual page to modify layout attributes and create files with the given
24 layout.
25 .PP
26 The returned
27 .B struct llapi_layout
28 object is initialized with default attribute values that will affect the
29 standard Lustre behavior for assigning layouts to newly-created files.
30 These values may be modified using the group of
31 functions in
32 .B struct llapi_layout
33 API whose names end with
34 .BR _set .
35 The pointer should be freed with
36 .B llapi_layout_free()
37 when it is no longer needed.
38 .PP
39 .B llapi_layout_free()
40 frees the memory associated with
41 .IR layout .
42 .SH RETURN VALUES
43 .B llapi_layout_alloc()
44 returns a valid pointer on success or
45 .B NULL
46 on failure with
47 .B errno
48 set to an approporiate error code.
49 .PP
50 .B llapi_layout_free()
51 returns no value.
52 .SH ERRORS
53 .TP 15
54 .B ENOMEM
55 Insufficient storage space is available.
56 .SH AVAILABILITY
57 .B llapi_layout_alloc()
58 and
59 .B llapi_layout_free()
60 are part of the
61 .BR lustre (7)
62 user application interface library since release 2.7.0.
63 .\" Added in commit v2_6_51_0-23-g3d3a37c9c8
64 .SH SEE ALSO
65 .BR llapi_layout_file_create (3),
66 .BR llapi_layout (7),
67 .BR lustreapi (7)