Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs call VOP_PUTPAGES() directly for vnodes instead of
details: https://anonhg.NetBSD.org/src/rev/fac1e52469d0
branches: trunk
changeset: 517167:fac1e52469d0
user: chs <chs%NetBSD.org@localhost>
date: Thu Nov 08 04:51:05 2001 +0000
description:
call VOP_PUTPAGES() directly for vnodes instead of
going through the UVM pager "put" vector.
diffstat:
sys/ufs/ffs/ffs_softdep.c | 15 ++++++---------
sys/ufs/ffs/ffs_vnops.c | 28 ++++++++++++----------------
2 files changed, 18 insertions(+), 25 deletions(-)
diffs (135 lines):
diff -r 232b561a3d2b -r fac1e52469d0 sys/ufs/ffs/ffs_softdep.c
--- a/sys/ufs/ffs/ffs_softdep.c Thu Nov 08 04:18:46 2001 +0000
+++ b/sys/ufs/ffs/ffs_softdep.c Thu Nov 08 04:51:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_softdep.c,v 1.19 2001/10/30 01:11:53 lukem Exp $ */
+/* $NetBSD: ffs_softdep.c,v 1.20 2001/11/08 04:51:05 chs Exp $ */
/*
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.19 2001/10/30 01:11:53 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.20 2001/11/08 04:51:05 chs Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -4134,8 +4134,8 @@
struct vnode *a_vp;
struct ucred *a_cred;
int a_waitfor;
- off_t offhi;
- off_t offlo;
+ off_t a_offlo;
+ off_t a_offhi;
struct proc *a_p;
} */ *ap = v;
struct vnode *vp = ap->a_vp;
@@ -4407,11 +4407,9 @@
int error, waitfor;
struct buf *bp;
struct vnode *vp;
- struct uvm_object *uobj;
vp = softdep_lookupvp(fs, ino);
KASSERT(vp != NULL);
- uobj = &vp->v_uobj;
/*
* This work is done in two passes. The first pass grabs most
@@ -4442,9 +4440,8 @@
*/
FREE_LOCK(&lk);
- simple_lock(&uobj->vmobjlock);
- error = (uobj->pgops->pgo_put)(uobj, 0, 0,
- PGO_ALLPAGES|PGO_CLEANIT|
+ simple_lock(&vp->v_interlock);
+ error = VOP_PUTPAGES(vp, 0, 0, PGO_ALLPAGES | PGO_CLEANIT |
(waitfor == MNT_NOWAIT ? 0: PGO_SYNCIO));
if (waitfor == MNT_WAIT) {
drain_output(vp, 0);
diff -r 232b561a3d2b -r fac1e52469d0 sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Thu Nov 08 04:18:46 2001 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Thu Nov 08 04:51:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.45 2001/11/06 07:11:29 simonb Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.46 2001/11/08 04:52:31 chs Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.45 2001/11/06 07:11:29 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.46 2001/11/08 04:52:31 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -242,8 +242,8 @@
struct vnode *a_vp;
struct ucred *a_cred;
int a_flags;
- off_t offlo;
- off_t offhi;
+ off_t a_offlo;
+ off_t a_offhi;
struct proc *a_p;
} */ *ap = v;
struct buf *bp;
@@ -271,10 +271,9 @@
*/
if (vp->v_type == VREG) {
- simple_lock(&vp->v_uobj.vmobjlock);
- error = (vp->v_uobj.pgops->pgo_put)(&vp->v_uobj,
- trunc_page(ap->a_offlo), round_page(ap->a_offhi),
- PGO_CLEANIT|PGO_SYNCIO);
+ simple_lock(&vp->v_interlock);
+ error = VOP_PUTPAGES(vp, trunc_page(ap->a_offlo),
+ round_page(ap->a_offhi), PGO_CLEANIT|PGO_SYNCIO);
if (error) {
return error;
}
@@ -327,14 +326,13 @@
struct vnode *a_vp;
struct ucred *a_cred;
int a_flags;
- off_t offlo;
- off_t offhi;
+ off_t a_offlo;
+ off_t a_offhi;
struct proc *a_p;
} */ *ap = v;
struct vnode *vp = ap->a_vp;
struct buf *bp, *nbp;
int s, error, passes, skipmeta;
- struct uvm_object *uobj;
if (vp->v_type == VBLK &&
vp->v_specmountpoint != NULL &&
@@ -346,10 +344,8 @@
*/
if (vp->v_type == VREG) {
- uobj = &vp->v_uobj;
- simple_lock(&uobj->vmobjlock);
- error = (uobj->pgops->pgo_put)(uobj, 0, 0,
- PGO_ALLPAGES|PGO_CLEANIT|
+ simple_lock(&vp->v_interlock);
+ error = VOP_PUTPAGES(vp, 0, 0, PGO_ALLPAGES | PGO_CLEANIT |
((ap->a_flags & FSYNC_WAIT) ? PGO_SYNCIO : 0));
if (error) {
return error;
@@ -491,7 +487,7 @@
blkoff(fs, *ap->a_count << PAGE_SHIFT) != 0) &&
DOINGSOFTDEP(ap->a_vp)) {
if ((ap->a_flags & PGO_LOCKED) == 0) {
- simple_unlock(&vp->v_uobj.vmobjlock);
+ simple_unlock(&vp->v_interlock);
}
return EINVAL;
}
Home |
Main Index |
Thread Index |
Old Index