From owner-svn-src-all@FreeBSD.ORG Sun Jun 12 18:46:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC042106566B; Sun, 12 Jun 2011 18:46:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC8B18FC14; Sun, 12 Jun 2011 18:46:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5CIkmO1036754; Sun, 12 Jun 2011 18:46:48 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5CIkmBP036751; Sun, 12 Jun 2011 18:46:48 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201106121846.p5CIkmBP036751@svn.freebsd.org> From: Kirk McKusick Date: Sun, 12 Jun 2011 18:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223018 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2011 18:46:48 -0000 Author: mckusick Date: Sun Jun 12 18:46:48 2011 New Revision: 223018 URL: http://svn.freebsd.org/changeset/base/223018 Log: Disable the soft updates journaling after a filesystem is successfully downgraded to read-only. It will be restarted if the filesystem is upgraded back to read-write. Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sun Jun 12 18:01:31 2011 (r223017) +++ head/sys/ufs/ffs/ffs_softdep.c Sun Jun 12 18:46:48 2011 (r223018) @@ -2386,8 +2386,15 @@ softdep_unmount(mp) struct mount *mp; { - if (mp->mnt_kern_flag & MNTK_SUJ) - journal_unmount(mp); + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_SOFTDEP; + if ((mp->mnt_kern_flag & MNTK_SUJ) == 0) { + MNT_IUNLOCK(mp); + return; + } + mp->mnt_kern_flag &= ~MNTK_SUJ; + MNT_IUNLOCK(mp); + journal_unmount(mp); } struct jblocks { Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Jun 12 18:01:31 2011 (r223017) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Jun 12 18:46:48 2011 (r223018) @@ -269,6 +269,8 @@ ffs_mount(struct mount *mp) vfs_write_resume(mp); return (error); } + if (mp->mnt_flag & MNT_SOFTDEP) + softdep_unmount(mp); DROP_GIANT(); g_topology_lock(); g_access(ump->um_cp, 0, -1, 0);