Add specific list ids for writeback and flush pios, and process them
inside the runners.

https://virtuozzo.atlassian.net/browse/VSTOR-91821
Signed-off-by: Alexander Atanasov <alexander.atana...@virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 4 ++++
 drivers/md/dm-ploop.h     | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 2579a4dbc834..248dccd342c0 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2090,6 +2090,9 @@ int ploop_pio_runner(void *data)
                                WARN_ON_ONCE(1);        /* We must not see 
flushes here */
                                break;
                        case PLOOP_LIST_PREPARE:
+                               WARN_ON_ONCE(1);        /* We must not see 
prepares here */
+                               break;
+                       case PLOOP_LIST_FLUSHPIO:
                                // fsync pios can come here for endio
                                // XXX: make it a FSYNC list
                                ploop_pio_endio(pio);
@@ -2105,6 +2108,7 @@ int ploop_pio_runner(void *data)
                                break;
                                // XXX: make it list MDWB
                        case PLOOP_LIST_INVALID: /* resubmit sets the list id 
to invalid */
+                       case PLOOP_LIST_WRITEBACK: /* Write back pio */
                                ploop_submit_rw_mapped(ploop, pio);
                                break;
                        default:
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index f4f1449c82f3..a77becdb3172 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -143,6 +143,9 @@ enum {
 
        PLOOP_LIST_COUNT,
        PLOOP_LIST_INVALID = PLOOP_LIST_COUNT,
+       /* Following to be used as a list id only */
+       PLOOP_LIST_WRITEBACK,
+       PLOOP_LIST_FLUSHPIO,
 };
 
 struct ploop_worker {
-- 
2.43.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to