]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md: Avoid OOPS when reshaping raid1 to raid0
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 1 Apr 2012 13:48:38 +0000 (23:48 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:15:55 +0000 (15:15 +0800)
commit4f1f847dc0563d85b05decd5128741c1103d4035
tree056a46fa9f14b79f1a29ea6a1a5aa849fc4f5799
parent0bbc87944127ab0cd27fbf2251f60dc134b1d4c0
md: Avoid OOPS when reshaping raid1 to raid0

commit 24b961f811a3e790a9b93604d2594bfb6cce4fa4 upstream.

raid1 arrays do not have the notion of chunk size. Calculate the
largest chunk sector size we can use to avoid a divide by zero OOPS
when aligning the size of the new array to the chunk size.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid0.c