MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_mountroot_wait

Function vfs_mountroot_wait

freebsd/kern/vfs_mountroot.c:975–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

973}
974
975static void
976vfs_mountroot_wait(void)
977{
978 struct root_hold_token *h;
979 struct timeval lastfail;
980 int curfail;
981
982 TSENTER();
983
984 curfail = 0;
985 while (1) {
986 g_waitidle();
987 mtx_lock(&root_holds_mtx);
988 if (TAILQ_EMPTY(&root_holds)) {
989 mtx_unlock(&root_holds_mtx);
990 break;
991 }
992 if (ppsratecheck(&lastfail, &curfail, 1)) {
993 printf("Root mount waiting for:");
994 TAILQ_FOREACH(h, &root_holds, list)
995 printf(" %s", h->who);
996 printf("\n");
997 }
998 TSWAIT("root mount");
999 msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold",
1000 hz);
1001 TSUNWAIT("root mount");
1002 }
1003
1004 TSEXIT();
1005}
1006
1007static int
1008vfs_mountroot_wait_if_neccessary(const char *fs, const char *dev)

Callers 2

parse_dir_askFunction · 0.85

Calls 4

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70
ppsratecheckFunction · 0.70
printfFunction · 0.70

Tested by

no test coverage detected