Skip to contentSkip to conversation

Change the option from NoUpdate to NodeNumUpdate

PATCH Applied Guoqing Jiang 3 participants 3 messages Mar 24, 2016 – Nov 4, 2016 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change the option from NoUpdate to NodeNumUpdate

Actually, we need to use NodeNumUpdate here to
ensure there are enough spaces for those nodes.

---
 Grow.c   | 2 +-
 super1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Grow.c +1 -1
index 5953db2..f58c753 100755
@@ -425,7 +425,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
 						    bitmapsize, offset_setable,
 						    major)
 						)
-						st->ss->write_bitmap(st, fd2, NoUpdate);
+						st->ss->write_bitmap(st, fd2, NodeNumUpdate);
 					else {
 						pr_err("failed to create internal bitmap - chunksize problem.\n");
 						close(fd2);
super1.c +1 -1
index baa9a96..d6f3c93 100644
@@ -1867,7 +1867,7 @@ static int write_init_super1(struct supertype *st)
 		}
 
 		if (rv == 0 && (__le32_to_cpu(sb->feature_map) & 1))
-			rv = st->ss->write_bitmap(st, di->fd, NoUpdate);
+			rv = st->ss->write_bitmap(st, di->fd, NodeNumUpdate);
 		close(di->fd);
 		di->fd = -1;
 		if (rv)
Signature · 1 line
2.6.2
Applied
#1 lore raw
Quoted 8 lines · Guoqing Jiang

Actually, we need to use NodeNumUpdate here to
ensure there are enough spaces for those nodes.

---
 Grow.c   | 2 +-
 super1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied!

Thanks,
Jes

#2 lore raw
In reply to Guoqing Jiang
Quoted 27 lines · Guoqing Jiang

Actually, we need to use NodeNumUpdate here to
ensure there are enough spaces for those nodes.

---
 Grow.c   | 2 +-
 super1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Grow.c +1 -1
index 5953db2..f58c753 100755
@@ -425,7 +425,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
 						    bitmapsize, offset_setable,
 						    major)
 						)
-						st->ss->write_bitmap(st, fd2, NoUpdate);
+						st->ss->write_bitmap(st, fd2, NodeNumUpdate);
 					else {
 						pr_err("failed to create internal bitmap - chunksize problem.\n");
 						close(fd2);
super1.c +0 -0
index baa9a96..d6f3c93 100644

super1.c static int write_init_super1(struct supertype *st) · line 1870

Quoted 5 lines
super1.c +1 -1
@@ -1867,7 +1867,7 @@ static int write_init_super1(struct supertype *st)
 		}
 
 		if (rv == 0 && (__le32_to_cpu(sb->feature_map) & 1))
-			rv = st->ss->write_bitmap(st, di->fd, NoUpdate);
+			rv = st->ss->write_bitmap(st, di->fd, NodeNumUpdate);

This is wrong.
It might be correct for a clustered array, but it caused failure for non-clustered arrays.
If you run the mdadm self tests, several will fail with errors like

mdadm: Warning: cluster md only works with superblock 1.2
mdadm: Warning: cluster md only works with superblock 1.2
mdadm: failed to set internal bitmap.

Reverting this commit made the errors go away.

NeilBrown

Quoted 10 lines
super1.c +0 -0
 		close(di->fd);
 		di->fd = -1;
 		if (rv)
Signature · 6 lines
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html