Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/syncfs add a VOP_PUTPAGES method for all the file...



details:   https://anonhg.NetBSD.org/src/rev/75ff727cdb5f
branches:  trunk
changeset: 518826:75ff727cdb5f
user:      chs <chs%NetBSD.org@localhost>
date:      Thu Dec 06 04:30:49 2001 +0000

description:
add a VOP_PUTPAGES method for all the filesystems that don't have pages.
do all the work for destroying syncfs vnodes in vfs_deallocate_syncvnode()
to make some new assertions work out.

diffstat:

 sys/miscfs/syncfs/sync_vnops.c |  23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diffs (68 lines):

diff -r 594ffe6c034a -r 75ff727cdb5f sys/miscfs/syncfs/sync_vnops.c
--- a/sys/miscfs/syncfs/sync_vnops.c    Thu Dec 06 04:29:55 2001 +0000
+++ b/sys/miscfs/syncfs/sync_vnops.c    Thu Dec 06 04:30:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sync_vnops.c,v 1.7 2001/11/10 13:33:44 lukem Exp $     */
+/*     $NetBSD: sync_vnops.c,v 1.8 2001/12/06 04:30:49 chs Exp $       */
 
 /*
  * Copyright 1997 Marshall Kirk McKusick. All Rights Reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sync_vnops.c,v 1.7 2001/11/10 13:33:44 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sync_vnops.c,v 1.8 2001/12/06 04:30:49 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -55,7 +55,8 @@
        { &vop_unlock_desc, sync_unlock },              /* unlock */
        { &vop_print_desc, sync_print },                /* print */
        { &vop_islocked_desc, sync_islocked },          /* islocked */
-       { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL }
+       { &vop_putpages_desc, sync_putpages },          /* islocked */
+       { NULL, NULL }
 };
 
 const struct vnodeopv_desc sync_vnodeop_opv_desc =
@@ -112,8 +113,10 @@
 
        vp = mp->mnt_syncer;
        mp->mnt_syncer = NULL;
+       vn_syncer_remove_from_worklist(vp);
        vp->v_writecount = 0;
        vrele(vp);
+       vgone(vp);
 }
 
 /*
@@ -177,8 +180,6 @@
        struct vnode *vp = ap->a_vp;
 
        VOP_UNLOCK(vp, 0);
-       if (vp->v_usecount == 0)
-               vgone(vp);
        return (0);
 }
 
@@ -186,18 +187,8 @@
 sync_reclaim(v)
        void *v;
 {
-       struct vop_reclaim_args /* {
-               struct vnode *a_vp;
-       } */ *ap = v;
-       struct vnode *vp = ap->a_vp;
-       int s;
 
-       s = splbio();
-       vp->v_mount->mnt_syncer = NULL;
-       vn_syncer_remove_from_worklist(vp);
-       splx(s);
-
-       return 0;
+       return (0);
 }
 
 /*



Home | Main Index | Thread Index | Old Index