Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53e87fbb authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds
Browse files

[PATCH] md: choose better default offset for bitmap.



On reflection, a better default location for hot-adding bitmaps with version-1
superblocks is immediately after the superblock.  There might not be much room
there, but there is usually atleast 3k, and that is a good start.

Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 500af87a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -957,8 +957,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
		mddev->events = le64_to_cpu(sb->events);
		mddev->bitmap_offset = 0;
		mddev->default_bitmap_offset = 0;
		if (mddev->minor_version == 0)
			mddev->default_bitmap_offset = -(64*1024)/512;
		mddev->default_bitmap_offset = 1024;
		
		mddev->recovery_cp = le64_to_cpu(sb->resync_offset);
		memcpy(mddev->uuid, sb->set_uuid, 16);