lib/ftl: Check if write buffer is empty during shutdown

Added assertion to check is there is no any
acquired write buffer entries during shutdown.

Change-Id: I92be8ff07b2bf338acb65a0e37d0cc6ad6962d81
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462934
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
This commit is contained in:
Wojciech Malikowski 2019-07-23 04:34:34 -04:00 committed by Jim Harris
parent b08337c216
commit a4881cf82f

View File

@ -1221,6 +1221,8 @@ ftl_dev_free_sync(struct spdk_ftl_dev *dev)
pthread_mutex_unlock(&g_ftl_queue_lock);
assert(LIST_EMPTY(&dev->wptr_list));
assert(ftl_rwb_num_acquired(dev->rwb, FTL_RWB_TYPE_INTERNAL) == 0);
assert(ftl_rwb_num_acquired(dev->rwb, FTL_RWB_TYPE_USER) == 0);
ftl_dev_dump_bands(dev);
ftl_dev_dump_stats(dev);