]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid10: set dev_sectors properly when resizing devices in array.
authorNeilBrown <neilb@suse.de>
Thu, 17 May 2012 00:08:45 +0000 (10:08 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 17 May 2012 00:08:45 +0000 (10:08 +1000)
commitd27217e80aa0858f9f4e5feca7210ff4ca81b095
treef51e0e36459eeb2f4e7d94f3ff15ffc5ab12de7c
parent672b98efd19572adfe33f2bc54b6e7fbbd742a55
md/raid10: set dev_sectors properly when resizing devices in array.

raid10 stores dev_sectors in 'conf' separately from the one in
'mddev' because it can have a very significant effect on block
addressing and so need to be updated carefully.

However raid10_resize isn't updating it at all!

To update it correctly, we need to make sure it is a proper
multiple of the chunksize taking various details of the layout
in to account.
This calculation is currently done in setup_conf.   So split it
out from there and call it from raid10_resize as well.
Then set conf->dev_sectors properly.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c