summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.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_disk.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_disk.c')
-rw-r--r--sys/geom/geom_disk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 20998bd..3b1e748 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -381,6 +381,7 @@ g_disk_create(void *arg, int flag)
printf("GEOM: new disk %s\n", gp->name);
dp->d_geom = gp;
g_error_provider(pp, 0);
+ root_mount_rel(dp->d_roothold);
}
static void
@@ -467,6 +468,7 @@ disk_create(struct disk *dp, int version)
dp->d_sectorsize, DEVSTAT_ALL_SUPPORTED,
DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX);
dp->d_geom = NULL;
+ dp->d_roothold = root_mount_hold(dp->d_name, M_WAITOK);
g_disk_ident_adjust(dp->d_ident, sizeof(dp->d_ident));
g_post_event(g_disk_create, dp, M_WAITOK, dp, NULL);
}
OpenPOWER on IntegriCloud