mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
md/raid0: update queue parameter in a safer location.
commit199dc6ed51upstream. When a (e.g.) RAID5 array is reshaped to RAID0, the updating of queue parameters (e.g. max number of sectors per bio) is done in the wrong place. It should be part of ->run, but it is actually part of ->takeover. This means it happens before level_store() calls: blk_set_stacking_limits(&mddev->queue->limits); and so it ineffective. This can lead to errors from underlying devices. So move all the relevant settings out of create_stripe_zones() and into raid0_run(). As this can lead to a bug-on it is suitable for any -stable kernel which supports reshape to RAID0. So 2.6.35 or later. As the bug has been present for five years there is no urgency, so no need to rush into -stable. Fixes:9af204cf72("md: Add support for Raid5->Raid0 and Raid10->Raid0 takeover") Reported-by: Yi Zhang <yizhan@redhat.com> Signed-off-by: NeilBrown <neilb@suse.com> [ luis: backported to 3.16: - raid0 isn't accessed from dm-raid so no conditional mddev->queue accesses (done with commit753f2856cd"md raid0: access mddev->queue (request queue member) conditionally because it is not set when accessed from dm-raid") - adjusted context ] Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
parent
753cf4f4ba
commit
f2cbb1bf0f
1 changed files with 36 additions and 30 deletions
Loading…
Add table
Add a link
Reference in a new issue