.nf
.B #include <lustre/lustreapi.h>
.PP
-.BI "int llapi_pcc_clear(const char *" mntpath ", bool " keep_data );
+.BI "int llapi_pcc_clear(const char *" mntpath ,
+.BI " enum lu_pcc_cleanup_flags " flags );
.fi
.SH DESCRIPTION
.PP
Reference
.BR llapi_pcc_del()
for the usage of the input parameter
-.IR keep_data .
+.IR flags .
.SH RETURN VALUES
.PP
.B llapi_pcc_clear()
.nf
.B #include <lustre/lustreapi.h>
.PP
-.BI "int llapi_pcc_del(const char *" mntpath ", const char *" pccpath ",
-.BI " __u32 " flags );
+.BI "int llapi_pcc_del(const char *" mntpath ", const char *" pccpath ,
+.BI " enum lu_pcc_cleanup_flags " flags );
.fi
.SH DESCRIPTION
.PP
By default, when remove a PCC backend from a client, the action is to scan the
PCC backend fs, uncache (detach and remove) all scanned PCC copies from PCC by
FIDs. The input parameter
-.IR keep_data
-means that it just removes the PCC backend from the Lustre client, and retains
+.IR flags
+currently only has one value
+.B PCC_CLEANUP_FL_KEEP_DATA
+that means it removes the PCC backend from the Lustre client, but retains
the data on the cache. In this case, the PCC-RW backend falls back as a
-tranditional HSM storage solution as long as the copytool is still running at
+traditional HSM storage solution as long as the copytool is still running at
this client.
.SH RETURN VALUES
.PP
}
static int llapi_pcc_del_internal(const char *mntpath, const char *pccpath,
- enum hsmtool_type type, __u32 flags)
+ enum hsmtool_type type,
+ enum lu_pcc_cleanup_flags flags)
{
struct hsm_scan_control hsc = {
.hsc_type = type,
};
struct pcc_cmd_handler {
- enum pcc_cmd_t pch_cmd;
- enum lu_pcc_type pch_type;
- bool pch_iter_cont;
- bool pch_flags;
- const char *pch_mntpath;
- const char *pch_pccpath;
- pcc_handler_t pch_cb;
- __u32 pch_id;
+ enum pcc_cmd_t pch_cmd;
+ enum lu_pcc_type pch_type;
+ bool pch_iter_cont;
+ enum lu_pcc_cleanup_flags pch_flags;
+ const char *pch_mntpath;
+ const char *pch_pccpath;
+ pcc_handler_t pch_cb;
+ __u32 pch_id;
};
static int llapi_pcc_yaml_cb_helper(struct pcc_cmd_handler *pch)
type, pch->pch_flags);
}
-int llapi_pcc_del(const char *mntpath, const char *pccpath, __u32 flags)
+int llapi_pcc_del(const char *mntpath, const char *pccpath,
+ enum lu_pcc_cleanup_flags flags)
{
struct pcc_cmd_handler pch;
type, pch->pch_flags);
}
-int llapi_pcc_clear(const char *mntpath, __u32 flags)
+int llapi_pcc_clear(const char *mntpath, enum lu_pcc_cleanup_flags flags)
{
struct pcc_cmd_handler pch;