Skip to contentSkip to conversation

MD: Bitmap version cleanup.

PATCH In review Andrei Warkentin 2 participants 2 messages Jan 15, 2012 – Apr 10, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MD: Bitmap version cleanup.

bitmap_new_disk_sb() would still create V3 bitmap superblock with host-endian layout.

Perhaps I'm confused, but shouldn't bitmap_new_disk_sb() be creating a V4 bitmap superblock instead, that is portable, as per comment in bitmap.h? BITMAP_MINOR was also unused.

---
 drivers/md/bitmap.c |    3 ---
 drivers/md/bitmap.h |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)
drivers/md/bitmap.c +0 -3
index 045e086..e786da6 100644
@@ -568,9 +568,6 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)
 	bitmap->events_cleared = bitmap->mddev->events;
 	sb->events_cleared = cpu_to_le64(bitmap->mddev->events);
 
-	bitmap->flags |= BITMAP_HOSTENDIAN;
-	sb->version = cpu_to_le32(BITMAP_MAJOR_HOSTENDIAN);
-
 	kunmap_atomic(sb);
 
 	return 0;
drivers/md/bitmap.h +0 -2
index a15436d..af588ac 100644
@@ -13,8 +13,6 @@
 #define BITMAP_MAJOR_HI 4
 #define	BITMAP_MAJOR_HOSTENDIAN 3
 
-#define BITMAP_MINOR 39
-
 /*
  * in-memory bitmap:
  *
Signature · 1 line
1.7.8.3
#1 lore raw
Quoted 32 lines · On Sun, 15 Jan 2012 03:09:46 -0500 Andrei Warkentin…

bitmap_new_disk_sb() would still create V3 bitmap superblock with host-endian layout.

Perhaps I'm confused, but shouldn't bitmap_new_disk_sb() be creating a V4 bitmap superblock instead, that is portable, as per comment in bitmap.h? BITMAP_MINOR was also unused.

---
 drivers/md/bitmap.c |    3 ---
 drivers/md/bitmap.h |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)
drivers/md/bitmap.c +0 -3
index 045e086..e786da6 100644
@@ -568,9 +568,6 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)
 	bitmap->events_cleared = bitmap->mddev->events;
 	sb->events_cleared = cpu_to_le64(bitmap->mddev->events);
 
-	bitmap->flags |= BITMAP_HOSTENDIAN;
-	sb->version = cpu_to_le32(BITMAP_MAJOR_HOSTENDIAN);
-
 	kunmap_atomic(sb);
 
 	return 0;
drivers/md/bitmap.h +0 -0
index a15436d..af588ac 100644

drivers/md/bitmap.h line 18

Quoted 8 lines
drivers/md/bitmap.h +0 -2
@@ -13,8 +13,6 @@
 #define BITMAP_MAJOR_HI 4
 #define	BITMAP_MAJOR_HOSTENDIAN 3
 
-#define BITMAP_MINOR 39
-
 /*
  * in-memory bitmap:
  *

Yes, you are exactly correct. I've applied that patch (and less than three months since you sent it - not bad [no, not bad: terrible!])

Thanks,
NeilBrown