From owner-cvs-all@FreeBSD.ORG Sun Sep 11 19:06:51 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 745B716A41F; Sun, 11 Sep 2005 19:06:51 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D15B43D48; Sun, 11 Sep 2005 19:06:51 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8BJ6pRP065600; Sun, 11 Sep 2005 19:06:51 GMT (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8BJ6pOH065599; Sun, 11 Sep 2005 19:06:51 GMT (envelope-from truckman) Message-Id: <200509111906.j8BJ6pOH065599@repoman.freebsd.org> From: Don Lewis Date: Sun, 11 Sep 2005 19:06:50 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/gnu/fs/ext2fs fs.h src/sys/kern kern_shutdown.c src/sys/sys buf.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2005 19:06:51 -0000 truckman 2005-09-11 19:06:50 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/gnu/fs/ext2fs fs.h sys/kern kern_shutdown.c sys/sys buf.h Log: MFC src/sys/gnu/fs/ext2fs/fs.h 1.18 src/sys/kern/kern_shutdown.c 1.175 src/sys/sys/buf.h 1.189 Modified files: sys/gnu/fs/ext2fs fs.h sys/kern kern_shutdown.c sys/sys buf.h Log: Add a new struct buf flag bit, B_PERSISTENT, and use it to tag struct bufs that are persistently held by ext2fs. Ignore any buffers with this flag in the code in boot() that counts "busy" and dirty buffers and attempts to sync the dirty buffers, which is done before attempting to unmount all the file systems during shutdown. This fixes the problem caused by any ext2fs file systems that are mounted at system shutdown time, which caused boot() to give up on a non-zero number of buffers and skip the call to vfs_unmountall(). This left all the mounted file systems in a dirty state and caused them to all require cleanup by fsck on reboot. Move the two separate copies of the "busy" buffer test in boot() to a separate function. Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro. Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with this and previous flag changes. PR: kern/56675, kern/85163 Tested by: "Matthias Andree" matthias.andree at gmx.de Reviewed by: bde MFC after: 3 days PR: kern/56675, kern/85163 Tested by: "Hanspeter Roth" hampi at rootshell.be Tested by: "Matthias Andree" matthias.andree at gmx.de Reviewed by: bde Approved by: re (scottl) Revision Changes Path 1.17.2.1 +8 -8 src/sys/gnu/fs/ext2fs/fs.h 1.174.2.1 +13 -11 src/sys/kern/kern_shutdown.c 1.187.2.2 +4 -4 src/sys/sys/buf.h