summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-07-03 13:26:54 +0000
committerphk <phk@FreeBSD.org>2000-07-03 13:26:54 +0000
commit2a91a9dd04db6f7f139116433bc749e9ef752d07 (patch)
tree34751e4c9d8b00fdf4e1ba4f995cb699d627dd1c
parenta02f6b8e450dd2418cb5761db1a4bc4a0656c730 (diff)
downloadFreeBSD-src-2a91a9dd04db6f7f139116433bc749e9ef752d07.zip
FreeBSD-src-2a91a9dd04db6f7f139116433bc749e9ef752d07.tar.gz
Make the two calls from kern/* into softupdates #ifdef SOFTUPDATES,
that is way cleaner than using the softupdates_stub stunt, which should be killed when convenient. Discussed with: mckusick
-rw-r--r--sys/kern/vfs_export.c3
-rw-r--r--sys/kern/vfs_extattr.c3
-rw-r--r--sys/kern/vfs_subr.c3
-rw-r--r--sys/kern/vfs_syscalls.c3
-rw-r--r--sys/ufs/ffs/ffs_softdep_stub.c15
5 files changed, 12 insertions, 15 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index eaec53b..684bcd4 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -43,6 +43,7 @@
* External virtual filesystem routines
*/
#include "opt_ddb.h"
+#include "opt_ffs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -1030,7 +1031,9 @@ sched_sync(void)
/*
* Do soft update processing.
*/
+#ifdef SOFTUPDATES
softdep_process_worklist(NULL);
+#endif
/*
* The variable rushjob allows the kernel to speed up the
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 5c808bd..37dc81d 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -41,6 +41,7 @@
/* For 4.3 integer FS ID compatibility */
#include "opt_compat.h"
+#include "opt_ffs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -2541,8 +2542,10 @@ fsync(p, uap)
if (vp->v_object)
vm_object_page_clean(vp->v_object, 0, 0, 0);
error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
+#ifdef SOFTUPDATES
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP))
error = softdep_fsync(vp);
+#endif
VOP_UNLOCK(vp, 0, p);
return (error);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index eaec53b..684bcd4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -43,6 +43,7 @@
* External virtual filesystem routines
*/
#include "opt_ddb.h"
+#include "opt_ffs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -1030,7 +1031,9 @@ sched_sync(void)
/*
* Do soft update processing.
*/
+#ifdef SOFTUPDATES
softdep_process_worklist(NULL);
+#endif
/*
* The variable rushjob allows the kernel to speed up the
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 5c808bd..37dc81d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -41,6 +41,7 @@
/* For 4.3 integer FS ID compatibility */
#include "opt_compat.h"
+#include "opt_ffs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -2541,8 +2542,10 @@ fsync(p, uap)
if (vp->v_object)
vm_object_page_clean(vp->v_object, 0, 0, 0);
error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
+#ifdef SOFTUPDATES
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP))
error = softdep_fsync(vp);
+#endif
VOP_UNLOCK(vp, 0, p);
return (error);
diff --git a/sys/ufs/ffs/ffs_softdep_stub.c b/sys/ufs/ffs/ffs_softdep_stub.c
index 806ba24..7583718 100644
--- a/sys/ufs/ffs/ffs_softdep_stub.c
+++ b/sys/ufs/ffs/ffs_softdep_stub.c
@@ -255,19 +255,4 @@ softdep_sync_metadata(ap)
return (0);
}
-int
-softdep_fsync(vp)
- struct vnode *vp; /* the "in_core" copy of the inode */
-{
-
- return (0);
-}
-
-int
-softdep_process_worklist(matchmnt)
- struct mount *matchmnt;
-{
- return (0);
-}
-
#endif /* SOFTUPDATES not configured in */
OpenPOWER on IntegriCloud