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