open-cas-linux/modules/cas_cache/volume
Robert Baldyga e4d4750f96 Don't propagate bio flags to OCF for discard I/O
One of the steps of discarding data in cache is invalidating OCF metadata.
If a cache line which is supposed to be discarded is dirty, invalidating
it will require flushing metadata. Unfortunately, OCF allocates flushing
requests with the exactly the same flags as the original IO (in this case
discard flag is set) so the page on the disk is discarded instead of being
flushed. In case of power failure occurring before the metadata is flushed
to the disk, the data may be corrupted even if recovery will succeed.

Disabling propagation of original I/O flags for discard requests solves
this problem.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-03-16 13:44:44 +01:00
..
obj_blk.h Fix license 2021-10-28 12:46:42 +02:00
vol_blk_utils.c Fix license 2021-10-28 12:46:42 +02:00
vol_blk_utils.h Fix license 2021-10-28 12:46:42 +02:00
vol_block_dev_bottom.c Remove redundant ocf_io_get()/ocf_io_put() from bottom volume 2021-11-05 12:49:44 +01:00
vol_block_dev_bottom.h Fix license 2021-10-28 12:46:42 +02:00
vol_block_dev_top.c Don't propagate bio flags to OCF for discard I/O 2022-03-16 13:44:44 +01:00
vol_block_dev_top.h Fix license 2021-10-28 12:46:42 +02:00