numam-spdk/lib/bdev/lvol
Tomasz Zawadzki 9583e73901 lvol: remove lvs from global list after callback
Inserting into g_spdk_lvol_pairs list is done in vbdev_lvs_create_cb,
at that point it is known that it can be used. Meanwhile removing
was done at start of _vbdev_lvs_remove, to prevent possibility to
access it when waiting for destruct callback to complete.

This made checking if the g_spdk_lvol_pairs list is empty unreliable
to detect if all lvs were destroyed - they could still be being
processed and callback not yet called.

This patch removes lvs from global list only after the callback of
_vbdev_lvs_remove is called.

It will be used in future patch during asynchronous
finish of vbdev module to determine when all lvs were removed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I638fe63a80b3cf00e9773f5a8c7be315d2c05555
Reviewed-on: https://review.gerrithub.io/382986
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-26 17:23:58 -04:00
..
Makefile lvol: Logical volume implementation 2017-09-14 19:30:54 -04:00
vbdev_lvol_rpc.c lvol: move name to old_name 2017-10-25 12:10:38 -04:00
vbdev_lvol.c lvol: remove lvs from global list after callback 2017-10-26 17:23:58 -04:00
vbdev_lvol.h lvol: remove lvs from global list after callback 2017-10-26 17:23:58 -04:00