OS Manuals

llapi_pcc_attach_fid_str(3)

llapi_pcc_attach, llapi_pcc_attach_fid, llapi_pcc_attach_fid_str - attach a file into PCC

LLAPI_PCC_ATTACH(3) Lustre Library Functions LLAPI_PCC_ATTACH(3)

llapi_pcc_attach, llapi_pcc_attach_fid, llapi_pcc_attach_fid_str - attach a file into PCC

#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);

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
means that the file is not cached on PCC.
means RW-PCC mode.
means RO-PCC mode.

llapi_pcc_attach() return 0 on success or a negative errno value on failure.

Insufficient memory to complete operation.
Memory region is not properly mapped.
One or more invalid arguments are given.
PCC attach operation is not supported.

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

lustreapi(7)

2024-08-28 Lustre User API

lustre 2.17.60-r0 · enterprise-packages · ingested 2026-10-22