From a185a6e59593a433342cae01eceee93df8d64905 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 17 Mar 2022 20:42:44 +0100 Subject: [PATCH] Propagate io->dir flags when submitting flush bio in bottom volume When dir is ignored, and 0 is passed instead, each flush request will appear as READ request, which is not supported by some block device drivers. Signed-off-by: Robert Baldyga --- modules/cas_cache/volume/vol_block_dev_bottom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cas_cache/volume/vol_block_dev_bottom.c b/modules/cas_cache/volume/vol_block_dev_bottom.c index 6258e50..d032c82 100644 --- a/modules/cas_cache/volume/vol_block_dev_bottom.c +++ b/modules/cas_cache/volume/vol_block_dev_bottom.c @@ -235,7 +235,7 @@ static void block_dev_submit_flush(struct ocf_io *io) bio->bi_private = io; atomic_inc(&blkio->rq_remaning); - cas_submit_bio(CAS_SET_FLUSH(0), bio); + cas_submit_bio(CAS_SET_FLUSH(io->dir), bio); out: cas_bd_io_end(io, blkio->error);