ocf/src/engine
Adam Rutkowski df7ed6920c Fix ops(flush) engine
Flush I/O should be forwarded to core and cache device. In case of core
this is simple - just mirror the I/O from the top volume. Since
cache data is owned by OCF it makes sense to send a simple flush I/O
with 0 address and size.

Current implementation attempts to use cache data I/O interface
(ocf_submit_cache_reqs function) instead of submitting empty flush to
the underlying cache device. This function is designed to read/write
from mapped cachelines while there is no traversation/mapping
performed on flush I/O.

If request map allocation succeeds, this results in sending I/O to
addres 0 with size and flags inherited from the top adapter I/O.
This doesn't make any sense, and can even result in invalid I/O if the
size is greater than cache device size.

Even worse, if flush request map allocation fails (which happens
always in case of large flush requests) then the erroneous call to
ocf_submit_cache_reqs results in NULL pointer dereference.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-06-01 22:33:35 +02:00
..
cache_engine.c Explicitly validate superblock after load 2022-03-04 19:12:51 +01:00
cache_engine.h Explicitly validate superblock after load 2022-03-04 19:12:51 +01:00
engine_bf.c Extend BF queue protection to cache device queue 2022-03-02 20:59:51 +01:00
engine_bf.h Fix license 2021-10-28 13:08:50 +02:00
engine_common.c Remove "metadata_layout" parameter of the cache 2022-03-07 17:48:25 +01:00
engine_common.h Fix license 2021-10-28 13:08:50 +02:00
engine_d2c.c Fix license 2021-10-28 13:08:50 +02:00
engine_d2c.h Fix license 2021-10-28 13:08:50 +02:00
engine_debug.h Fix license 2021-10-28 13:08:50 +02:00
engine_discard.c Fix license 2021-10-28 13:08:50 +02:00
engine_discard.h Fix license 2021-10-28 13:08:50 +02:00
engine_fast.c Fix license 2021-10-28 13:08:50 +02:00
engine_fast.h Fix license 2021-10-28 13:08:50 +02:00
engine_inv.c Fix license 2021-10-28 13:08:50 +02:00
engine_inv.h Fix license 2021-10-28 13:08:50 +02:00
engine_ops.c Fix ops(flush) engine 2022-06-01 22:33:35 +02:00
engine_ops.h Fix license 2021-10-28 13:08:50 +02:00
engine_pt.c Fix for issues #988 and #997 2021-11-24 08:15:07 +01:00
engine_pt.h Fix license 2021-10-28 13:08:50 +02:00
engine_rd.c Fix for issues #988 and #997 2021-11-24 08:15:07 +01:00
engine_rd.h Fix license 2021-10-28 13:08:50 +02:00
engine_wa.c Fix license 2021-10-28 13:08:50 +02:00
engine_wa.h Fix license 2021-10-28 13:08:50 +02:00
engine_wb.c Fix license 2021-10-28 13:08:50 +02:00
engine_wb.h Fix license 2021-10-28 13:08:50 +02:00
engine_wi.c Fix license 2021-10-28 13:08:50 +02:00
engine_wi.h Fix license 2021-10-28 13:08:50 +02:00
engine_wo.c Remove "metadata_layout" parameter of the cache 2022-03-07 17:48:25 +01:00
engine_wo.h Fix license 2021-10-28 13:08:50 +02:00
engine_wt.c Fix license 2021-10-28 13:08:50 +02:00
engine_wt.h Fix license 2021-10-28 13:08:50 +02:00
engine_zero.c Fix license 2021-10-28 13:08:50 +02:00
engine_zero.h Fix license 2021-10-28 13:08:50 +02:00