OSDN Git Service

md: notify about new spare disk in the container
authorAlexey Obitotskiy <aleksey.obitotskiy@intel.com>
Fri, 28 Jul 2017 13:49:25 +0000 (15:49 +0200)
committerShaohua Li <shli@fb.com>
Fri, 25 Aug 2017 17:21:45 +0000 (10:21 -0700)
In case of external metadata arrays spare disks are added to containers
first. mdadm keeps monitoring /proc/mdstat output and when spare disk is
available, it moves it from the container to the array. The problem is
there is no notification of new spare disk in the container and mdadm
waits a long time (until timeout) before it takes the action.

Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c

index b01e458..95c0b64 100644 (file)
@@ -4283,6 +4283,8 @@ new_dev_store(struct mddev *mddev, const char *buf, size_t len)
        if (err)
                export_rdev(rdev);
        mddev_unlock(mddev);
+       if (!err)
+               md_new_event(mddev);
        return err ? err : len;
 }