diff --git a/lib/bdev/error/vbdev_error.c b/lib/bdev/error/vbdev_error.c index 4bab9426ec..58f7b79a47 100644 --- a/lib/bdev/error/vbdev_error.c +++ b/lib/bdev/error/vbdev_error.c @@ -254,9 +254,12 @@ static struct spdk_bdev_fn_table vbdev_error_fn_table = { }; static void -spdk_vbdev_error_base_bdev_hotremove_cb(void *_base_bdev) +spdk_vbdev_error_base_bdev_hotremove_cb(void *_part_base) { - spdk_bdev_part_base_hotremove(_base_bdev, &g_error_disks); + struct spdk_bdev_part_base *part_base = _part_base; + struct spdk_bdev *base_bdev = spdk_bdev_part_base_get_bdev(part_base); + + spdk_bdev_part_base_hotremove(base_bdev, &g_error_disks); } static int diff --git a/lib/bdev/gpt/vbdev_gpt.c b/lib/bdev/gpt/vbdev_gpt.c index 751af0ea86..e5e5d02ce6 100644 --- a/lib/bdev/gpt/vbdev_gpt.c +++ b/lib/bdev/gpt/vbdev_gpt.c @@ -103,9 +103,12 @@ spdk_gpt_base_free(void *ctx) } static void -spdk_gpt_base_bdev_hotremove_cb(void *_base_bdev) +spdk_gpt_base_bdev_hotremove_cb(void *_part_base) { - spdk_bdev_part_base_hotremove(_base_bdev, &g_gpt_disks); + struct spdk_bdev_part_base *part_base = _part_base; + struct spdk_bdev *base_bdev = spdk_bdev_part_base_get_bdev(part_base); + + spdk_bdev_part_base_hotremove(base_bdev, &g_gpt_disks); } static int vbdev_gpt_destruct(void *ctx); diff --git a/lib/bdev/part.c b/lib/bdev/part.c index 58cb1829b9..ed4d767310 100644 --- a/lib/bdev/part.c +++ b/lib/bdev/part.c @@ -307,7 +307,7 @@ struct spdk_bdev_part_base * base->ch_create_cb = ch_create_cb; base->ch_destroy_cb = ch_destroy_cb; - rc = spdk_bdev_open(bdev, false, remove_cb, bdev, &base->desc); + rc = spdk_bdev_open(bdev, false, remove_cb, base, &base->desc); if (rc) { spdk_bdev_part_base_free(base); SPDK_ERRLOG("could not open bdev %s\n", spdk_bdev_get_name(bdev)); diff --git a/lib/bdev/split/vbdev_split.c b/lib/bdev/split/vbdev_split.c index 97f119841a..3e313df0c2 100644 --- a/lib/bdev/split/vbdev_split.c +++ b/lib/bdev/split/vbdev_split.c @@ -117,9 +117,12 @@ vbdev_split_destruct(void *ctx) } static void -vbdev_split_base_bdev_hotremove_cb(void *_base_bdev) +vbdev_split_base_bdev_hotremove_cb(void *_part_base) { - spdk_bdev_part_base_hotremove(_base_bdev, &g_split_disks); + struct spdk_bdev_part_base *part_base = _part_base; + struct spdk_bdev *base_bdev = spdk_bdev_part_base_get_bdev(part_base); + + spdk_bdev_part_base_hotremove(base_bdev, &g_split_disks); } static void