lib/ftl: Check if any additional relocation was added
Return immediatly from ftl_reloc_add() if no new blocks was added to relocation. Change-Id: If80dfa725e0bb9f3b8987740012858a671c5ad90 Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457626 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
a74b79dc74
commit
e2fb1b80e1
@ -787,6 +787,10 @@ ftl_reloc_add(struct ftl_reloc *reloc, struct ftl_band *band, size_t offset,
|
||||
breloc->num_lbks++;
|
||||
}
|
||||
|
||||
if (!prio && prev_lbks == breloc->num_lbks) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!prev_lbks && !prio && !breloc->active) {
|
||||
TAILQ_INSERT_HEAD(&reloc->pending_queue, breloc, entry);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user