Verified exists in 3.1.4 and 3.2.2.

Attached patch is against 3.2.2 code.
Description: --add incorrectly sets writemostly
Forwarded: TBD
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628667
Bug-Debian: http://bugs.debian.org/628667
Author: Scott Schaefer <saschae...@neurodiverse.org> 
Last-Update: 2011-07-30

diff --git a/super1.c b/super1.c
--- a/super1.c
+++ b/super1.c
@@ -1030,6 +1030,8 @@
 		sb->dev_number = __cpu_to_le32(di->disk.number);
 		if (di->disk.state & (1<<MD_DISK_WRITEMOSTLY))
 			sb->devflags |= __cpu_to_le32(WriteMostly1);
+		else
+			sb->devflags &= ~(__cpu_to_le32(WriteMostly1));
 
 		if ((rfd = open("/dev/urandom", O_RDONLY)) < 0 ||
 		    read(rfd, sb->device_uuid, 16) != 16) {

Reply via email to