diff --git a/lib/ftl/ftl_core.c b/lib/ftl/ftl_core.c index 9e08ec7b7..5ce720313 100644 --- a/lib/ftl/ftl_core.c +++ b/lib/ftl/ftl_core.c @@ -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); diff --git a/lib/ftl/ftl_io.h b/lib/ftl/ftl_io.h index db50ba188..dac3dc3da 100644 --- a/lib/ftl/ftl_io.h +++ b/lib/ftl/ftl_io.h @@ -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 {