| LLAPI_PCC_DETACH_FID_FD(3) | Lustre Library Functions | LLAPI_PCC_DETACH_FID_FD(3) |
NAME
llapi_pcc_detach_fid_fd, llapi_pcc_detach_fid, llapi_pcc_detach_fid_str, llapi_pcc_detach_file - detach the given file from PCC
SYNOPSIS
#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);
DESCRIPTION
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,
- PCC_DETACH_FL_NONE
- means that detach the file from PCC yet retain the data copy on PCC backend.
- PCC_DETACH_FL_UNCACHE
- means that remove the PCC copy after detach.
- PCC_DETACH_FL_KNOWN_READWRITE
- means that it is known that the file was once cached as PCC-RW.
- PCC_DETACH_FL_KNOWN_READONLY
- means that it is known that the file was once cached as PCC-RO.
- PCC_DETACH_FL_CACHE_REMOVED
- 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.
RETURN VALUES
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.
ERRORS
AVAILABILITY
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
SEE ALSO
| 2024-08-28 | Lustre User API |