bdev: rename values of enum spdk_bdev_reset_stat_mode
Add the prefix "SPDK_" to values of enum spdk_bdev_reset_stat_mode for it's public. Change-Id: If0e2a84849048ca03b5945f6155b9719f00254b4 Signed-off-by: Richael Zhuang <richael.zhuang@arm.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16343 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
b317d8f396
commit
567d6b535b
@ -1492,8 +1492,8 @@ void spdk_bdev_add_io_stat(struct spdk_bdev_io_stat *total, struct spdk_bdev_io_
|
|||||||
void spdk_bdev_dump_io_stat_json(struct spdk_bdev_io_stat *stat, struct spdk_json_write_ctx *w);
|
void spdk_bdev_dump_io_stat_json(struct spdk_bdev_io_stat *stat, struct spdk_json_write_ctx *w);
|
||||||
|
|
||||||
enum spdk_bdev_reset_stat_mode {
|
enum spdk_bdev_reset_stat_mode {
|
||||||
BDEV_RESET_STAT_ALL,
|
SPDK_BDEV_RESET_STAT_ALL,
|
||||||
BDEV_RESET_STAT_MAXMIN,
|
SPDK_BDEV_RESET_STAT_MAXMIN,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3780,7 +3780,7 @@ spdk_bdev_reset_io_stat(struct spdk_bdev_io_stat *stat, enum spdk_bdev_reset_sta
|
|||||||
stat->max_copy_latency_ticks = 0;
|
stat->max_copy_latency_ticks = 0;
|
||||||
stat->min_copy_latency_ticks = UINT64_MAX;
|
stat->min_copy_latency_ticks = UINT64_MAX;
|
||||||
|
|
||||||
if (mode != BDEV_RESET_STAT_ALL) {
|
if (mode != SPDK_BDEV_RESET_STAT_ALL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3822,7 +3822,7 @@ bdev_alloc_io_stat(bool io_error_stat)
|
|||||||
stat->io_error = NULL;
|
stat->io_error = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_bdev_reset_io_stat(stat, BDEV_RESET_STAT_ALL);
|
spdk_bdev_reset_io_stat(stat, SPDK_BDEV_RESET_STAT_ALL);
|
||||||
|
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
@ -561,9 +561,9 @@ rpc_decode_reset_iostat_mode(const struct spdk_json_val *val, void *out)
|
|||||||
enum spdk_bdev_reset_stat_mode *mode = out;
|
enum spdk_bdev_reset_stat_mode *mode = out;
|
||||||
|
|
||||||
if (spdk_json_strequal(val, "all") == true) {
|
if (spdk_json_strequal(val, "all") == true) {
|
||||||
*mode = BDEV_RESET_STAT_ALL;
|
*mode = SPDK_BDEV_RESET_STAT_ALL;
|
||||||
} else if (spdk_json_strequal(val, "maxmin") == true) {
|
} else if (spdk_json_strequal(val, "maxmin") == true) {
|
||||||
*mode = BDEV_RESET_STAT_MAXMIN;
|
*mode = SPDK_BDEV_RESET_STAT_MAXMIN;
|
||||||
} else {
|
} else {
|
||||||
SPDK_NOTICELOG("Invalid parameter value: mode\n");
|
SPDK_NOTICELOG("Invalid parameter value: mode\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -580,7 +580,7 @@ static const struct spdk_json_object_decoder rpc_bdev_reset_iostat_decoders[] =
|
|||||||
static void
|
static void
|
||||||
rpc_bdev_reset_iostat(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
|
rpc_bdev_reset_iostat(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_bdev_reset_iostat req = { .mode = BDEV_RESET_STAT_ALL, };
|
struct rpc_bdev_reset_iostat req = { .mode = SPDK_BDEV_RESET_STAT_ALL, };
|
||||||
struct spdk_bdev_desc *desc = NULL;
|
struct spdk_bdev_desc *desc = NULL;
|
||||||
struct rpc_reset_iostat_ctx *rpc_ctx;
|
struct rpc_reset_iostat_ctx *rpc_ctx;
|
||||||
struct bdev_reset_iostat_ctx *bdev_ctx;
|
struct bdev_reset_iostat_ctx *bdev_ctx;
|
||||||
|
@ -602,7 +602,7 @@ _bdev_nvme_add_io_path(struct nvme_bdev_channel *nbdev_ch, struct nvme_ns *nvme_
|
|||||||
SPDK_ERRLOG("Failed to alloc io_path stat.\n");
|
SPDK_ERRLOG("Failed to alloc io_path stat.\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
spdk_bdev_reset_io_stat(io_path->stat, BDEV_RESET_STAT_MAXMIN);
|
spdk_bdev_reset_io_stat(io_path->stat, SPDK_BDEV_RESET_STAT_MAXMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
io_path->nvme_ns = nvme_ns;
|
io_path->nvme_ns = nvme_ns;
|
||||||
@ -3674,7 +3674,7 @@ nvme_ns_alloc(void)
|
|||||||
free(nvme_ns);
|
free(nvme_ns);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
spdk_bdev_reset_io_stat(nvme_ns->stat, BDEV_RESET_STAT_MAXMIN);
|
spdk_bdev_reset_io_stat(nvme_ns->stat, SPDK_BDEV_RESET_STAT_MAXMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nvme_ns;
|
return nvme_ns;
|
||||||
|
Loading…
Reference in New Issue
Block a user