Bug#445573: auto-ro raids have 'recover' for sync-action

Neil Brown neilb at suse.de
Mon Oct 8 01:31:07 UTC 2007


On Sunday October 7, madduck at debian.org wrote:
> Package: mdadm
> Version: 2.6.2-1
> Severity: normal
> Tags: upstream
> 
> sync_action cannot deal with auto-read-only, it seems. Neil, can you
> please confirm that you saw this?

Yep, this is a kernel bug.

This should fix it.

NeilBrown


Signed-off-by: Neil Brown <neilb at suse.de>

### Diffstat output
 ./drivers/md/md.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c	2007-08-20 11:36:09.000000000 +1000
+++ ./drivers/md/md.c	2007-10-08 11:20:00.000000000 +1000
@@ -2723,7 +2723,7 @@ action_show(mddev_t *mddev, char *page)
 {
 	char *type = "idle";
 	if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
-	    test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) {
+	    (!mddev->ro && test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))) {
 		if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
 			type = "reshape";
 		else if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {






More information about the pkg-mdadm-devel mailing list