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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx>
---
 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,

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux