1 .TH llapi_layout_ost_index_reset 3 "2024 Mar 27" "Lustre User API"
3 llapi_layout_ost_index_reset \- reset OST index of all Lustre file components
6 .B #include <lustre/lustreapi.h>
8 .BI "int llapi_layout_ost_index_reset(struct llapi_layout *" layout );
12 .B llapi_layout_ost_index_reset()
13 resets the starting ost_index number of all components in the specified file
16 .BR LLAPI_LAYOUT_DEFAULT .
17 This allows the MDS to automatically allocate the objects for each file
18 component to the best OSTs available at that time.
20 This should be called when copying an existing file
22 retrieved using one of
23 .BR llapi_layout_get_by_fid (3),
24 .BR llapi_layout_get_by_fd (3),
25 .BR llapi_layout_get_by_path (3),
27 .BR llapi_layout_get_by_xattr (3),
28 so that the OST selection is not copied exactly from the source layout if
30 .BR llapi_layout_file_open (3)
31 to create a new file for migration, mirroring, or other replication task.
34 .B llapi_layout_ost_index_reset()
35 returns 0 on success, or a negative error if an error occurred (in which case,
36 errno is set appropriately).
40 An invalid argument was specified.
43 The layout does not have any valid components.
46 The layout does not have any valid components.
49 .BR llapi_layout_alloc (3),
50 .BR llapi_layout_file_open (3),
51 .BR llapi_layout_ost_index_set (3),