Viewing: llapi_fid2path.3

.TH LLAPI_FID2PATH 3 2026-10-26 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_fid2path \- translate a File Identifier to a pathname
.SH SYNOPSIS
.nf
.B #include <lustre/lustreapi.h>
.PP
.BI "int llapi_fid2path(const char *" device ", const char *" fidstr ", char *" path ","
.BI "                   int " pathlen ", long long *" recno ", int *" linkno ");"
.fi
.SH DESCRIPTION
.BR llapi_fid2path()
stores the pathname corresponding to the given File Identifier into
.IR path .
The resulting pathname may then be used like any other file or directory path.
See
.BR llapi_fid2path_at (3)
for more detail on this API.
.SH RETURN VALUES
Returns 0 on success or a negative errno value on failure.
.SH ERRORS
.TP 15
.B -EINVAL
An invalid FID was passed in
.IR fidstr ,
or
.I device
is NULL or empty.
.TP
.B -ENOENT
The FID does not exist.
.TP
.B -ENOMEM
Not enough memory to process the request.
.TP
.B -EOVERFLOW
.I path
is not big enough for pathname resolution.
.TP
.B -EPERM
The caller lacks
.B CAP_DAC_READ_SEARCH
capability, and the
.B user_fid2path
mount option is not enabled.
.TP
.B -ERANGE
A numeric component of the FID passed in
.I fidstr
is out of range, or
.I path
is not big enough to hold the returned path.
.SH AVAILABILITY
.B llapi_fid2path()
is part of the
.BR lustre (7)
user application interface library since release 2.13.50
.\" Added in commit v2_13_50-48-g21d671b3af
.SH SEE ALSO
.BR llapi_fid_parse (3),
.BR llapi_fid2path_at (3),
.BR llapi_root_path_open (3),
.BR llapi_layout (7),
.BR lustreapi (7)