From: NeilBrown Date: Fri, 9 Sep 2005 23:23:58 +0000 (-0700) Subject: [PATCH] md: choose better default offset for bitmap. X-Git-Tag: v2.6.14-rc1~233 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=53e87fbb5dc887766229eef3ba8bd8ab8853b066;p=linux-2.6-omap-h63xx.git [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: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 30e3624f3d9..fd66c395894 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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);