Skip to content

Commit dae1ed6

Browse files
committed
Merge remote-tracking branch 'stable/linux-5.10.y' into v5.10+
2 parents 8910b03 + 841fca5 commit dae1ed6

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 0
4+
SUBLEVEL = 1
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

drivers/md/dm-raid.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,14 +3730,12 @@ static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits)
37303730
blk_limits_io_opt(limits, chunk_size_bytes * mddev_data_stripes(rs));
37313731

37323732
/*
3733-
* RAID10 personality requires bio splitting,
3734-
* RAID0/1/4/5/6 don't and process large discard bios properly.
3733+
* RAID1 and RAID10 personalities require bio splitting,
3734+
* RAID0/4/5/6 don't and process large discard bios properly.
37353735
*/
3736-
if (rs_is_raid10(rs)) {
3737-
limits->discard_granularity = max(chunk_size_bytes,
3738-
limits->discard_granularity);
3739-
limits->max_discard_sectors = min_not_zero(rs->md.chunk_sectors,
3740-
limits->max_discard_sectors);
3736+
if (rs_is_raid1(rs) || rs_is_raid10(rs)) {
3737+
limits->discard_granularity = chunk_size_bytes;
3738+
limits->max_discard_sectors = rs->md.chunk_sectors;
37413739
}
37423740
}
37433741

drivers/md/md.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ struct mddev {
311311
int external; /* metadata is
312312
* managed externally */
313313
char metadata_type[17]; /* externally set*/
314-
unsigned int chunk_sectors;
314+
int chunk_sectors;
315315
time64_t ctime, utime;
316316
int level, layout;
317317
char clevel[16];
@@ -339,7 +339,7 @@ struct mddev {
339339
*/
340340
sector_t reshape_position;
341341
int delta_disks, new_level, new_layout;
342-
unsigned int new_chunk_sectors;
342+
int new_chunk_sectors;
343343
int reshape_backwards;
344344

345345
struct md_thread *thread; /* management thread */

0 commit comments

Comments
 (0)