LLAPI\_LAYOUT\_COMP\_ID\_GET(3) Lustre Library Functions LLAPI\_LAYOUT\_COMP\_ID\_GET(3)

# [NAME](#NAME)

llapi\_layout\_comp\_id\_get - get the ID of a layout component.

# [SYNOPSIS](#SYNOPSIS)

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

```
int llapi_layout_comp_id_get(const struct llapi_layout *layout,
                             uint32_t *comp_id);
```

# [DESCRIPTION](#DESCRIPTION)

Return the unique numeric ID *comp\_id* of the currently active component of *layout*. The ID of a component is a unique numeric identifier for the component within the layout of each file, and no age, ordering, relative position, or other semantics are implied by the component ID. If a file's layout is modified a large number of times, the component ID may be re-used but will always be unique within a single file's layout.

# [RETURN VALUES](#RETURN_VALUES)

Return 0 on success. Return -1 if an error occurred and set errno appropriately.

# [ERRORS](#ERRORS)

[**EINVAL**](#EINVAL)

An invalid argument was specified.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_layout\_comp\_id\_get()** is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.10.0

# [SEE ALSO](#SEE_ALSO)

[**llapi\_layout\_alloc**(3)](/man/enterprise-packages/lustre/llapi_layout_alloc.3), [**llapi\_layout\_comp\_use\_id**(3)](/man/enterprise-packages/lustre/llapi_layout_comp_use_id.3), [**llapi\_layout\_file\_open**(3)](/man/enterprise-packages/lustre/llapi_layout_file_open.3), [**llapi\_layout**(7)](/man/enterprise-packages/lustre/llapi_layout.7), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2024-08-27 Lustre User API

---

Document: llapi_layout_comp_id_get(3) from lustre 2.17.60-r0 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
