Manage.c: Only issue change events for kernels older than 2.6.28
2.6.28+ kernels handle this themselves and issuing the event here can cause a race. Reported-by: Sebastian Parschauer <sebastian.riemer@profitbricks.com> Suggested-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
dd47b4e0c4
commit
229e66cb96
19
Manage.c
19
Manage.c
|
@ -493,14 +493,17 @@ done:
|
||||||
rv = 1;
|
rv = 1;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* prior to 2.6.28, KOBJ_CHANGE was not sent when an md array
|
|
||||||
* was stopped, so We'll do it here just to be sure. Drop any
|
if (get_linux_version() < 2006028) {
|
||||||
* partitions as well...
|
/* prior to 2.6.28, KOBJ_CHANGE was not sent when an md array
|
||||||
*/
|
* was stopped, so We'll do it here just to be sure. Drop any
|
||||||
if (fd >= 0)
|
* partitions as well...
|
||||||
ioctl(fd, BLKRRPART, 0);
|
*/
|
||||||
if (mdi)
|
if (fd >= 0)
|
||||||
sysfs_uevent(mdi, "change");
|
ioctl(fd, BLKRRPART, 0);
|
||||||
|
if (mdi)
|
||||||
|
sysfs_uevent(mdi, "change");
|
||||||
|
}
|
||||||
|
|
||||||
if (devnm[0] && use_udev()) {
|
if (devnm[0] && use_udev()) {
|
||||||
struct map_ent *mp = map_by_devnm(&map, devnm);
|
struct map_ent *mp = map_by_devnm(&map, devnm);
|
||||||
|
|
Loading…
Reference in New Issue