From: NeilBrown Date: Tue, 20 Dec 2011 04:01:53 +0000 (+1100) Subject: super1: getinfo_super should set write-mostly flag. X-Git-Tag: mdadm-3.2.3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb0997242cd617c2c78295693af386add40b6ce2;p=thirdparty%2Fmdadm.git 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 --- 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;