If we see a bio with REQ_FUA set we need to request a sync.
https://virtuozzo.atlassian.net/browse/VSTOR-91816
Signed-off-by: Alexander Atanasov <[email protected]>
---
drivers/md/dm-ploop-map.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index fc2d99c3a8d0..a1dcf401409c 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -227,6 +227,14 @@ static void ploop_do_pio_endio(struct pio *pio)
if (!atomic_dec_and_test(&pio->remaining))
return;
+ /* REQ_FUA requires us to flush all before pio is completed */
+ if (pio->bi_op & REQ_FUA) {
+ struct file *file;
+
+ file = ploop_top_delta(pio->ploop)->file;
+ vfs_fsync(file, 1);
+ }
+
endio_cb(pio, endio_cb_data, pio->bi_status);
if (free_on_endio)
--
2.43.0
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel