Commit bd78196c authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

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: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466935


Reviewed-by: default avatarMateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent a2714d41
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;