[PATCH] md: choose better default offset for bitmap.
authorNeilBrown <neilb@suse.de>
Fri, 9 Sep 2005 23:23:58 +0000 (16:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 23:39:13 +0000 (16:39 -0700)
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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c

index 30e3624f3d9054b18bf57fe11d3dc25ca0b5923d..fd66c39589420f1dc54d706b032206effa9f227b 100644 (file)
@@ -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);