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:
parent
8ca586c619
commit
d8def61cfa
2
Manage.c
2
Manage.c
|
@ -341,6 +341,8 @@ int Manage_subdevs(char *devname, int fd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (dv->writemostly)
|
||||||
|
disc.state |= (1 << MD_DISK_WRITEMOSTLY);
|
||||||
if (ioctl(fd,ADD_NEW_DISK, &disc)) {
|
if (ioctl(fd,ADD_NEW_DISK, &disc)) {
|
||||||
fprintf(stderr, Name ": add new device failed for %s as %d: %s\n",
|
fprintf(stderr, Name ": add new device failed for %s as %d: %s\n",
|
||||||
dv->devname, j, strerror(errno));
|
dv->devname, j, strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue