All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Incremental: don't try to load_container() for a subarray
@ 2016-08-09  8:05 Artur Paszkiewicz
  2016-08-09 14:58 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Paszkiewicz @ 2016-08-09  8:05 UTC (permalink / raw)
  To: jes.sorensen; +Cc: linux-raid, Artur Paszkiewicz

mdadm -IRs would exit with a non-zero status because of this.

Reported-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
---
 Incremental.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Incremental.c b/Incremental.c
index ba97b00..cc01d41 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -1347,8 +1347,12 @@ restart:
 
 		if (devnm && strcmp(devnm, me->devnm) != 0)
 			continue;
-		if (devnm && me->metadata[0] == '/') {
+		if (me->metadata[0] == '/') {
 			char *sl;
+
+			if (!devnm)
+				continue;
+
 			/* member array, need to work on container */
 			strncpy(container, me->metadata+1, 32);
 			container[31] = 0;
-- 
2.9.2


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

* Re: [PATCH] Incremental: don't try to load_container() for a subarray
  2016-08-09  8:05 [PATCH] Incremental: don't try to load_container() for a subarray Artur Paszkiewicz
@ 2016-08-09 14:58 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2016-08-09 14:58 UTC (permalink / raw)
  To: Artur Paszkiewicz; +Cc: linux-raid

Artur Paszkiewicz <artur.paszkiewicz@intel.com> writes:
> mdadm -IRs would exit with a non-zero status because of this.
>
> Reported-by: Xiao Ni <xni@redhat.com>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
>  Incremental.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Applied!

Thanks,
Jes

> diff --git a/Incremental.c b/Incremental.c
> index ba97b00..cc01d41 100644
> --- a/Incremental.c
> +++ b/Incremental.c
> @@ -1347,8 +1347,12 @@ restart:
>  
>  		if (devnm && strcmp(devnm, me->devnm) != 0)
>  			continue;
> -		if (devnm && me->metadata[0] == '/') {
> +		if (me->metadata[0] == '/') {
>  			char *sl;
> +
> +			if (!devnm)
> +				continue;
> +
>  			/* member array, need to work on container */
>  			strncpy(container, me->metadata+1, 32);
>  			container[31] = 0;

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

end of thread, other threads:[~2016-08-09 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09  8:05 [PATCH] Incremental: don't try to load_container() for a subarray Artur Paszkiewicz
2016-08-09 14:58 ` Jes Sorensen

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.