| LLAPI_PCC_ATTACH(3) | Lustre Library Functions | LLAPI_PCC_ATTACH(3) |
NAME
llapi_pcc_attach, llapi_pcc_attach_fid, llapi_pcc_attach_fid_str - attach a file into PCC
SYNOPSIS
#include <lustre/lustreapi.h>
int llapi_pcc_attach(const char *path, __u32 id,
enum lu_pcc_type type);
int llapi_pcc_attach_fid(const char *mntpath, const struct lu_fid *fid,
__u32 id, enum lu_pcc_type type);
int llapi_pcc_attach_fid_str(const char *mntpath, const char *fidstr,
__u32 id, enum lu_pcc_type type);
DESCRIPTION
The function llapi_pcc_attach(), llapi_pcc_attach_fid() and llapi_pcc_attach_fid_str() tries to attach the file referenced by path, fid, or fidstr into PCC backend. PCC provides a group of local caches and works in two modes: RW-PCC enables a read-write cache on the local SSDs of a single client; RO-PCC provides a read-only cache on the local SSDs of multiple clients. For RW-PCC, the argument id is the archive ID of the copytool agent running on this client. By default, RO-PCC attach ID is setting same with RW-PCC attach ID for a PCC backend if it is also used as read-only caching. The attach mode is specified by type argument, which is a enum lu_pcc_type data structure, which contains the following values:
LU_PCC_NONE LU_PCC_READWRITE LU_PCC_READONLY
- LU_PCC_NONE
- means that the file is not cached on PCC.
- LU_PCC_READWRITE
- means RW-PCC mode.
- LU_PCC_READONLY
- means RO-PCC mode.
RETURN VALUES
llapi_pcc_attach() return 0 on success or a negative errno value on failure.
ERRORS
- -ENOMEM
- Insufficient memory to complete operation.
- -EFAULT
- Memory region is not properly mapped.
- -EINVAL
- One or more invalid arguments are given.
- -EOPNOTSUPP
- PCC attach operation is not supported.
AVAILABILITY
llapi_pcc_attach(), llapi_pcc_attach_fid() and llapi_pcc_attach_fid_str() are part of the lustre(7) user application interface library since release 2.13.0
SEE ALSO
| 2024-08-28 | Lustre User API |