LLAPI\_LAYOUT\_FILE\_COMP\_ADD(3) Lustre Library Functions LLAPI\_LAYOUT\_FILE\_COMP\_ADD(3)

# [NAME](#NAME)

llapi\_layout\_file\_comp\_add - add one or more components into an existing file.

# [SYNOPSIS](#SYNOPSIS)

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

```
int llapi_layout_file_comp_add(const char *path,
                               const struct llapi_layout *layout);
```

# [DESCRIPTION](#DESCRIPTION)

Add component(s) specified in *layout* into the existing file *path*.

# [RETURN VALUES](#RETURN_VALUES)

Return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately).

# [ERRORS](#ERRORS)

EINVAL

An invalid argument was specified.

[**ENOENT**](#ENOENT)

*path* doesn't exist.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_layout\_file\_comp\_add()** 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\_add**(3)](/man/enterprise-packages/lustre/llapi_layout_comp_add.3), [**llapi\_layout\_comp\_del**(3)](/man/enterprise-packages/lustre/llapi_layout_comp_del.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_file_comp_add(3) from lustre 2.17.60-r0 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
