OS Manuals

llapi_pcc_state_get(3)

llapi_pcc_state_get, llapi_pcc_state_get_fd, - get the current PCC state related to a file

LLAPI_PCC_STATE_GET(3) Lustre Library Functions LLAPI_PCC_STATE_GET(3)

llapi_pcc_state_get, llapi_pcc_state_get_fd, - get the current PCC state related to a file

#include <lustre/lustreapi.h>
int llapi_pcc_state_get(const char *path, struct lu_pcc_state *state);
int llapi_pcc_state_get_fd(int fd, struct lu_pcc_state *state);

The functions llapi_pcc_state_get() and llapi_pcc_state_get_fd() return the PCC state information for the file referenced by path or fd. Information is returned in the state argument which should be already allocated, which is a lu_pcc_state data structure, which contains the following fields:

struct lu_pcc_state {
	__u32	pccs_type; /* enum lu_pcc_type */
	__u32	pccs_open_count;
	__u32	pccs_flags; /* enum lu_pcc_state_flags */
	__u32	pccs_padding;
	char	pccs_path[PATH_MAX];
};
specifies the PCC mode for the given file, which is actual an lu_pcc_type data structure.
indicates the opener count for the given file on the client.
is PCC flags for the given file, not used currently.
is the full path of the cached file on the PCC backend.

llapi_pcc_state_get() and llapi_pcc_state_get_fd() 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.

llapi_pcc_state_get() and llapi_pcc_state_get_fd() 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