lib/ftl: delay processing ANM events initialization is completed

Start processing ANM events only after the device is fully initialized.
Otherwise some of the structures are partially filled and can be
interpreted incorrectly.

Change-Id: Ia741730cf15d44d76ce8afa7955e6a5bf42ca42b
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466935
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Konrad Sztyber 2019-08-30 14:08:32 +02:00 committed by Ben Walker
parent a2714d414f
commit bd78196c09

View File

@ -2129,6 +2129,12 @@ ftl_process_anm_event(struct ftl_anm_event *event)
struct ftl_band *band;
size_t lbkoff;
/* Drop any ANM requests until the device is initialized */
if (!dev->initialized) {
ftl_anm_event_complete(event);
return;
}
if (!ftl_check_core_thread(dev)) {
spdk_thread_send_msg(ftl_get_core_thread(dev), _ftl_process_anm_event, event);
return;