linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] imsm: don't call abort_reshape() in imsm_manage_reshape()
@ 2015-10-05 13:18 Artur Paszkiewicz
  2015-10-08  4:23 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Paszkiewicz @ 2015-10-05 13:18 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, Artur Paszkiewicz, Konrad Dabrowski

Calling abort_reshape() in imsm_manage_reshape() is unnecessary in case
of an error because it is handled by reshape_array(). Calling it when
reshape completes successfully is also unnecessary and leads to a race
condition:
- reshape ends
- mdadm calls abort_reshape() -> sets sync_action to idle
- MD_RECOVERY_INTR is set and md_reap_sync_thread() does not finish the
  reshape

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Konrad Dabrowski <konrad.dabrowski@intel.com>
---
 super-intel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/super-intel.c b/super-intel.c
index 95a72b6..e609e0c 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10601,7 +10601,6 @@ static int imsm_manage_reshape(
 	ret_val = 1;
 abort:
 	free(buf);
-	abort_reshape(sra);
 
 	return ret_val;
 }
-- 
2.1.4


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

* Re: [PATCH RESEND] imsm: don't call abort_reshape() in imsm_manage_reshape()
  2015-10-05 13:18 [PATCH RESEND] imsm: don't call abort_reshape() in imsm_manage_reshape() Artur Paszkiewicz
@ 2015-10-08  4:23 ` Neil Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2015-10-08  4:23 UTC (permalink / raw)
  Cc: linux-raid, Artur Paszkiewicz, Konrad Dabrowski

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

Artur Paszkiewicz <artur.paszkiewicz@intel.com> writes:

> Calling abort_reshape() in imsm_manage_reshape() is unnecessary in case
> of an error because it is handled by reshape_array(). Calling it when
> reshape completes successfully is also unnecessary and leads to a race
> condition:
> - reshape ends
> - mdadm calls abort_reshape() -> sets sync_action to idle
> - MD_RECOVERY_INTR is set and md_reap_sync_thread() does not finish the
>   reshape
>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> Signed-off-by: Konrad Dabrowski <konrad.dabrowski@intel.com>
> ---
>  super-intel.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 95a72b6..e609e0c 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -10601,7 +10601,6 @@ static int imsm_manage_reshape(
>  	ret_val = 1;
>  abort:
>  	free(buf);
> -	abort_reshape(sra);
>  
>  	return ret_val;
>  }
> -- 
> 2.1.4

Thanks for the resend.
Applied now.

NeilBrown

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

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

end of thread, other threads:[~2015-10-08  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 13:18 [PATCH RESEND] imsm: don't call abort_reshape() in imsm_manage_reshape() Artur Paszkiewicz
2015-10-08  4:23 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).