1 .TH lustreapi 3 "2009 Jul 10" The Lustre user application interface library
3 llapi_file_create_foreign \- create a file with foreign layout on a Lustre filesystem
6 .B #include <sys/types.h>
7 .B #include <sys/stat.h>
9 .B #include <lustre/lustreapi.h>
11 .BI "int llapi_file_create_foreign(const char *" name ", mode_t " mode ","
12 .BI " __u32 " type ", __u32 " flags ", char *" foreign_lov );
17 .B llapi_file_create_foreign(\|)
20 free format layout and
24 on a Lustre filesystem, followed by file close.
27 specifies the permission bits.
30 man page for a detailed description.
33 specifies a type of foreign layout.
36 specifies any flags for foreign layout.
39 free-format string to be set as file layout/LOV EA.
42 .B llapi_file_create_foreign(\|)
48 the return value is a file descriptor.
51 on failure, the absolute value is an error code.
60 may not point to a Lustre filesystem.
63 #include <sys/types.h>
68 #include <lustre/lustreapi.h>
69 int main(int argc, char *argv[])
76 rc = llapi_file_create_foreign(argv[1], 0600, LOV_FOREIGN_TYPE_DAOS,
77 0xda08, "PUUID@CUUID");
79 fprintf(stderr, "file creation has failed, %s\\n", strerror(-rc));
82 printf("foreign file %s has been created with 'PUUID@CUUID' layout!\\n",
88 .BR llapi_file_open (3)