Commit 62610945 authored by Wojciech Malikowski's avatar Wojciech Malikowski Committed by Tomasz Zawadzki
Browse files

lib/ftl: Band relocation should be performed only on closed bands



Remove checks for open bands inside because
we should only support closed bands relocation.

Change-Id: Ice5f13d579a046a9cb46684488801a2fa0c15a9d
Signed-off-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/876


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent f93ac08d
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -222,16 +222,13 @@ ftl_reloc_prep(struct ftl_band_reloc *breloc)
	reloc->num_active++;

	if (!band->high_prio) {
		if (band->lba_map.ref_cnt == 0) {
		if (ftl_band_alloc_lba_map(band)) {
			SPDK_ERRLOG("Failed to allocate lba map\n");
			assert(false);
		}
	} else {
		ftl_band_acquire_lba_map(band);
	}
	} else {
		ftl_band_acquire_lba_map(band);
	}

	for (i = 0; i < reloc->max_qdepth; ++i) {
		move = &breloc->moves[i];
@@ -772,7 +769,7 @@ ftl_reloc(struct ftl_reloc *reloc)
			break;
		}

		/* TODO: Add handling relocation on open bands */
		/* Wait for band to close before relocating */
		if (breloc->band->state != FTL_BAND_STATE_CLOSED) {
			continue;
		}