Thread (10 messages) 10 messages, 3 authors, 2012-04-09
STALE5205d

[PATCH 4/4] imsm: monitor: do not finish recovery, when raid goes to read-only

From: Przemyslaw Czarnowski <hidden>
Date: 2012-04-05 15:31:26
Subsystem: the rest · Maintainer: Linus Torvalds

If kernel forces raid to be read-only (eg. during reboot, and root
partition lies on array) monitor should not finish recovery and leave
metadata untouched.

Signed-off-by: Przemyslaw Czarnowski <redacted>
---
 monitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/monitor.c b/monitor.c
index c987d10..6a736a0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -304,6 +304,7 @@ static int read_and_act(struct active_array *a)
 	}
 
 	if (!deactivate &&
+	    a->curr_state != readonly &&
 	    a->curr_action == idle &&
 	    a->prev_action == recover) {
 		/* A recovery has finished.  Some disks may be in sync now,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help