From cb0997242cd617c2c78295693af386add40b6ce2 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 20 Dec 2011 15:01:53 +1100 Subject: [PATCH] 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 --- super1.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2