[Devel] [PATCH vz9 v1 50/63] dm-ploop: support REQ_FUA for data pios
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Fri Jan 24 18:36:24 MSK 2025
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 <alexander.atanasov at virtuozzo.com>
---
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
More information about the Devel
mailing list