[PATCH 12/21] WORKAROUND: md reports idle state during reshape start
From: Adam Kwolek <hidden>
Date: 2010-11-23 12:41:16
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Adam Kwolek <hidden>
Date: 2010-11-23 12:41:16
Subsystem:
the rest · Maintainer:
Linus Torvalds
md reports reshape->idle->reshape states transition on reshape start, so reshape finalization is wrongly indicated. Finalize reshape when we have any progress only, When reshape is really started, idle state causes reshape finalization as usually. Signed-off-by: Adam Kwolek <redacted> --- mdadm/mdadm/monitor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mdadm/mdadm/monitor.c b/mdadm/mdadm/monitor.c
index f8ddba7..4cd634d 100644
--- a/mdadm/mdadm/monitor.c
+++ b/mdadm/mdadm/monitor.c@@ -332,7 +332,8 @@ static int read_and_act(struct active_array *a) /* finalize reshape detection */ if ((a->curr_action != reshape) && - (a->prev_action == reshape)) { + (a->prev_action == reshape) && + (a->info.reshape_progress > 2)) { /* set zero to allow for future rebuilds */ a->reshape_delta_disks = RESHAPE_NOT_ACTIVE;