bdev: remove bdev parameter

Remove bdev parameter from spdk_bdev_channel_get_histogram since
it's not used.

Change-Id: I89f0b142cc6f80ecf39811976995f738e4cfecdb
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Richael Zhuang 2022-12-09 11:12:48 +08:00 committed by Tomasz Zawadzki
parent 86431df168
commit 36f8f8da27
3 changed files with 6 additions and 7 deletions

View File

@ -1951,13 +1951,12 @@ void spdk_bdev_histogram_get(struct spdk_bdev *bdev, struct spdk_histogram_data
* is only valid during the execution of cb_fn. Referencing the histogram after cb_fn * is only valid during the execution of cb_fn. Referencing the histogram after cb_fn
* returns is not supported and yields undetermined behavior. * returns is not supported and yields undetermined behavior.
* *
* \param bdev Block device.
* \param ch IO channel of bdev. * \param ch IO channel of bdev.
* \param cb_fn Callback function to process the histogram of the channel. * \param cb_fn Callback function to process the histogram of the channel.
* \param cb_arg Argument to pass to cb_fn. * \param cb_arg Argument to pass to cb_fn.
*/ */
void spdk_bdev_channel_get_histogram(struct spdk_bdev *bdev, struct spdk_io_channel *ch, void spdk_bdev_channel_get_histogram(struct spdk_io_channel *ch, spdk_bdev_histogram_data_cb cb_fn,
spdk_bdev_histogram_data_cb cb_fn, void *cb_arg); void *cb_arg);
/** /**
* Retrieves media events. Can only be called from the context of * Retrieves media events. Can only be called from the context of

View File

@ -7880,8 +7880,8 @@ spdk_bdev_histogram_get(struct spdk_bdev *bdev, struct spdk_histogram_data *hist
} }
void void
spdk_bdev_channel_get_histogram(struct spdk_bdev *bdev, struct spdk_io_channel *ch, spdk_bdev_channel_get_histogram(struct spdk_io_channel *ch, spdk_bdev_histogram_data_cb cb_fn,
spdk_bdev_histogram_data_cb cb_fn, void *cb_arg) void *cb_arg)
{ {
struct spdk_bdev_channel *bdev_ch = __io_ch_to_bdev_ch(ch); struct spdk_bdev_channel *bdev_ch = __io_ch_to_bdev_ch(ch);
int status = 0; int status = 0;

View File

@ -3506,7 +3506,7 @@ bdev_histograms(void)
CU_ASSERT(g_count == 2); CU_ASSERT(g_count == 2);
g_count = 0; g_count = 0;
spdk_bdev_channel_get_histogram(bdev, ch, histogram_channel_data_cb, histogram_io_count); spdk_bdev_channel_get_histogram(ch, histogram_channel_data_cb, histogram_io_count);
CU_ASSERT(g_status == 0); CU_ASSERT(g_status == 0);
CU_ASSERT(g_count == 2); CU_ASSERT(g_count == 2);
@ -3521,7 +3521,7 @@ bdev_histograms(void)
poll_threads(); poll_threads();
CU_ASSERT(g_status == -EFAULT); CU_ASSERT(g_status == -EFAULT);
spdk_bdev_channel_get_histogram(bdev, ch, histogram_channel_data_cb, NULL); spdk_bdev_channel_get_histogram(ch, histogram_channel_data_cb, NULL);
CU_ASSERT(g_status == -EFAULT); CU_ASSERT(g_status == -EFAULT);
spdk_histogram_data_free(histogram); spdk_histogram_data_free(histogram);