]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
super1: getinfo_super should set write-mostly flag.
authorNeilBrown <neilb@suse.de>
Tue, 20 Dec 2011 04:01:53 +0000 (15:01 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 20 Dec 2011 04:01:53 +0000 (15:01 +1100)
Otherwise it is not preserved when you re-add a device to
an array.

Signed-off-by: NeilBrown <neilb@suse.de>
super1.c

index 9a72681ff13dfce1af896fa57fe30ef7f6ca2396..553dc0a7967a82164c47a45aad0f71ec3e65f16c 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -600,6 +600,8 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info, char *map)
                info->disk.state = 6; /* active and in sync */
                info->disk.raid_disk = role;
        }
+       if (sb->devflags & WriteMostly1)
+               info->disk.state |= (1 << MD_DISK_WRITEMOSTLY);
        info->events = __le64_to_cpu(sb->events);
        sprintf(info->text_version, "1.%d", st->minor_version);
        info->safe_mode_delay = 200;