lvol: fix lvol store examine when no lvols present

When there are no lvols present on lvol store
spdk_bdev_module_examine_done function is not called
when tasting is done.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia6c559f392148e3b4444dbc547df462bbe02356d

Reviewed-on: https://review.gerrithub.io/388402
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Maciej Szwed 2017-11-21 12:19:33 +01:00 committed by Jim Harris
parent 136e7d13c8
commit f1e9e414d8

View File

@ -888,9 +888,14 @@ _vbdev_lvs_examine_cb(void *arg, struct spdk_lvol_store *lvol_store, int lvserrn
lvol_store->lvols_opened = 0;
/* Open all lvols */
TAILQ_FOREACH_SAFE(lvol, &lvol_store->lvols, link, tmp) {
spdk_lvol_open(lvol, _vbdev_lvs_examine_finish, lvol_store);
if (TAILQ_EMPTY(&lvol_store->lvols)) {
SPDK_INFOLOG(SPDK_TRACE_VBDEV_LVOL, "Lvol store examination done\n");
spdk_bdev_module_examine_done(SPDK_GET_BDEV_MODULE(lvol));
} else {
/* Open all lvols */
TAILQ_FOREACH_SAFE(lvol, &lvol_store->lvols, link, tmp) {
spdk_lvol_open(lvol, _vbdev_lvs_examine_finish, lvol_store);
}
}
end: