Whamcloud - gitweb
LU-4788 lfsck: replace cfs_list_t with list_head
[fs/lustre-release.git] / lustre / doc / llapi_layout_pool_name_get.3
1 .TH llapi_layout_pool_name_get 3 "2013 Oct 31" "Lustre User API"
2 .SH NAME
3 llapi_layout_pool_name_get, llapi_layout_pool_name_set \- get or set the
4 OST pool name of a Lustre file
5 .SH SYNOPSIS
6 .nf
7 .B #include <lustre/lustreapi.h>
8 .PP
9 .BI "int llapi_layout_pool_name_get(const struct llapi_layout *" layout ",
10 .BI "                               char *" pool_name ", size_t " n ");
11 .sp
12 .BI "int llapi_layout_pool_name_set(struct llapi_layout *" layout ",
13 .BI "                               const char *" pool_name );
14 .fi
15 .SH DESCRIPTION
16 .PP
17 .B llapi_layout_pool_name_get()
18 stores into
19 .I pool_name
20 up to
21 .I n
22 characters of the name of the pool of OSTS associated with
23 .IR layout .
24 .PP
25 .B llapi_layout_pool_name_set()
26 sets the OST pool name of
27 .I  layout
28 to
29 .IR pool_name .
30 If
31 .I pool_name
32 uses "fsname.pool" notation to qualify the pool name
33 with a filesystem name, the "fsname." portion will be silently
34 discarded before storing the value.
35 .PP
36 .B llapi_layout_pool_name_set()
37 does not validate that
38 .I pool_name
39 names an existing non-empty pool, since it is not known a priori which
40 filesystem
41 .I layout
42 will be applied to. However, the function
43 .B llapi_layout_file_create()
44 will fail if given a
45 .I layout
46 with a pool that does not exist or contains no OSTs.
47 .SH RETURN VALUES
48 .LP
49 .B llapi_layout_pool_name_get()
50 and
51 .B llapi_layout_pool_name_set()
52 return 0 on success, or -1 if an error occurred (in which case, errno is
53 set appropriately).
54 .SH ERRORS
55 .TP 15
56 .SM EINVAL
57 An invalid argument was specified.
58 .SH NOTES
59 .PP
60 A pool defines a set of OSTs from which objects may be allocated
61 to store a file in a Lustre filesystem.
62 Pools are created by the filesystem administrator using the
63 .BR lctl (1)
64 command.  This API allows an application to create a file within an
65 existing pool, or to query the name of a pool that a file was created
66 in. It does not provide an interface for creating or destroying pools.
67 Refer to the Lustre Operations Manual for detailed background material
68 about OST pools.
69 .SH "SEE ALSO"
70 .BR llapi_layout_alloc (3),
71 .BR llapi_layout_file_open (3),
72 .BR llapi_layout (7),
73 .BR liblustreapi (7),
74 .BR lctl (1)