]> git.baikalelectronics.ru Git - kernel.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)
committerNeilBrown <neilb@suse.de>
Tue, 3 Apr 2012 05:37:26 +0000 (15:37 +1000)
commit5e9db7109b2bbf11505227c7fc594f5b2a09e550
tree8cde643f6d3d142538d8e2499e65b368f5320bcc
parent8b90281989fa5e4f828d6ac8ba3455254dca4807
md: Avoid OOPS when reshaping raid1 to raid0

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>
drivers/md/raid0.c