]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super1.c
super1: getinfo_super should set write-mostly flag.
[thirdparty/mdadm.git] / 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;