@@ -64,7 +64,16 @@ enum ptlrpc_nrs_ctl {
* Policies can start using opcodes from this value and onwards for
* their own purposes; the assigned value itself is arbitrary.
*/
- PTLRPC_NRS_CTL_1ST_POL_SPEC = 0x20,
+ PTLRPC_NRS_CTL_POL_SPEC_01 = 0x20,
+ PTLRPC_NRS_CTL_POL_SPEC_02,
+ PTLRPC_NRS_CTL_POL_SPEC_03,
+ PTLRPC_NRS_CTL_POL_SPEC_04,
+ PTLRPC_NRS_CTL_POL_SPEC_05,
+ PTLRPC_NRS_CTL_POL_SPEC_06,
+ PTLRPC_NRS_CTL_POL_SPEC_07,
+ PTLRPC_NRS_CTL_POL_SPEC_08,
+ PTLRPC_NRS_CTL_POL_SPEC_09,
+ PTLRPC_NRS_CTL_POL_SPEC_10
};
/**
@@ -73,14 +73,12 @@ struct nrs_delay_req {
time64_t req_start_time;
};
-enum nrs_ctl_delay {
- NRS_CTL_DELAY_RD_MIN = PTLRPC_NRS_CTL_1ST_POL_SPEC,
- NRS_CTL_DELAY_WR_MIN,
- NRS_CTL_DELAY_RD_MAX,
- NRS_CTL_DELAY_WR_MAX,
- NRS_CTL_DELAY_RD_PCT,
- NRS_CTL_DELAY_WR_PCT,
-};
+#define NRS_CTL_DELAY_RD_MIN PTLRPC_NRS_CTL_POL_SPEC_01
+#define NRS_CTL_DELAY_WR_MIN PTLRPC_NRS_CTL_POL_SPEC_02
+#define NRS_CTL_DELAY_RD_MAX PTLRPC_NRS_CTL_POL_SPEC_03
+#define NRS_CTL_DELAY_WR_MAX PTLRPC_NRS_CTL_POL_SPEC_04
+#define NRS_CTL_DELAY_RD_PCT PTLRPC_NRS_CTL_POL_SPEC_05
+#define NRS_CTL_DELAY_WR_PCT PTLRPC_NRS_CTL_POL_SPEC_06
/** @} delay */
@@ -322,7 +322,7 @@ static int nrs_delay_ctl(struct ptlrpc_nrs_policy *policy,
assert_spin_locked(&policy->pol_nrs->nrs_lock);
- switch ((enum nrs_ctl_delay)opc) {
+ switch (opc) {
default:
return -EINVAL;
@@ -649,7 +649,7 @@ int sptlrpc_process_config(struct lustre_cfg *lcfg)
* is a actual filesystem.
*/
if (server_name2fsname(target, fsname, NULL))
- strlcpy(fsname, target, sizeof(target));
+ strlcpy(fsname, target, sizeof(fsname));
rc = sptlrpc_parse_rule(param, &rule);
if (rc)