Whamcloud - gitweb
LU-12624 lod: alloc dir stripes by QoS
[fs/lustre-release.git] / lustre / doc / llapi_create_volatile_param.3
1 .TH llapi_create_volatile_param 3 "2015-01-14" "" "Lustre User API"
2 .SH NAME
3 llapi_create_volatile_param \- Lustre API file management
4 .SH SYNOPSIS
5 .sp
6 \fB#include <lustre/lustreapi.h>\fP
7 .sp
8 \fBint llapi_create_volatile_param(const char *\fPdirectory\fB,
9 int\fP mdt_idx\fB, int\fP open_flags\fB, mode_t\fP mode\fB, const
10 struct llapi_stripe_param *\fPstripe_param\fB)\fP
11 .sp
12 \fBint llapi_create_volatile_idx(char *\fPdirectory\fB, int\fP idx\fB, int\fP open_flags\fB)\fP
13 .sp
14 \fBint llapi_create_volatile(char *\fPdirectory\fB, int\fP mode\fB)\fP
15 .SH DESCRIPTION
16 .sp
17 These three functions create an anonymous, temporary, volatile file on
18 a Lustre filesystem. The created file is not visible with
19 \fBls(1)\fP\&. Once the file is closed, or the owning process dies, the
20 file is permanently removed from the filesystem.
21 .sp
22 These functions will also work on a non\-Lustre filesystem, where the
23 file is created then unlinked, leaving only the file descriptor to
24 access the file. This is not strictly equivalent because there is a
25 small window during which the file is visible to users (provided they
26 have access to the \fIdirectory\fP).
27 .sp
28 The \fIdirectory\fP parameter indicates where to create the file on the
29 Lustre filesystem.
30 .sp
31 \fImdt_idx\fP is the MDT index onto which to create the file. To use a
32 default MDT, set mdt_idx to \-1.
33 .sp
34 \fIopen_flags\fP and \fImode\fP are the same as \fBopen(2)\fP\&.
35 .sp
36 \fIstripe_param\fP describes the striping information. If it is NULL, then
37 the default for the directory is used.
38 .SH RETURN VALUE
39 .sp
40 \fBllapi_create_volatile_param\fP, \fBllapi_create_volatile_idx\fP and
41 \fBllapi_create_volatile\fP return a file descriptor on success. They
42 all return a negative errno on failure.
43 .SH ERRORS
44 .sp
45 The negative errno can be, but is not limited to:
46 .sp
47 \fB\-EINVAL\fP An invalid value was passed.
48 .sp
49 \fB\-ENOMEM\fP Not enough memory to allocate a resource.
50 .SH SEE ALSO
51 .sp
52 \fBlustreapi\fP(7)
53 .SH AUTHOR
54 Frank Zago for Cray Inc.