1 .TH llapi_layout_ost_index_get 3 "2013 Oct 31" "Lustre User API"
3 llapi_layout_ost_index_get, llapi_layout_ost_index_set \- get or set the
4 OST index of a stripe of a Lustre file
7 .B #include <lustre/lustreapi.h>
9 .BI "int llapi_layout_ost_index_get(const struct llapi_layout *" layout ,
10 .BI " int " stripe_number ", uint64_t *" ost_index );
12 .BI "int llapi_layout_ost_index_set(struct llapi_layout *" layout ,
13 .BI " int " stripe_number ", uint64_t " ost_index );
17 .B llapi_layout_ost_index_get()
20 the index number of the Lustre OST associated with
25 .B llapi_layout_ost_index_set()
32 This allows an application to control which OSTs will be used to
33 allocate storage for a file. Setting the starting OST index for a file
34 .RI ( stripe_number =0)
35 is supported with all versions of Lustre, and other stripes in the file
36 will be assigned sequentially by the filesystem. Setting the OST indices
37 other than stripe 0 is only supported with Lustre 2.7 and later, and will
38 return an error at file creation time for 2.6 and earlier.
40 It is an error to call
41 .B llapi_layout_ost_index_get()
44 that was not initialized with with one of
45 .BR llapi_layout_get_by_fd() ,
46 .BR llapi_layout_get_by_fid() ,
48 .BR llapi_layout_get_by_path() .
53 .B LLAPI_LAYOUT_DEFAULT
56 and means that an OST index will be automatically assigned by the
57 filesystem and will reset previously-set
62 .B llapi_layout_ost_index_get()
64 .B llapi_layout_ost_index_set()
65 return 0 on success, or -1 if an error occurred (in which case, errno is
70 An invalid argument was specified.
73 Attempted to set index of a stripe other than stripe 0.
75 .BR llapi_layout_alloc (3),
76 .BR llapi_layout_file_open (3),