]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super1: make write_bitmap1 compatible with previous mdadm versions
authorGuoqing Jiang <gqjiang@suse.com>
Wed, 12 Oct 2016 06:24:07 +0000 (02:24 -0400)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 19 Oct 2016 15:21:15 +0000 (11:21 -0400)
commit119b66a47320ea906e43488de719f7173cb7286c
treeb6100dc8a7c443775a8894afd3ae16e602c1fe7b
parent681b7ae245db80b24d45abdc3f5040c796aa29cc
super1: make write_bitmap1 compatible with previous mdadm versions

For older mdadm version, v1.x metadata has different bitmap_offset,
we can't ensure all the bitmaps are on a 4K boundary since writing
4K for bitmap could corrupt the superblock, and Anthony reported
the bug about it at below link.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837964

So let's check about the alignment for bitmap_offset before set
the boundary to 4096 unconditionally. Thanks for Neil's detailed
explanation.

Reported-by: Anthony DeRobertis <anthony@derobert.net>
Fixes: 95a05b37e8eb ("Create n bitmaps for clustered mode")
Cc: Neil Brown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
super1.c