From 46b70f07bc2abd990ff1e2c51363a045989f388f Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Mon, 30 Mar 2009 05:57:55 +0000 Subject: [PATCH] Further rate limit the root wait status, it will be printed once per root_mount_rel() wakeup. --- sys/kern/vfs_mount.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 9253affcaa4..e4256c7f28e 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); }