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 stripe number
25 .B llapi_layout_ost_index_set()
26 sets the OST index of stripe number
32 This allows an application to control which OSTs will be used to
33 allocate storage for a file. Setting the OST index is currently only
34 supported for stripe 0.
36 It is an error to call
37 .B llapi_layout_ost_index_get()
40 that was not initialized with with one of
41 .BR llapi_layout_get_by_fd() ,
42 .BR llapi_layout_get_by_fid() ,
44 .BR llapi_layout_get_by_path() .
49 .B LLAPI_LAYOUT_DEFAULT
50 means that an index will be automatically assigned by the filesystem.
53 .B llapi_layout_ost_index_get()
55 .B llapi_layout_ost_index_set()
56 return 0 on success, or -1 if an error occurred (in which case, errno is
61 An invalid argument was specified.
64 Attempted to set index of a stripe other than stripe 0.
66 .BR llapi_layout_alloc (3),
67 .BR llapi_layout_file_open (3),