Monitor: Include containers in spare migration
PATCH v2 1/1 Monitor: Include containers in spare migration
Spare migration doesn't work for external metadata. mdadm skips a container with spare device because it is inactive. It used to work because GET_ARRAY_INFO ioctl returned valid structure for a container and mdadm treated such response as active container. Current implementation checks it in sysfs where container is shown as inactive.
Adapt sysfs implementation to work the same way as ioctl.
--- Monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Monitor.c +1 -1
@@ -497,7 +497,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,if (mse->level ==NULL ) is_container =1 ; -if (!md_array_active (fd)) +if (!is_container && !md_array_active (fd)) goto disappeared;fcntl (fd,F_SETFD ,FD_CLOEXEC );
Signature · 1 line
1.8.3.1
Jes Sorensen
AppliedQuoted 6 lines · Mariusz Tkaczyk
Spare migration doesn't work for external metadata. mdadm skips a container with spare device because it is inactive. It used to work because
GET_ARRAY_INFOioctl returned valid structure for a container and mdadm treated such response as active container. Current implementation checks it in sysfs where container is shown as inactive.
Quoted 6 lines
Adapt sysfs implementation to work the same way as ioctl.
Signed-off-by Mariusz Tkaczyk <[email protected]>--- Monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied!
Thanks,
Jes