aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-03-11 21:39:03 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-03-11 21:39:03 +0200
commitd3bc637d76eb34fc95de4fefa335f7870063dded (patch)
tree672c20d0ab01ae4cdfa5e2259630eed712ddd631
parent130ac62c49a796d558f9b3b6a343bdac870a9cdd (diff)
downloadmkinitfs-d3bc637d76eb34fc95de4fefa335f7870063dded.tar.bz2
mkinitfs-d3bc637d76eb34fc95de4fefa335f7870063dded.tar.xz
nlplug-findfs: scan block devices on change
raid disks are created zero sized. when mdadm has found all the disks it finally enables it. this causes md devices to be zero sized for some time after their creation, and blkid will not detect them. catch the 'change' notification and rescan block devices for updated blkid.
-rw-r--r--nlplug-findfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nlplug-findfs.c b/nlplug-findfs.c
index b93a5a9..5bdb7b1 100644
--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -713,7 +713,7 @@ static int dispatch_uevent(struct uevent *ev, struct ueventconf *conf)
}
if (ev->subsystem && strcmp(ev->subsystem, "block") == 0
- && strcmp(ev->action, "add") == 0) {
+ && (strcmp(ev->action, "add") == 0 || strcmp(ev->action, "change") == 0)) {
int rc;
snprintf(ev->devnode, sizeof(ev->devnode), "/dev/%s",