]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super1.c
super1: fix setting bad block log offset in write_init_super1()
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Thu, 10 Nov 2016 10:50:54 +0000 (11:50 +0100)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 16 Nov 2016 14:58:19 +0000 (09:58 -0500)
commit1b7eb672f7792313cc1517feaae8267575fc496b
treed087d5737f6746d7694d9b0576e4357753ff571a
parent561ad5597bf472f8114260d144a5e8ba5c7246d5
super1: fix setting bad block log offset in write_init_super1()

Commit f79bbf4f6904 ("super1: don't put the bblog at the end of the free
space.") changed the location of the bad block log to be after the
write-intent bitmap, but a fixed offset was used and it can make bbl
overlap with the bitmap, especially when using a small bitmap chunk.
This patch changes it to use the actual offset and size of the bitmap.
It also joins the cases for v1.1 and v1.2 superblock because the code
was very similar.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
super1.c