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...
This commit is contained in:
Peter Wemm 1995-11-02 09:52:40 +00:00
parent 0839e0de72
commit 43732dbeda
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12008
2 changed files with 22 additions and 2 deletions

View File

@ -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");
/*

View File

@ -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");
/*