mdadm 2.4: fix write mostly for add and re-add
PATCH 1/1 mdadm 2.4: 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.
Thanks,
Paul
Signed-off-by Paul Clements <[email protected]>
Manage.c | 2 ++ 1 files changed, 2 insertions(+)
Manage.c +2 -0
@@ -341,6 +341,8 @@ int Manage_subdevs(char *devname, int fdbreak ; } } +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));
Quoted 3 lines · On Friday March 31, [email protected] wrote:
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. It'll be in the next release.
NeilBrown
Quoted 19 lines
Thanks,
PaulSigned-off-by Paul Clements <[email protected]>Manage.c | 2 ++ 1 files changed, 2 insertions(+)Manage.c +2
-0@@ -341,6 +341,8 @@ int Manage_subdevs(char *devname, int fdbreak ; } } +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));