LLAPI_GET_MDT_INDEX_BY_FID(3)

NAME
llapi_get_mdt_index_by_fid - obtain the MDT index for a given File Identifier

SYNOPSIS
#include <lustre/lustreapi.h>

int llapi_get_mdt_index_by_fid(int fd, const struct lu_fid *fid,
                               int *mdt_index);

DESCRIPTION
llapi_get_mdt_index_by_fid() queries the filesystem to determine which MDT stores the metadata for the object identified by fid. The lookup is performed relative to the filesystem referenced by fd. If mdt_index is non-NULL, the resolved MDT index is stored at that location.

RETURN VALUES
Returns the MDT index a non-negative integer on success or a negative errno value on failure.

AVAILABILITY
llapi_get_mdt_index_by_fid() is part of the lustre(7) user application interface library since release 2.13.50

SEE ALSO
llapi_layout(7), lustreapi(7)