105dcc0bd9
by placing the destroy function in the callback of the io_device_unregister, we ensure that all channels associated with a bdev will be freed before the bdev is destroyed. This eliminates the possibility of an io_channel callback referencing a destroyed bdev. Change-Id: I0dd6f53dcfa9c9c5a3c6e98a7e2ad8687da17c3f Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/406248 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>