ocf/src
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
..
cleaning Use internal implementation of DIV_ROUND_UP 2022-05-10 09:52:17 +02:00
concurrency Mark unlikely branches in pio_concurrency 2022-05-18 11:56:06 +02:00
engine Fix ops(flush) engine 2022-06-01 22:33:35 +02:00
metadata Add option to disable cleaner 2022-04-28 13:04:27 +02:00
mngt Add option to disable cleaner 2022-04-28 13:04:27 +02:00
promotion Fix license 2021-10-28 13:08:50 +02:00
utils Fix ops(flush) engine 2022-06-01 22:33:35 +02:00
ocf_cache_priv.h Explicitly validate superblock after load 2022-03-04 19:12:51 +01:00
ocf_cache.c Remove space from names of internal volumes 2022-04-06 13:23:02 +02:00
ocf_core_priv.h Add promote-on-threshold sequential cutoff switch 2021-11-09 12:54:15 +01:00
ocf_core.c Remove space from names of internal volumes 2022-04-06 13:23:02 +02:00
ocf_ctx_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_ctx.c Deinit all registered volume types 2021-12-08 14:16:49 +01:00
ocf_def_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_io_class.c Verify standby/active cache state in OCF entry points 2022-03-28 09:42:02 +02:00
ocf_io_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_io.c License change to be approved by contributors 2021-10-27 12:48:20 +02:00
ocf_logger_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_logger.c Fix license 2021-10-28 13:08:50 +02:00
ocf_lru_structs.h Fix license 2021-10-28 13:08:50 +02:00
ocf_lru.c Use internal implementation of DIV_ROUND_UP 2022-05-10 09:52:17 +02:00
ocf_lru.h Parallelize ocf_lru_populate() 2022-01-28 19:29:21 +01:00
ocf_metadata.c Verify standby/active cache state in OCF entry points 2022-03-28 09:42:02 +02:00
ocf_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_queue_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_queue.c License change to be approved by contributors 2021-10-27 12:48:20 +02:00
ocf_request.c Fix license 2021-10-28 13:08:50 +02:00
ocf_request.h Fix for issues #988 and #997 2021-11-24 08:15:07 +01:00
ocf_seq_cutoff.c Add promote-on-threshold sequential cutoff switch 2021-11-09 12:54:15 +01:00
ocf_seq_cutoff.h Fix license 2021-10-28 13:08:50 +02:00
ocf_space.c Fix license 2021-10-28 13:08:50 +02:00
ocf_space.h Fix license 2021-10-28 13:08:50 +02:00
ocf_stats_builder.c Return error from stats API functions in standby 2022-03-29 22:20:04 +02:00
ocf_stats_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_stats.c Return error from stats API functions in standby 2022-03-29 22:20:04 +02:00
ocf_volume_priv.h Fix license 2021-10-28 13:08:50 +02:00
ocf_volume.c Prevent sending io to volume if it not opened 2022-04-08 15:34:14 +02:00