Skip to content

Commit

Permalink
dm raid: remove unnecessary discard limits for raid0 and raid10
Browse files Browse the repository at this point in the history
Commit 29efc39 ("md/md0: optimize raid0 discard handling") and
commit d30588b ("md/raid10: improve raid10 discard request")
remove MD raid0's and raid10's inability to properly handle large
discards. So eliminate associated constraints from dm-raid's support.

Depends-on: 29efc39 ("md/md0: optimize raid0 discard handling")
Depends-on: d30588b ("md/raid10: improve raid10 discard request")
Reported-by: Matthew Ruffell <matthew.ruffell@canonical.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mike Snitzer committed Apr 30, 2021
1 parent 8e947c8 commit ca4a4e9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3750,15 +3750,6 @@ static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits)

blk_limits_io_min(limits, chunk_size_bytes);
blk_limits_io_opt(limits, chunk_size_bytes * mddev_data_stripes(rs));

/*
* RAID0 and RAID10 personalities require bio splitting,
* RAID1/4/5/6 don't and process large discard bios properly.
*/
if (rs_is_raid0(rs) || rs_is_raid10(rs)) {
limits->discard_granularity = chunk_size_bytes;
limits->max_discard_sectors = rs->md.chunk_sectors;
}
}

static void raid_postsuspend(struct dm_target *ti)
Expand Down

0 comments on commit ca4a4e9

Please sign in to comment.