All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Change the option from NoUpdate to NodeNumUpdate
@ 2016-03-24 10:00 Guoqing Jiang
  2016-03-24 16:33 ` Jes Sorensen
  2016-11-04  5:35 ` NeilBrown
  0 siblings, 2 replies; 3+ messages in thread
From: Guoqing Jiang @ 2016-03-24 10:00 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: linux-raid, Guoqing Jiang

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

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
 Grow.c   | 2 +-
 super1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Grow.c b/Grow.c
index 5953db2..f58c753 100755
--- a/Grow.c
+++ b/Grow.c
@@ -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);
diff --git a/super1.c b/super1.c
index baa9a96..d6f3c93 100644
--- a/super1.c
+++ b/super1.c
@@ -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)
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Change the option from NoUpdate to NodeNumUpdate
  2016-03-24 10:00 [PATCH] Change the option from NoUpdate to NodeNumUpdate Guoqing Jiang
@ 2016-03-24 16:33 ` Jes Sorensen
  2016-11-04  5:35 ` NeilBrown
  1 sibling, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2016-03-24 16:33 UTC (permalink / raw)
  To: Guoqing Jiang; +Cc: linux-raid

Guoqing Jiang <gqjiang@suse.com> writes:
> Actually, we need to use NodeNumUpdate here to
> ensure there are enough spaces for those nodes.
>
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
>  Grow.c   | 2 +-
>  super1.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied!

Thanks,
Jes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Change the option from NoUpdate to NodeNumUpdate
  2016-03-24 10:00 [PATCH] Change the option from NoUpdate to NodeNumUpdate Guoqing Jiang
  2016-03-24 16:33 ` Jes Sorensen
@ 2016-11-04  5:35 ` NeilBrown
  1 sibling, 0 replies; 3+ messages in thread
From: NeilBrown @ 2016-11-04  5:35 UTC (permalink / raw)
  To: Guoqing Jiang, Jes.Sorensen; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]

On Thu, Mar 24 2016, Guoqing Jiang wrote:

> Actually, we need to use NodeNumUpdate here to
> ensure there are enough spaces for those nodes.
>
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
>  Grow.c   | 2 +-
>  super1.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Grow.c b/Grow.c
> index 5953db2..f58c753 100755
> --- a/Grow.c
> +++ b/Grow.c
> @@ -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);
> diff --git a/super1.c b/super1.c
> index baa9a96..d6f3c93 100644
> --- a/super1.c
> +++ b/super1.c
> @@ -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


>  		close(di->fd);
>  		di->fd = -1;
>  		if (rv)
> -- 
> 2.6.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-04  5:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24 10:00 [PATCH] Change the option from NoUpdate to NodeNumUpdate Guoqing Jiang
2016-03-24 16:33 ` Jes Sorensen
2016-11-04  5:35 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.