summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-12-20 05:01:53 +0100
committerNeilBrown <neilb@suse.de>2011-12-20 05:01:53 +0100
commitcb0997242cd617c2c78295693af386add40b6ce2 (patch)
tree3483c4a7c5615b3ac17bfbd4d6c11259963a0a86
parentimsm: make messages more understandable (diff)
downloadmdadm-cb0997242cd617c2c78295693af386add40b6ce2.tar.xz
mdadm-cb0997242cd617c2c78295693af386add40b6ce2.zip
super1: getinfo_super should set write-mostly flag.
Otherwise it is not preserved when you re-add a device to an array. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 9a72681f..553dc0a7 100644
--- 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;