diff options
author | NeilBrown <neilb@suse.de> | 2008-07-18 16:37:25 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-07-18 16:37:25 +1000 |
commit | ada6c2390a0a3a4572a8931823e6a83874d54509 (patch) | |
tree | 67b592b0748fe97d3835647e7c34977ef95f85f6 /Manage.c | |
parent | 4b9d39fc17b2449bfc8c696e5137cefd676841c2 (diff) |
Manage: sync with mdmon before stopping containers.
mdmon sometimes opens the container. That will prevent 'stop'
from working. So sync with mdmon first.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Manage.c')
-rw-r--r-- | Manage.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -144,6 +144,15 @@ int Manage_runstop(char *devname, int fd, int runstop, int quiet) ping_monitor(mdi->text_version+1); fd = open(devname, O_RDONLY); + } else if (mdi && + mdi->array.major_version == -1 && + mdi->array.minor_version == -2 && + mdi->text_version[0] != '/') { + /* container, possibly mdmon-managed. + * Make sure mdmon isn't opening it, which + * would interfere with the 'stop' + */ + ping_monitor(mdi->sys_name); } if (mdi) sysfs_free(mdi); |