LLAPI\_LAYOUT\_COMP\_USE(3) Lustre Library Functions LLAPI\_LAYOUT\_COMP\_USE(3)

# [NAME](#NAME)

llapi\_layout\_comp\_use - change current component to relative position

# [SYNOPSIS](#SYNOPSIS)

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

```
int llapi_layout_comp_use(struct llapi_layout *layout,
                          enum llapi_layout_comp_use *pos);
```

# [DESCRIPTION](#DESCRIPTION)

Changes the currently active component of *layout* to the relative position given by *pos*. Possible values for *pos* are:

**LLAPI\_LAYOUT\_COMP\_USE\_FIRST**: The first component of the layout.

**LLAPI\_LAYOUT\_COMP\_USE\_LAST**: The last component of the layout.

**LLAPI\_LAYOUT\_COMP\_USE\_NEXT**: The next component after the current one.

**LLAPI\_LAYOUT\_COMP\_USE\_PREV**: The previous component before the current one.

# [RETURN VALUES](#RETURN_VALUES)

Return 0 on success, and 1 when there is no next or previous component. Otherwise, if an error occurred -1 is returned and *errno* is set appropriately.

# [ERRORS](#ERRORS)

[**EINVAL**](#EINVAL)

An invalid argument was specified.

[**ENOENT**](#ENOENT)

No such component ID exists.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_layout\_comp\_use()** 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\_del**(3)](/man/enterprise-packages/lustre/llapi_layout_comp_del.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_use(3) from lustre 2.17.59-r2 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
