[Devel] [PATCH vz9 v1 39/63] dm-ploop: add pio list ids to be used when passing pios to runners

Alexander Atanasov alexander.atanasov at virtuozzo.com
Fri Jan 24 18:36:13 MSK 2025


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.atanasov at 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 b820e9ba1218..9f19e0cb9bf7 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2092,6 +2092,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);
@@ -2107,6 +2110,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 452fc4a6c58f..224f4915d9f1 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -141,6 +141,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



More information about the Devel mailing list