The sysfs name is not set after assembling imsm array. So sysfs_uevent
can't send the change event. The raid device's state depends on the
genuine events from the kernel. If the kernel geniune event is sent
after udev_unblock, the raid can be ready on time. Then the it can be
mounted during boot rightly. If the kernel geniune event is sent
before udev_unblock, the mount will fail during boot.
Signed-off-by: <xni@redhat.com>
for (ra = list ; ra ; ra = ra->next) {
int mdfd = -1;
char chosen_name[1024];
+ char *sysname;
struct map_ent *mp;
struct mddev_ident *match = NULL;
chosen_name, &result);
map_free(map);
map = NULL;
+ sysname = fd2devnm(mdfd);
+ strncpy(info.sys_name, sysname, sizeof(sysname) - 1);
close_fd(&mdfd);
udev_unblock();
sysfs_uevent(&info, "change");