LLAPI\_LAYOUT\_PATTERN\_GET(3) Lustre Library Functions LLAPI\_LAYOUT\_PATTERN\_GET(3)

# [NAME](#NAME)

llapi\_layout\_pattern\_get, llapi\_layout\_pattern\_set - get or set the RAID striping pattern of a Lustre file

# [SYNOPSIS](#SYNOPSIS)

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

```
int llapi_layout_pattern_get(const struct llapi_layout *layout,
                             uint64_t *pattern);
```

```
int llapi_layout_pattern_set(struct llapi_layout *layout,
                             uint64_t pattern);
```

# [DESCRIPTION](#DESCRIPTION)

**llapi\_layout\_pattern\_get()** stores into *pattern* the RAID striping pattern used by layout *layout*.

**llapi\_layout\_pattern\_set()** sets the RAID striping pattern of *layout* to *pattern*. Currently the only supported RAID pattern is RAID0. If *pattern* is not a supported RAID pattern the return value will be -1 and errno will be set to **EOPNOTSUPP**.

A *pattern* value of **LLAPI\_LAYOUT\_DEFAULT** means that the filesystem default RAID pattern will be used.

A *pattern* value of **LLAPI\_LAYOUT\_RAID0** means that the RAID0 pattern will be used.

# [RETURN VALUES](#RETURN_VALUES)

**llapi\_layout\_pattern\_get()** and **llapi\_layout\_pattern\_set()** return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately).

# [ERRORS](#ERRORS)

[**EINVAL**](#EINVAL)

An invalid argument was specified.

[**EOPNOTSUPP**](#EOPNOTSUPP)

An unsupported RAID pattern was specified.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_layout\_pattern\_get()** and **llapi\_layout\_pattern\_set()** are part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.7.0

# [SEE ALSO](#SEE_ALSO)

[**llapi\_layout\_alloc**(3)](/man/enterprise-packages/lustre/llapi_layout_alloc.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_pattern_get(3) from lustre 2.17.60-r0 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
