+16
−8
+35
−2
+1
−0
+6
−0
Loading
This patch adds tracking of the phase of the writes to the non-volatile cache. The phase is changed each time the whole buffer is filled. Along with every block's LBA, current phase is stored in its metadata. This allows for replaying the sequence of writes when recovering the data from the cache after (unclean) shutdown. Since there are only three possible phases to be stored on the device at a time, phase is defined as a 2-bit counter cycling through 1 -> 2 -> 3 -> 1, with 0 marking blocks that were never written. Change-Id: Id47880367934027fd102c32f183110acc9d4c62a Signed-off-by:Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458098 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by:
Mateusz Kozlowski <mateusz.kozlowski@intel.com>