linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mdadm 2.4: fix write mostly for add and re-add
@ 2006-04-01  3:02 Paul Clements
  2006-04-03  0:12 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Clements @ 2006-04-01  3:02 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

The following patch makes it possible to tag a device as write-mostly on 
--add and --re-add with a non-persistent superblock array. Previously, 
this was not working.

Thanks,
Paul

[-- Attachment #2: mdadm-2.4-fix-write-mostly.diff --]
[-- Type: text/plain, Size: 563 bytes --]


Signed-Off-By: Paul Clements <paul.clements@steeleye.com>

 Manage.c |    2 ++
 1 files changed, 2 insertions(+)
--- mdadm-2.4/Manage.c	2006-03-28 01:11:11.000000000 -0500
+++ mdadm-2.4-fix-write-mostly/Manage.c	2006-03-31 21:56:37.000000000 -0500
@@ -341,6 +341,8 @@ int Manage_subdevs(char *devname, int fd
 						break;
 					}
 			}
+			if (dv->writemostly)
+				disc.state |= (1 << MD_DISK_WRITEMOSTLY);
 			if (ioctl(fd,ADD_NEW_DISK, &disc)) {
 				fprintf(stderr, Name ": add new device failed for %s as %d: %s\n",
 					dv->devname, j, strerror(errno));

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-03  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-01  3:02 [PATCH] mdadm 2.4: fix write mostly for add and re-add Paul Clements
2006-04-03  0:12 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).