diff options
author | peter <peter@FreeBSD.org> | 1998-03-27 14:20:57 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-03-27 14:20:57 +0000 |
commit | eb56ae7c97306af69b04f9d508310ce5bc1678d4 (patch) | |
tree | d31febb1d0dc88f4d2e8f2e4597b4b1a41292284 /sys | |
parent | 9a3bc8287832efe5fed4c9c64c38328f509c416e (diff) | |
download | FreeBSD-src-eb56ae7c97306af69b04f9d508310ce5bc1678d4.zip FreeBSD-src-eb56ae7c97306af69b04f9d508310ce5bc1678d4.tar.gz |
Enable the use of soft updates on the root filesystem. Previously, the
softdep mode could only be activated on the initial mount of a filesystem
and then only if it was a read-write mount. A 'mount -r' (as done in the
rootfs mount) followed by a 'mount -u' to convert to read-write didn't
start softdep mode.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 71a451d..96ef5bb 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.75 1998/03/07 21:36:36 dyson Exp $ + * $Id: ffs_vfsops.c,v 1.76 1998/03/08 09:59:06 julian Exp $ */ #include "opt_quota.h" @@ -194,6 +194,7 @@ ffs_mount( mp, path, data, ndp, p) if (mp->mnt_flag & MNT_UPDATE) { ump = VFSTOUFS(mp); fs = ump->um_fs; + devvp = ump->um_devvp; err = 0; if (bdevsw[major(ump->um_dev)]->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; @@ -231,7 +232,6 @@ ffs_mount( mp, path, data, ndp, p) * that user has necessary permissions on the device. */ if (p->p_ucred->cr_uid != 0) { - devvp = ump->um_devvp; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); if (error = VOP_ACCESS(devvp, VREAD | VWRITE, p->p_ucred, p)) { @@ -241,6 +241,13 @@ ffs_mount( mp, path, data, ndp, p) VOP_UNLOCK(devvp, 0, p); } + /* check to see if we need to start softdep */ + if (fs->fs_flags & FS_DOSOFTDEP) { + err = softdep_mount(devvp, mp, fs, p->p_ucred); + if (err) + goto error_1; + } + fs->fs_ronly = 0; } if (fs->fs_ronly == 0) { |