From 339a0419d3bdc8df2bbdbdcd3a48eace59621d75 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 11 May 2020 23:39:11 +0900 Subject: [PATCH] lib/bdev: Rename bdev_abort_queued_io by bdev_abort_all_queued_io Current bdev_abort_queued_io() aborts all queued I/Os, and we want to use the name for the new function which aborts only the specified I/O if queued. So rename bdev_abort_queued_io() by bdev_abort_all_queued_io() in this patch. Signed-off-by: Shuhei Matsumoto Change-Id: I2125d91bffc870a0a4be4bb74037c1d27bce2d36 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2385 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Michael Haeuptle --- lib/bdev/bdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index 01749c275..7aa16bcf5 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -2614,7 +2614,7 @@ bdev_abort_buf_io(bdev_io_stailq_t *queue, struct spdk_bdev_channel *ch) * linked using the spdk_bdev_io link TAILQ_ENTRY. */ static void -bdev_abort_queued_io(bdev_io_tailq_t *queue, struct spdk_bdev_channel *ch) +bdev_abort_all_queued_io(bdev_io_tailq_t *queue, struct spdk_bdev_channel *ch) { struct spdk_bdev_io *bdev_io, *tmp; @@ -2738,8 +2738,8 @@ bdev_channel_destroy(void *io_device, void *ctx_buf) mgmt_ch = shared_resource->mgmt_ch; - bdev_abort_queued_io(&ch->queued_resets, ch); - bdev_abort_queued_io(&shared_resource->nomem_io, ch); + bdev_abort_all_queued_io(&ch->queued_resets, ch); + bdev_abort_all_queued_io(&shared_resource->nomem_io, ch); bdev_abort_buf_io(&mgmt_ch->need_buf_small, ch); bdev_abort_buf_io(&mgmt_ch->need_buf_large, ch); @@ -4167,10 +4167,10 @@ bdev_reset_freeze_channel(struct spdk_io_channel_iter *i) pthread_mutex_unlock(&channel->bdev->internal.mutex); } - bdev_abort_queued_io(&shared_resource->nomem_io, channel); + bdev_abort_all_queued_io(&shared_resource->nomem_io, channel); bdev_abort_buf_io(&mgmt_channel->need_buf_small, channel); bdev_abort_buf_io(&mgmt_channel->need_buf_large, channel); - bdev_abort_queued_io(&tmp_queued, channel); + bdev_abort_all_queued_io(&tmp_queued, channel); spdk_for_each_channel_continue(i, 0); }