diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-21 20:43:11 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-21 20:43:11 +0200 |
commit | 856726396d6548ef21a9b02e5b685ec39e555248 (patch) | |
tree | 5d1ff58625e105c76922841afc224d64495cc789 /drivers/md/dm-clone-target.c | |
parent | Merge tag 'pm-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ra... (diff) | |
parent | dm: always manage discard support in terms of max_hw_discard_sectors (diff) | |
download | linux-856726396d6548ef21a9b02e5b685ec39e555248.tar.xz linux-856726396d6548ef21a9b02e5b685ec39e555248.zip |
Merge tag 'for-6.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer:
- Fix DM discard regressions due to DM core switching over to using
queue_limits_set() without DM core and targets first being updated to
set (and stack) discard limits in terms of max_hw_discard_sectors and
not max_discard_sectors
- Fix stable@ DM integrity discard support to set device's
discard_granularity limit to the device's logical block size
* tag 'for-6.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm: always manage discard support in terms of max_hw_discard_sectors
dm-integrity: set discard_granularity to logical block size
Diffstat (limited to 'drivers/md/dm-clone-target.c')
-rw-r--r-- | drivers/md/dm-clone-target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c index 3f68672ab7c9..ad79b52ffc14 100644 --- a/drivers/md/dm-clone-target.c +++ b/drivers/md/dm-clone-target.c @@ -2046,7 +2046,8 @@ static void set_discard_limits(struct clone *clone, struct queue_limits *limits) if (!test_bit(DM_CLONE_DISCARD_PASSDOWN, &clone->flags)) { /* No passdown is done so we set our own virtual limits */ limits->discard_granularity = clone->region_size << SECTOR_SHIFT; - limits->max_discard_sectors = round_down(UINT_MAX >> SECTOR_SHIFT, clone->region_size); + limits->max_hw_discard_sectors = round_down(UINT_MAX >> SECTOR_SHIFT, + clone->region_size); return; } @@ -2055,7 +2056,6 @@ static void set_discard_limits(struct clone *clone, struct queue_limits *limits) * device limits but discards aren't passed to the source device, so * inherit destination's limits. */ - limits->max_discard_sectors = dest_limits->max_discard_sectors; limits->max_hw_discard_sectors = dest_limits->max_hw_discard_sectors; limits->discard_granularity = dest_limits->discard_granularity; limits->discard_alignment = dest_limits->discard_alignment; |