lib/ftl: allow writes bypassing non-volatile cache

Some of the writes doesn't need to go through the non-volatile cache
(e.g. relocations, data recovery from the cache). This patch adds IO
flag to indicate that the write shouldn't be stored on the non-volatile
cache.

Change-Id: I3d485fe14cf25b3074832f26491ba0cb12ff0e58
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458100
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>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
This commit is contained in:
Konrad Sztyber 2019-06-07 12:02:48 +02:00 committed by Ben Walker
parent 9a42d7fc30
commit 4d113ee5d3
2 changed files with 3 additions and 1 deletions

View File

@ -1607,7 +1607,7 @@ ftl_rwb_fill(struct ftl_io *io)
}
if (ftl_io_done(io)) {
if (dev->nv_cache.bdev_desc) {
if (dev->nv_cache.bdev_desc && !(io->flags & FTL_IO_BYPASS_CACHE)) {
ftl_write_nv_cache(io);
} else {
ftl_io_complete(io);

View File

@ -73,6 +73,8 @@ enum ftl_io_flags {
/* Indicates that PPA should be taken from IO struct, */
/* not assigned by wptr, only works if wptr is also in direct mode */
FTL_IO_DIRECT_ACCESS = (1 << 9),
/* Bypass the non-volatile cache */
FTL_IO_BYPASS_CACHE = (1 << 10),
};
enum ftl_io_type {