OS Manuals

llapi_pcc_detach_fid(3)

llapi_pcc_detach_fid_fd, llapi_pcc_detach_fid, llapi_pcc_detach_fid_str, llapi_pcc_detach_file - detach the given file from PCC

LLAPI_PCC_DETACH_FID_FD(3) Lustre Library Functions LLAPI_PCC_DETACH_FID_FD(3)

llapi_pcc_detach_fid_fd, llapi_pcc_detach_fid, llapi_pcc_detach_fid_str, llapi_pcc_detach_file - detach the given file from PCC

#include <lustre/lustreapi.h>
int llapi_pcc_detach_fid_fd(int dirfd, const struct lu_fid *fid,
                            __u32 flags);
int llapi_pcc_detach_fid(const char *mntpath,
                         const struct lu_fid *fid, __u32 flags);
int llapi_pcc_detach_fid_str(const char *mntpath,
                             const char *fidstr, __u32 flags);
int llapi_pcc_detach_file(const char *path, __u32 flags);

llapi_pcc_detach_fid_fd(), llapi_pcc_detach_fid(), llapi_pcc_detach_fid_str(), and llapi_pcc_detach_file() detach a cached file from PCC by an ioctl on the directory or the file itself. The file is referenced by fid, fidstr, or path. The directory, which is usually a mount point that the copytool already has opened, is referenced by dirfd, mntpath, path. The detach flags are specified by flags argument, which is a enum lu_pcc_detach_flags data structure, which contains the following values:

	PCC_DETACH_FL_NONE			= 0x0,
	PCC_DETACH_FL_UNCACHE		= 0x01,
	PCC_DETACH_FL_KNOWN_READWRITE	= 0x02,
	PCC_DETACH_FL_KNOWN_READONLY	= 0x04,
	PCC_DETACH_FL_CACHE_REMOVED	= 0x08,
means that detach the file from PCC yet retain the data copy on PCC backend.
means that remove the PCC copy after detach.
means that it is known that the file was once cached as PCC-RW.
means that it is known that the file was once cached as PCC-RO.
indicates that PCC cached copy is removed. It is used to tell the user space caller that the file is detached and the corresponding PCC copy is removed.

llapi_pcc_detach_fid_fd(), llapi_pcc_detach_fid(), llapi_pcc_detach_fid_str(), and llapi_pcc_detach_file() 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 state operation is not supported.
File does not reside on a Lustre filesystem.
path does not exist.

llapi_pcc_detach_fid_fd(), llapi_pcc_detach_fid(), llapi_pcc_detach_fid_str(), and llapi_pcc_detach_file() are part of the lustre(7) user application interface library since release 2.13.0

llapi_pcc_attach(3), lustreapi(7)

2024-08-28 Lustre User API

lustre 2.17.59-r2 · enterprise-packages · ingested 2026-10-11