[Devel] [RFC PATCH vz9 v5 46/49] dm-ploop: add pio list ids to be used when passing pios to runners
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Mon Nov 18 09:25:13 MSK 2024
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 d8d8c7d66e87..13880feb0f92 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2114,6 +2114,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);
@@ -2129,6 +2132,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 98533900a42d..f3a1c2fa6cfb 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
More information about the Devel
mailing list