LLAPI\_PATH2FID(3) Lustre Library Functions LLAPI\_PATH2FID(3)

# [NAME](#NAME)

llapi\_path2fid - translate a path name to a File Identifier

# [SYNOPSIS](#SYNOPSIS)

```
#include <lustre/lustreapi.h>
```

```
int llapi_path2fid(const char *path, struct lu_fid *fid);
```

# [DESCRIPTION](#DESCRIPTION)

**llapi\_path2fid()** stores the Lustre file identifier (FID) for the file or directory named by *path* into *fid*. The *fid* may be then be passed to other **llapi\_** functions that expect the **struct lu\_fid** data type.

# [RETURN VALUES](#RETURN_VALUES)

returns 0 on success or a negative errno value on failure.

# [ERRORS](#ERRORS)

[**-EINVAL**](#EINVAL)

An invalid argument was specified.

[**-ENOTTY**](#ENOTTY)

*path* does not reside on a Lustre filesystem.

[**-ENOENT**](#ENOENT)

*path* does not exist.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_path2fid()** is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.4.0

# [SEE ALSO](#SEE_ALSO)

[**llapi\_fd2fid**(3)](/man/enterprise-packages/lustre/llapi_fd2fid.3), [**llapi\_fid2path**(3)](/man/enterprise-packages/lustre/llapi_fid2path.3), [**llapi\_layout\_get\_by\_fid**(3)](/man/enterprise-packages/lustre/llapi_layout_get_by_fid.3), [**llapi\_path2parent**(3)](/man/enterprise-packages/lustre/llapi_path2parent.3), [**llapi\_layout**(7)](/man/enterprise-packages/lustre/llapi_layout.7), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2024-08-28 Lustre User API

---

Document: llapi_path2fid(3) from lustre 2.17.59-r1 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
