]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super1.c
super1: simplify setting of array size.
authorNeilBrown <neilb@suse.de>
Tue, 30 Jul 2013 06:51:38 +0000 (16:51 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 30 Jul 2013 07:05:47 +0000 (17:05 +1000)
commit23bf42cc79d46de019d4b27c16354a191a98ed41
tree0a43e981d30d69879929f780824eabd648e0c6f9
parent641da74591920d4cfd4f92e7eefbf317d6ec348c
super1: simplify setting of array size.

Currently the extra space to leave before the data in the array
is calculated in two separate places, and they can be inconsistent.

Instead, do it all in validate_geometry.  This records the
'data_offset' chosen which all other devices then use.

'write_init_super' now just uses the value rather than doing all the
calculations again.

This results in more consistent numbers.

Also, load_super sets st->data_offset so that it is used by "--add",
so the new device has a data offset matching a pre-existing device.

Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.h
super1.c
util.c