[Devel] [PATCH hci-8.1 v3 6/8] dm-qcow2: add fast_path module parameter
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Fri Nov 13 14:11:24 MSK 2026
Add a writable fast_path module parameter, on by default. When it is
off, every split of a request goes to the main kwork deferred list,
as before the fast path, so the fast path can be turned off at
runtime if it misbehaves, and the two modes can be compared on the
same device.
It is checked for each split in qio_try_fast(), so a change applies
to the splits prepared after it. Splits already on the fast path
complete there.
https://virtuozzo.atlassian.net/browse/VSTOR-95494
Feature: dm-qcow2: block device over QCOW2 files driver
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
v3: new patch
drivers/md/dm-qcow2-map.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index fb2a1c7c42111..5d70ab5d68f4c 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -15,6 +15,11 @@
#include "dm-rq.h"
#include "dm-qcow2.h"
+static bool fast_path = true;
+module_param(fast_path, bool, 0644);
+MODULE_PARM_DESC(fast_path,
+ "Process qios not changing metadata outside main kwork");
+
/* "Exactly one bit" has the same number in L1 and L2 */
#define LX_REFCOUNT_EXACTLY_ONE (1ULL << 63)
#define L1_RESERVED_ZERO_MASK 0x7F000000000001FFULL
@@ -4821,7 +4826,7 @@ static void qio_try_fast(struct qio *qio, struct list_head *deferred_qios)
{
list_del(&qio->link);
- if (process_one_qio(qio->qcow2, qio, true))
+ if (!READ_ONCE(fast_path) || process_one_qio(qio->qcow2, qio, true))
list_add_tail(&qio->link, deferred_qios);
}
--
2.43.5
More information about the Devel
mailing list