Skip to contentSkip to conversation

imsm: don't call abort_reshape() in imsm_manage_reshape()

PATCH RESEND In review Artur Paszkiewicz 2 participants 2 messages Oct 5, 2015 – Oct 8, 2015 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 imsm: don't call abort_reshape() in imsm_manage_reshape()

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

---
 super-intel.c | 1 -
 1 file changed, 1 deletion(-)
super-intel.c +0 -1
index 95a72b6..e609e0c 100644
@@ -10601,7 +10601,6 @@ static int imsm_manage_reshape(
 	ret_val = 1;
 abort:
 	free(buf);
-	abort_reshape(sra);
 
 	return ret_val;
 }
Signature · 1 line
2.1.4
#1 lore raw
Quoted 29 lines · Artur Paszkiewicz

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

---
 super-intel.c | 1 -
 1 file changed, 1 deletion(-)
super-intel.c +0 -1
index 95a72b6..e609e0c 100644
@@ -10601,7 +10601,6 @@ static int imsm_manage_reshape(
 	ret_val = 1;
 abort:
 	free(buf);
-	abort_reshape(sra);
 
 	return ret_val;
 }
Signature · 1 line
2.1.4

Thanks for the resend.
Applied now.

NeilBrown