]> git.ipfire.org Git - thirdparty/mdadm.git/commit
restripe: make sure zero buffer is always large enough.
authorNeilBrown <neilb@suse.de>
Tue, 5 Apr 2011 11:43:52 +0000 (21:43 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 5 Apr 2011 11:43:52 +0000 (21:43 +1000)
commitd47a29257a189ffb9a85a0c39df4873a306be385
tree81a06b27acd3b12408041618aaedf4c56acbab60
parent64385908bbec982d4d6cddd313c7594499087126
restripe: make sure zero buffer is always large enough.

If restripe is called to restore stripes of one size and then
save stripes with a larger chunk size, the 'zero' buffer will not
be large enough and a double-degraded RAID6 will over-run the buffer.

So record the current size of the zero buffer and use it when deciding
if we need to allocate a new buffer.

Reported-by: Brad Campbell <lists2009@fnarfbargle.com>
Signed-off-by: NeilBrown <neilb@suse.de>
restripe.c