]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: Handle growth of v1.x metadata correctly.
authorNeil Brown <neilb@suse.de>
Thu, 6 Aug 2009 05:53:57 +0000 (15:53 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Aug 2009 21:18:57 +0000 (14:18 -0700)
commitf3b3108f63f7a25f21335555bec0929d6ea3f327
tree7fa040d0647968c93e6868d2153b5f3f8dde9687
parent731663efa41227703ec74f82233215ce7194bc1d
md: Handle growth of v1.x metadata correctly.

commit 70471dafe3390243c598a3165dfb86b8b8b3f4fe upstream.

The v1.x metadata does not have a fixed size and can grow
when devices are added.
If it grows enough to require an extra sector of storage,
we need to update the 'sb_size' to match.

Without this, md can write out an incomplete superblock with a
bad checksum, which will be rejected when trying to re-assemble
the array.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/md.c