diff options
author | peter <peter@FreeBSD.org> | 1995-11-02 09:52:40 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-11-02 09:52:40 +0000 |
commit | e6eb68645b908dbf6af5c6610f97ec41626bab20 (patch) | |
tree | ea066e2cd11dcb1ab8912215535330db8b43de23 /sys/amd64 | |
parent | 3d387b17dbfda691aa60584d85776a2783adbe77 (diff) | |
download | FreeBSD-src-e6eb68645b908dbf6af5c6610f97ec41626bab20.zip FreeBSD-src-e6eb68645b908dbf6af5c6610f97ec41626bab20.tar.gz |
When the sync-on-shutdown fails to clear all buffers, this bit of code
can print them out.
I have seen that MFS can leave BUSY buffers, preventing a clean reboot...
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 388dbc1..4621100 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.145 1995/10/28 16:57:54 markm Exp $ + * $Id: machdep.c,v 1.146 1995/10/31 19:07:53 peter Exp $ */ #include "npx.h" @@ -891,6 +891,16 @@ boot(howto) * unmount filesystems (thus forcing an fsck on reboot). */ printf("giving up\n"); +#ifdef SHOW_BUSYBUFS + nbusy = 0; + for (bp = &buf[nbuf]; --bp >= buf; ) { + if ((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY) { + nbusy++; + printf("%d: dev:%08x, flags:%08x, blkno:%d, lblkno:%d\n", nbusy, bp->b_dev, bp->b_flags, bp->b_blkno, bp->b_lblkno); + } + } + DELAY(5000000); /* 5 seconds */ +#endif } else { printf("done\n"); /* |