0f0af48009
Moving data from one band to the other doesn't need to be stored on the non-volatile cache. Not only does it add unnecessary traffic to the cache (wearing it out and reducing its throughput), but it requires us to synchronize it with user writes to the same LBAs. To avoid all that, this patch adds the FTL_IO_BYPASS_CACHE flag to all writes coming from the reloc module. However, to be sure that the moved data is stored on disk and can be restored in case of power loss, we need to make sure that each free band have all of its data moved to a closed band before it can be erased. It's done by keeping track of the number of outstanding IOs moving data from particular band (num_reloc_blocks), as well as the number of open bands that contains data from this band (num_reloc_bands). Only when both of these are at zero and the band has zero valid blocks it can be erased. Change-Id: I7c106011ffc9685eb8e5ff497919237a305e4478 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458101 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com> Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
common | ||
ftl_band.c | ||
ftl_io.c | ||
ftl_md | ||
ftl_ppa | ||
ftl_reloc.c | ||
ftl_rwb.c | ||
ftl_wptr | ||
Makefile |