diff options
author | Maged Mokhtar <mmokhtar@petasan.org> | 2019-10-23 22:41:17 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2019-11-05 20:21:40 +0100 |
commit | c1005322ff02110a4df7f0033368ea015062b583 (patch) | |
tree | 510473d47a9b700bf032abdb6f3294af1e7e7954 | |
parent | dm writecache: fix uninitialized variable warning (diff) | |
download | linux-c1005322ff02110a4df7f0033368ea015062b583.tar.xz linux-c1005322ff02110a4df7f0033368ea015062b583.zip |
dm writecache: handle REQ_FUA
Call writecache_flush() on REQ_FUA in writecache_map().
Cc: stable@vger.kernel.org # 4.18+
Signed-off-by: Maged Mokhtar <mmokhtar@petasan.org>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm-writecache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index ea7b8be0b833..7d727a72aa13 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -1218,7 +1218,8 @@ bio_copy: } } while (bio->bi_iter.bi_size); - if (unlikely(wc->uncommitted_blocks >= wc->autocommit_blocks)) + if (unlikely(bio->bi_opf & REQ_FUA || + wc->uncommitted_blocks >= wc->autocommit_blocks)) writecache_flush(wc); else writecache_schedule_autocommit(wc); |