summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-04-03 19:49:33 +0000
committerthompsa <thompsa@FreeBSD.org>2009-04-03 19:49:33 +0000
commit2d53d4304dcaee8f6902a0d91732115dc7c7ce3a (patch)
tree0976d91821464828b1352e8f198ba283b10ccff7 /sys/geom/geom_subr.c
parentfe5458f66537db2116edb0ad1cfa8b9da5fb1ba3 (diff)
downloadFreeBSD-src-2d53d4304dcaee8f6902a0d91732115dc7c7ce3a.zip
FreeBSD-src-2d53d4304dcaee8f6902a0d91732115dc7c7ce3a.tar.gz
Add interleaving root hold tokens from the CAM probe to disk_create and geom
provider tasting. This is needed for disk attachments that happen after threads are running in the boot process. Tested by: rnoland
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index b67c0d5..85d8028 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -545,6 +545,10 @@ g_new_provider_event(void *arg, int flag)
mp->taste(mp, pp, 0);
g_topology_assert();
}
+ if (pp->roothold != NULL) {
+ root_mount_rel(pp->roothold);
+ pp->roothold = NULL;
+ }
}
@@ -581,6 +585,7 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...)
pp->stat = devstat_new_entry(pp, -1, 0, DEVSTAT_ALL_SUPPORTED,
DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX);
LIST_INSERT_HEAD(&gp->provider, pp, provider);
+ pp->roothold = root_mount_hold(pp->name, M_WAITOK);
g_post_event(g_new_provider_event, pp, M_WAITOK, pp, gp, NULL);
return (pp);
}
OpenPOWER on IntegriCloud