bdev/error: add bdev_part hotremove callback
The error vbdev was missing a remove_cb, so unregistering its base bdev would cause issues later since the error vbdev would not get torn down. Change-Id: I6d94f67ce0d4f20a7a63c902b11d965115481df7 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/393264 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
85f55b7383
commit
b3eff95f76
@ -213,6 +213,12 @@ static struct spdk_bdev_fn_table vbdev_error_fn_table = {
|
||||
.dump_config_json = vbdev_error_dump_config_json,
|
||||
};
|
||||
|
||||
static void
|
||||
spdk_vbdev_error_base_bdev_hotremove_cb(void *_base_bdev)
|
||||
{
|
||||
spdk_bdev_part_base_hotremove(_base_bdev, &g_error_disks);
|
||||
}
|
||||
|
||||
int
|
||||
spdk_vbdev_error_create(struct spdk_bdev *base_bdev)
|
||||
{
|
||||
@ -227,7 +233,8 @@ spdk_vbdev_error_create(struct spdk_bdev *base_bdev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = spdk_bdev_part_base_construct(base, base_bdev, NULL,
|
||||
rc = spdk_bdev_part_base_construct(base, base_bdev,
|
||||
spdk_vbdev_error_base_bdev_hotremove_cb,
|
||||
SPDK_GET_BDEV_MODULE(error), &vbdev_error_fn_table,
|
||||
&g_error_disks, spdk_error_free_base,
|
||||
sizeof(struct error_channel), NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user