FIX: monitor doesn't handshake with md

when in container are present raid0 and raid5 arrays, and reshape order is:
1. raid0 array
2. raid5 array

mdadm cannot set new raid_disks for raid0 array. For this action md has to have
handshake with mdmon. We have the following conditions:
1. Raid0 is not monitored
2. raid0 has been just takeovered to raid4/5 (it has to be monitored
3. monitor has to start monitor new raid4/5 array
4. monitor is not started (it is started to second raid5 array)
In such situation pig_monitor is required to let know to m monitor about new array
(not in the starting monitor case only)

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-01-27 07:31:25 +11:00 committed by NeilBrown
parent 96234762a6
commit 16d4d84e5d
1 changed files with 6 additions and 6 deletions

12
Grow.c
View File

@ -1657,14 +1657,14 @@ static int reshape_array(char *container, int fd, char *devname,
fprintf(stderr, Name ": level of %s changed to %s\n",
devname, c);
orig_level = info->array.level;
}
if (reshape.level > 0 && st->ss->external &&
!mdmon_running(st->container_dev)) {
start_mdmon(st->container_dev);
ping_monitor(container);
if (reshape.level > 0 && st->ss->external) {
/* make sure mdmon is aware of the new level */
if (!mdmon_running(st->container_dev))
start_mdmon(st->container_dev);
ping_monitor(container);
}
}
/* ->reshape_super might have chosen some spares from the
* container that it wants to be part of the new array.
* We can collect them with ->container_content and give