diff options
author | phk <phk@FreeBSD.org> | 2005-04-18 21:21:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-04-18 21:21:26 +0000 |
commit | b7f29c0fc0b1ddd6e927c22526ba675066d88be3 (patch) | |
tree | 92118bfcb3b51214d76b58ed0679a15b447f60e1 /sys/dev/ata/ata-all.c | |
parent | 4bd811c8dd42f8aa4e81dbf1c945e21e08bb4cd1 (diff) | |
download | FreeBSD-src-b7f29c0fc0b1ddd6e927c22526ba675066d88be3.zip FreeBSD-src-b7f29c0fc0b1ddd6e927c22526ba675066d88be3.tar.gz |
Add a named reference-count KPI to hold off mounting of the root filesystem.
While we wait for holds to be released, print a list of who holds us
back once per second.
Use the new KPI from GEOM instead of vfs_mount.c calling g_waitidle().
Use the new KPI also from ata.
With ATAmkIII's newbusification, ata could narrowly miss the window
and ad0 would not exist when we tried to mount root.
Diffstat (limited to 'sys/dev/ata/ata-all.c')
-rw-r--r-- | sys/dev/ata/ata-all.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index d2ce297..e3b27bf 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -81,6 +81,7 @@ int ata_wc = 1; /* local vars */ static struct intr_config_hook *ata_delayed_attach = NULL; +static struct root_hold_token *ata_root_hold_token; static int ata_dma = 1; static int atapi_dma = 1; @@ -559,6 +560,7 @@ ata_boot_attach(void) ata_identify(ch->dev); } } + root_mount_rel(ata_root_hold_token); } /* @@ -814,6 +816,7 @@ ata_module_event_handler(module_t mod, int what, void *arg) return EIO; } ata_delayed_attach->ich_func = (void*)ata_boot_attach; + ata_root_hold_token = root_mount_hold("ATA"); if (config_intrhook_establish(ata_delayed_attach) != 0) { printf("ata: config_intrhook_establish failed\n"); free(ata_delayed_attach, M_TEMP); |