Commit bfc9ddde authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 269f4a3c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);