OS Manuals

llapi_layout_ost_index_reset(3)

llapi_layout_ost_index_reset - reset OST index of all Lustre file components

LLAPI_LAYOUT_OST_INDEX_RESET(3) Lustre Library Functions LLAPI_LAYOUT_OST_INDEX_RESET(3)

llapi_layout_ost_index_reset - reset OST index of all Lustre file components

#include <lustre/lustreapi.h>
int llapi_layout_ost_index_reset(struct llapi_layout *layout);

llapi_layout_ost_index_reset() resets the starting ost_index number of all components in the specified file layout to LLAPI_LAYOUT_DEFAULT. This allows the MDS to automatically allocate the objects for each file component to the best OSTs available at that time.

This should be called when copying an existing file layout retrieved using one of llapi_layout_get_by_fid(3), llapi_layout_get_by_fd(3), llapi_layout_get_by_path(3), or llapi_layout_get_by_xattr(3), so that the OST selection is not copied exactly from the source layout if it is used with llapi_layout_file_open(3) to create a new file for migration, mirroring, or other replication task.

llapi_layout_ost_index_reset() returns 0 on success, or a negative error if an error occurred (in which case, errno is set appropriately).

An invalid argument was specified.
The layout does not have any valid components.
Insufficient memory to complete operation.

llapi_layout_ost_index_reset() is part of the lustre(7) user application interface library since release 2.7.0

llapi_layout_alloc(3), llapi_layout_file_open(3), llapi_layout_ost_index_set(3), llapi_layout(7), lustreapi(7)

2024-08-27 Lustre User API

lustre 2.17.59-r2 · enterprise-packages · ingested 2026-10-11