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.
This commit is contained in:
Kirk McKusick 2011-06-12 18:46:48 +00:00
parent bd5abe1968
commit 9420dc62cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223018
2 changed files with 11 additions and 2 deletions

View file

@ -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 {

View file

@ -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);