From bfc9ddde2dff2b4be069ab637946320c72b31819 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Sun, 7 Jun 2020 02:55:01 +0900 Subject: [PATCH] bdev/passthru: Support I/O type ABORT Passthrough bdev module sets the passed bdev_io to the cb_arg of the bdev_io submitted to the underlying bdev. Hence call spdk_bdev_abort() with bdev_io->u.abort.bio_to_abort for the I/O type ABORT. Passthrough bdev module returns the supported I/O type of the underlying bdev. Hence vbdev_passthru_io_type_supported() is not necessary to change. Signed-off-by: Shuhei Matsumoto Change-Id: Ifb7627a92409649ab08ae233ba517fbc1bc55a9f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2799 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Tomasz Zawadzki --- module/bdev/passthru/vbdev_passthru.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/bdev/passthru/vbdev_passthru.c b/module/bdev/passthru/vbdev_passthru.c index d12e7d6a9..f166f3e34 100644 --- a/module/bdev/passthru/vbdev_passthru.c +++ b/module/bdev/passthru/vbdev_passthru.c @@ -354,6 +354,10 @@ vbdev_passthru_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *b bdev_io->u.bdev.num_blocks, bdev_io->u.bdev.zcopy.populate, _pt_complete_zcopy_io, bdev_io); break; + case SPDK_BDEV_IO_TYPE_ABORT: + rc = spdk_bdev_abort(pt_node->base_desc, pt_ch->base_ch, bdev_io->u.abort.bio_to_abort, + _pt_complete_io, bdev_io); + break; default: SPDK_ERRLOG("passthru: unknown I/O type %d\n", bdev_io->type); spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_FAILED);