1
0
Fork 0

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>
alistair/sunxi64-5.5-dsi
Maged Mokhtar 2019-10-23 22:41:17 +02:00 committed by Mike Snitzer
parent 8dd85873a0
commit c1005322ff
1 changed files with 2 additions and 1 deletions

View File

@ -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);