From 9b38556afeaa0a4e6ecabaa263fa50127f9788a1 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 3 Feb 2017 15:10:03 -0700 Subject: [PATCH] bdev/split: pass correct bdev to base_bdev functions Since the io_channel will be passed to the underlying bdev's read/write/... functions later, we need to also acquire an io_channel for the underlying bdev, not for the virtual bdev. Change-Id: Ica13076973fef875ea636770fce8eb27017aa1c3 Signed-off-by: Daniel Verkamp --- lib/bdev/split/vbdev_split.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bdev/split/vbdev_split.c b/lib/bdev/split/vbdev_split.c index 7899b5f66..c192ffaff 100644 --- a/lib/bdev/split/vbdev_split.c +++ b/lib/bdev/split/vbdev_split.c @@ -193,7 +193,7 @@ vbdev_split_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io_ { struct split_disk *split_disk = (struct split_disk *)bdev; - return split_disk->base_bdev->fn_table->io_type_supported(bdev, io_type); + return split_disk->base_bdev->fn_table->io_type_supported(split_disk->base_bdev, io_type); } static struct spdk_io_channel * @@ -201,7 +201,7 @@ vbdev_split_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) { struct split_disk *split_disk = (struct split_disk *)bdev; - return split_disk->base_bdev->fn_table->get_io_channel(bdev, priority); + return split_disk->base_bdev->fn_table->get_io_channel(split_disk->base_bdev, priority); } static struct spdk_bdev_fn_table vbdev_split_fn_table = {