kern_shutdown.c (136115) | kern_shutdown.c (137186) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 136115 2004-10-04 13:13:23Z phk $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 137186 2004-11-04 07:59:57Z phk $"); |
39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 287 unchanged lines hidden (view full) --- 334 /* 335 * Count only busy local buffers to prevent forcing 336 * a fsck if we're just a client of a wedged NFS server 337 */ 338 nbusy = 0; 339 for (bp = &buf[nbuf]; --bp >= buf; ) { 340 if (((bp->b_flags&B_INVAL) == 0 && BUF_REFCNT(bp)) || 341 ((bp->b_flags & (B_DELWRI|B_INVAL)) == B_DELWRI)) { | 39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 287 unchanged lines hidden (view full) --- 334 /* 335 * Count only busy local buffers to prevent forcing 336 * a fsck if we're just a client of a wedged NFS server 337 */ 338 nbusy = 0; 339 for (bp = &buf[nbuf]; --bp >= buf; ) { 340 if (((bp->b_flags&B_INVAL) == 0 && BUF_REFCNT(bp)) || 341 ((bp->b_flags & (B_DELWRI|B_INVAL)) == B_DELWRI)) { |
342#if 0 343/* XXX: This is bogus. We should probably have a BO_REMOTE flag instead */ |
|
342 if (bp->b_dev == NULL) { 343 TAILQ_REMOVE(&mountlist, 344 bp->b_vp->v_mount, mnt_list); 345 continue; 346 } | 344 if (bp->b_dev == NULL) { 345 TAILQ_REMOVE(&mountlist, 346 bp->b_vp->v_mount, mnt_list); 347 continue; 348 } |
349#endif |
|
347 nbusy++; 348#if defined(SHOW_BUSYBUFS) || defined(DIAGNOSTIC) 349 printf( | 350 nbusy++; 351#if defined(SHOW_BUSYBUFS) || defined(DIAGNOSTIC) 352 printf( |
350 "%d: dev:%s, flags:%0x, blkno:%ld, lblkno:%ld\n", 351 nbusy, devtoname(bp->b_dev), | 353 "%d: bufobj:%p, flags:%0x, blkno:%ld, lblkno:%ld\n", 354 nbusy, bp->b_bufobj, |
352 bp->b_flags, (long)bp->b_blkno, 353 (long)bp->b_lblkno); 354#endif 355 } 356 } 357 if (nbusy) { 358 /* 359 * Failed to sync all blocks. Indicate this and don't --- 260 unchanged lines hidden --- | 355 bp->b_flags, (long)bp->b_blkno, 356 (long)bp->b_lblkno); 357#endif 358 } 359 } 360 if (nbusy) { 361 /* 362 * Failed to sync all blocks. Indicate this and don't --- 260 unchanged lines hidden --- |