Skip to content

Commit

Permalink
Merge tag 'md-6.14-20250218' of https://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/mdraid/linux into block-6.14

Pull MD fix from Yu:

"This patch, by Bart Van Assche, fixes queue limits error handling for
 raid0, raid1 and raid10."

* tag 'md-6.14-20250218' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux:
  md/raid*: Fix the set_queue_limits implementations
  • Loading branch information
Jens Axboe committed Feb 20, 2025
2 parents dd8b058 + fbe8f2f commit 7543095
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,8 @@ static int raid0_set_limits(struct mddev *mddev)
lim.io_opt = lim.io_min * mddev->raid_disks;
lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
if (err)
return err;
}
return queue_limits_set(mddev->gendisk->queue, &lim);
}

Expand Down
4 changes: 1 addition & 3 deletions drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -3219,10 +3219,8 @@ static int raid1_set_limits(struct mddev *mddev)
lim.max_write_zeroes_sectors = 0;
lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
if (err)
return err;
}
return queue_limits_set(mddev->gendisk->queue, &lim);
}

Expand Down
4 changes: 1 addition & 3 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -4020,10 +4020,8 @@ static int raid10_set_queue_limits(struct mddev *mddev)
lim.io_opt = lim.io_min * raid10_nr_stripes(conf);
lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err) {
queue_limits_cancel_update(mddev->gendisk->queue);
if (err)
return err;
}
return queue_limits_set(mddev->gendisk->queue, &lim);
}

Expand Down

0 comments on commit 7543095

Please sign in to comment.