Skip to contentSkip to conversation

Add number of nodes to bitmap structure for clustering

PATCH In review Goldwyn Rodrigues 2 participants 3 messages Dec 18, 2014 – Feb 23, 2015 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 2/24 Add number of nodes to bitmap structure for clustering

---
 drivers/md/bitmap.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/md/bitmap.h +3 -2
index 30210b9..6872945 100644
@@ -128,10 +128,11 @@ typedef struct bitmap_super_s {
 	__le32 chunksize;    /* 52  the bitmap chunk size in bytes */
 	__le32 daemon_sleep; /* 56  seconds between disk flushes */
 	__le32 write_behind; /* 60  number of outstanding write-behind writes */
-	__le32 sectors_reserved; /* 64 number of 512-byte sectors that are
+	__le32 nodes;        /* 64 the maximum number of nodes in cluster. */
+	__le32 sectors_reserved; /* 68 number of 512-byte sectors that are
 				  * reserved for the bitmap. */
 
-	__u8  pad[256 - 68]; /* set to zero */
+	__u8  pad[256 - 72]; /* set to zero */
 } bitmap_super_t;
 
 /* notes:
Signature · 1 line
2.1.2
#1 lore raw
Quoted 13 lines · On Thu, 18 Dec 2014 10:15:23 -0600 Goldwyn Rodrigues <[email protected]> wrote:
---
 drivers/md/bitmap.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/md/bitmap.h +0 -0
index 30210b9..6872945 100644
@@ -128,10 +128,11 @@ typedef struct bitmap_super_s {
 	__le32 chunksize;    /* 52  the bitmap chunk size in bytes */
 	__le32 daemon_sleep; /* 56  seconds between disk flushes */
 	__le32 write_behind; /* 60  number of outstanding write-behind writes */

drivers/md/bitmap.h typedef struct bitmap_super_s { · line 138

Quoted 10 lines
drivers/md/bitmap.h +3 -2
-	__le32 sectors_reserved; /* 64 number of 512-byte sectors that are
+	__le32 nodes;        /* 64 the maximum number of nodes in cluster. */
+	__le32 sectors_reserved; /* 68 number of 512-byte sectors that are
 				  * reserved for the bitmap. */
 
-	__u8  pad[256 - 68]; /* set to zero */
+	__u8  pad[256 - 72]; /* set to zero */
 } bitmap_super_t;
 
 /* notes:

Hi Goldwyn,
I was reviewing you latest series to make sure it wouldn't affect the non-clustered use case at all, and I found this. I really should have noticed it earlier....

You are changing the location of 'sectors_reserved' in the bitmap superblock. That obviously cannot be allowed - new fields must always be added to the end.

Can you update the series in git to fix that please? Then I will pull it in for -next.

Thanks,
NeilBrown

#2 lore raw

Hi Neil,

Quoted 31 lines · NeilBrown
Quoted 13 lines · On Thu, 18 Dec 2014 10:15:23 -0600 Goldwyn Rodrigues <[email protected]> wrote:
---
  drivers/md/bitmap.h | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
drivers/md/bitmap.h +0 -0
index 30210b9..6872945 100644
@@ -128,10 +128,11 @@ typedef struct bitmap_super_s {
  	__le32 chunksize;    /* 52  the bitmap chunk size in bytes */
  	__le32 daemon_sleep; /* 56  seconds between disk flushes */
  	__le32 write_behind; /* 60  number of outstanding write-behind writes */

drivers/md/bitmap.h typedef struct bitmap_super_s { · line 138

Quoted 10 lines
drivers/md/bitmap.h +3 -2
-	__le32 sectors_reserved; /* 64 number of 512-byte sectors that are
+	__le32 nodes;        /* 64 the maximum number of nodes in cluster. */
+	__le32 sectors_reserved; /* 68 number of 512-byte sectors that are
  				  * reserved for the bitmap. */
 
-	__u8  pad[256 - 68]; /* set to zero */
+	__u8  pad[256 - 72]; /* set to zero */
  } bitmap_super_t;
 
  /* notes:

Hi Goldwyn,
I was reviewing you latest series to make sure it wouldn't affect the non-clustered use case at all, and I found this. I really should have noticed it earlier....

Quoted 3 lines

You are changing the location of 'sectors_reserved' in the bitmap superblock. That obviously cannot be allowed - new fields must always be added to the end.

Oops. Sorry.

Quoted 3 lines

Can you update the series in git to fix that please? Then I will pull it in for -next.

I have done this and re-tested. However, I also rebased against upstream. There were some conflicts with respect to md_personality. I have re-done those patches, but it would be worth a second look. The one which may need special review attention is "bitmap_create returns bitmap pointer"

Regards,

Signature · 1 line
Goldwyn