fix write mostly for add and re-add

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.

Signed-Off-By: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2006-04-03 00:11:51 +00:00
parent 8ca586c619
commit d8def61cfa
1 changed files with 2 additions and 0 deletions

View File

@ -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));