summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-03-30 05:57:55 +0000
committerthompsa <thompsa@FreeBSD.org>2009-03-30 05:57:55 +0000
commit84a2f3fa57d0f9a910d58cd7f9183de1e7bb34cd (patch)
tree6d9ca7a2391528b93c16b2c8548dd3d38cb3dbc0 /sys/kern/vfs_mount.c
parent25dbf8cb6cc29555d64e2892f300e6c7c3cf1583 (diff)
downloadFreeBSD-src-84a2f3fa57d0f9a910d58cd7f9183de1e7bb34cd.zip
FreeBSD-src-84a2f3fa57d0f9a910d58cd7f9183de1e7bb34cd.tar.gz
Further rate limit the root wait status, it will be printed once per
root_mount_rel() wakeup.
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 9253aff..e4256c7 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1391,6 +1391,8 @@ static void
root_mount_prepare(void)
{
struct root_hold_token *h;
+ struct timeval lastfail;
+ int curfail = 0;
for (;;) {
DROP_GIANT();
@@ -1401,10 +1403,12 @@ root_mount_prepare(void)
mtx_unlock(&mountlist_mtx);
break;
}
- printf("Root mount waiting for:");
- LIST_FOREACH(h, &root_holds, list)
- printf(" %s", h->who);
- printf("\n");
+ if (ppsratecheck(&lastfail, &curfail, 1)) {
+ printf("Root mount waiting for:");
+ LIST_FOREACH(h, &root_holds, list)
+ printf(" %s", h->who);
+ printf("\n");
+ }
msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold",
hz);
}
OpenPOWER on IntegriCloud