From c149f9597f667025fec89e197a07c7db2b4c0b94 Mon Sep 17 00:00:00 2001 From: Wojciech Malikowski Date: Wed, 19 Jun 2019 09:26:45 -0400 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458617 Reviewed-by: Konrad Sztyber Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- lib/ftl/ftl_reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ftl/ftl_reloc.c b/lib/ftl/ftl_reloc.c index 2a77a88ef..f8a6378ba 100644 --- a/lib/ftl/ftl_reloc.c +++ b/lib/ftl/ftl_reloc.c @@ -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); }