Skip to content

Commit fa9a86d

Browse files
bvanasschekawasaki
authored andcommitted
dm: Add support for copy offloading
In dm_calculate_queue_limits(), clear the copy offload limits if the device mapper driver does not support copy offloading. This is necessary since blk_set_stacking_limits() sets the copy offload limits to their maximum. Signed-off-by: Bart Van Assche <[email protected]>
1 parent cdc949b commit fa9a86d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/md/dm-table.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,14 @@ int dm_calculate_queue_limits(struct dm_table *t,
18161816
return -EINVAL;
18171817

18181818
combine_limits:
1819+
if (!(ti_limits.features & BLK_FEAT_STACKING_COPY_OFFL)) {
1820+
ti_limits.max_copy_hw_sectors = 0;
1821+
ti_limits.max_copy_src_segments = 0;
1822+
ti_limits.max_copy_dst_segments = 0;
1823+
ti_limits.max_user_copy_sectors = 0;
1824+
ti_limits.max_copy_sectors = 0;
1825+
}
1826+
18191827
/*
18201828
* Merge this target's queue limits into the overall limits
18211829
* for the table.

0 commit comments

Comments
 (0)