]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super1: fix choice of data_offset.
authorNeilBrown <neilb@suse.de>
Mon, 14 May 2012 23:51:03 +0000 (09:51 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 14 May 2012 23:51:03 +0000 (09:51 +1000)
commitd9751e06a601b5576b1b9e2c8126584083110ca5
treeaf25fa11f8041eea8e172acf0eb14db65adcdbd5
parent9f9a7d034f04a786665cff5b4dd6a8f963a3fabb
super1: fix choice of data_offset.

While it is nice to set a high data_offset to leave plenty of head
room it is much more important to leave enough space to allow
of the data of the array.
So after we check that sb->size is still available, only reduce the
'reserved', don't increase it.

This fixes a bug where --adding a spare fails because it does not have
enough space in it.

Reported-by: nowhere <nowhere@hakkenden.ath.cx>
Signed-off-by: NeilBrown <neilb@suse.de>
super1.c