Date: Sun, 12 Jun 2011 18:46:48 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r223018 - head/sys/ufs/ffs Message-ID: <201106121846.p5CIkmBP036751@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106121846.p5CIkmBP036751>