[dm-devel] [PATCH 2/4] dm: Process .io_hints for drivers not having underlying devices
Kirill Tkhai
kirill.tkhai at openvz.org
Mon Mar 28 11:18:29 UTC 2022
This makes dm_calculate_queue_limits() sets the hints also for drivers,
which do not have underlying devices.
This is useful for dm-qcow2 driver, that wants to have incomming requests
are likely splitted by QCOW2 cluster size alignment.
Signed-off-by: Kirill Tkhai <kirill.tkhai at openvz.org>
---
drivers/md/dm-table.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index e43096cfe9e2..aa2e85bef6e7 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1660,8 +1660,11 @@ int dm_calculate_queue_limits(struct dm_table *table,
ti = dm_table_get_target(table, i);
- if (!ti->type->iterate_devices)
+ if (!ti->type->iterate_devices) {
+ if (ti->type->io_hints)
+ ti->type->io_hints(ti, &ti_limits);
goto combine_limits;
+ }
/*
* Combine queue limits of all the devices this target uses.
More information about the dm-devel
mailing list