[Devel] [PATCH RH9 4/5] dm: Call io_hints even for device-less drivers

Kirill Tkhai ktkhai at virtuozzo.com
Mon Sep 20 18:59:20 MSK 2021


Ploop wants to set proper discard_granularity
despite it is not mapped on real device.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>

=====================
Patchset description:

dm-ploop: Kill loop

Intermediate patches can't be base for bisect.

In scope of https://jira.sw.ru/browse/PSBM-123654

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 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 0543cdf89e92..e6b55f067797 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1668,8 +1668,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 Devel mailing list