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

bdev/crypto: Stop access bdev_io->internal from bdev module and fix an issue



crypto_dev_poller() had set IO error to bdev_io->internal.status
but _crypto_operation_complete() checked io_ctx->bdev_io_status
and overwritten bdev_io->internal.status by spdk_bdev_io_complete().

On the other hand, internal fields of struct spdk_bdev_io should
have been avoided.

This patch fixes both.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia3d4887f34fdecc765b88246c3e66ce1871ff30f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1907


Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent a3f72b2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -619,7 +619,7 @@ crypto_dev_poller(void *args)
			 * to fail it.
			 */
			if (crypto_ch->iter) {
				bdev_io->internal.status = SPDK_BDEV_IO_STATUS_FAILED;
				io_ctx->bdev_io_status = SPDK_BDEV_IO_STATUS_FAILED;
			}

			/* Complete the IO */