Deleted Added
full compact
kern_shutdown.c (46381) kern_shutdown.c (46568)
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.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
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.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
39 * $Id: kern_shutdown.c,v 1.47 1999/04/27 11:16:04 phk Exp $
39 * $Id: kern_shutdown.c,v 1.48 1999/05/03 23:57:22 billf Exp $
40 */
41
42#include "opt_ddb.h"
43#include "opt_hw_wdog.h"
44#include "opt_panic.h"
45#include "opt_show_busybufs.h"
46
47#include <sys/param.h>

--- 180 unchanged lines hidden (view full) ---

228 DELAY(50000 * iter);
229 }
230 /*
231 * Count only busy local buffers to prevent forcing
232 * a fsck if we're just a client of a wedged NFS server
233 */
234 nbusy = 0;
235 for (bp = &buf[nbuf]; --bp >= buf; ) {
40 */
41
42#include "opt_ddb.h"
43#include "opt_hw_wdog.h"
44#include "opt_panic.h"
45#include "opt_show_busybufs.h"
46
47#include <sys/param.h>

--- 180 unchanged lines hidden (view full) ---

228 DELAY(50000 * iter);
229 }
230 /*
231 * Count only busy local buffers to prevent forcing
232 * a fsck if we're just a client of a wedged NFS server
233 */
234 nbusy = 0;
235 for (bp = &buf[nbuf]; --bp >= buf; ) {
236 if (((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY)
237 ||((bp->b_flags & (B_DELWRI | B_INVAL))== B_DELWRI))
236 if (((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY) ||
237 ((bp->b_flags & (B_DELWRI | B_INVAL))== B_DELWRI)) {
238 if(bp->b_dev == NODEV)
239 CIRCLEQ_REMOVE(&mountlist, bp->b_vp->v_mount, mnt_list);
240 else
241 nbusy++;
238 if(bp->b_dev == NODEV)
239 CIRCLEQ_REMOVE(&mountlist, bp->b_vp->v_mount, mnt_list);
240 else
241 nbusy++;
242 }
242
243
244 }
245 if (nbusy) {
246 /*
247 * Failed to sync all blocks. Indicate this and don't
248 * unmount filesystems (thus forcing an fsck on reboot).
249 */

--- 308 unchanged lines hidden ---
243
244
245 }
246 if (nbusy) {
247 /*
248 * Failed to sync all blocks. Indicate this and don't
249 * unmount filesystems (thus forcing an fsck on reboot).
250 */

--- 308 unchanged lines hidden ---