lib/ftl: Prevent from adding active reloc to pending queue

In case ANM event occurs on band being
relocating (band is on active reloc queue)
we shoudn't add such band to pending queue.

Change-Id: I92a8bee11309097e19afaea549460f1d4387e3e5
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458617
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Wojciech Malikowski 2019-06-19 09:26:45 -04:00 committed by Darek Stojaczyk
parent 76cff6da81
commit c149f9597f

View File

@ -780,7 +780,7 @@ ftl_reloc_add(struct ftl_reloc *reloc, struct ftl_band *band, size_t offset,
breloc->num_lbks++;
}
if (!prev_lbks && !prio) {
if (!prev_lbks && !prio && !breloc->active) {
TAILQ_INSERT_HEAD(&reloc->pending_queue, breloc, entry);
}