Skip to content

Commit b2b44c1

Browse files
bvanasschekawasaki
authored andcommitted
dm-linear: Enable copy offloading
Set BLK_FEAT_STACKING_COPY_OFFL and max_copy_hw_sectors to enable copy offloading. Signed-off-by: Bart Van Assche <[email protected]>
1 parent fa9a86d commit b2b44c1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/md/dm-linear.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ static void linear_status(struct dm_target *ti, status_type_t type,
119119
}
120120
}
121121

122+
static void linear_io_hints(struct dm_target *ti, struct queue_limits *limits)
123+
{
124+
limits->features |= BLK_FEAT_STACKING_COPY_OFFL;
125+
}
126+
122127
static int linear_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
123128
unsigned int cmd, unsigned long arg,
124129
bool *forward)
@@ -211,6 +216,7 @@ static struct target_type linear_target = {
211216
.dtr = linear_dtr,
212217
.map = linear_map,
213218
.status = linear_status,
219+
.io_hints = linear_io_hints,
214220
.prepare_ioctl = linear_prepare_ioctl,
215221
.iterate_devices = linear_iterate_devices,
216222
.direct_access = linear_dax_direct_access,

0 commit comments

Comments
 (0)