From e80b3d5f13288a380f06da03babeb4f8285a318a Mon Sep 17 00:00:00 2001 From: Wael Halbawi Date: Thu, 20 Sep 2018 18:30:58 -0700 Subject: [PATCH] bdev: Fix spdk_bdev_part_io_type_supported() The function spdk_bdev_part_io_type_supported() internally invokes io_type_supported() as provided in the base bdev's function table. This function should be called with the base bdev's context instead of the bdev itself. Change-Id: I5fbda0521f05b86dd81725614c5e45ee170cd8f5 Signed-off-by: Wael Halbawi Reviewed-on: https://review.gerrithub.io/426306 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu --- lib/bdev/part.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bdev/part.c b/lib/bdev/part.c index cd652633b..f10a70555 100644 --- a/lib/bdev/part.c +++ b/lib/bdev/part.c @@ -146,7 +146,8 @@ spdk_bdev_part_io_type_supported(void *_part, enum spdk_bdev_io_type io_type) { struct spdk_bdev_part *part = _part; - return part->internal.base->bdev->fn_table->io_type_supported(part->internal.base->bdev, io_type); + return part->internal.base->bdev->fn_table->io_type_supported(part->internal.base->bdev->ctxt, + io_type); } static struct spdk_io_channel *