Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/genfs When traversing by list, if the page next t...



details:   https://anonhg.NetBSD.org/src/rev/c11b336ce453
branches:  trunk
changeset: 526719:c11b336ce453
user:      enami <enami%NetBSD.org@localhost>
date:      Thu May 09 07:22:09 2002 +0000

description:
When traversing by list, if the page next to us is a page in the cluster,
advance the pointer.

diffstat:

 sys/miscfs/genfs/genfs_vnops.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r fd1b77e6b986 -r c11b336ce453 sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c    Thu May 09 07:18:46 2002 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c    Thu May 09 07:22:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_vnops.c,v 1.58 2002/05/09 07:14:37 enami Exp $   */
+/*     $NetBSD: genfs_vnops.c,v 1.59 2002/05/09 07:22:09 enami Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.58 2002/05/09 07:14:37 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.59 2002/05/09 07:22:09 enami Exp $");
 
 #include "opt_nfsserver.h"
 
@@ -1197,6 +1197,8 @@
                for (i = 0; i < npages; i++) {
                        tpg = pgs[i];
                        KASSERT(tpg->uobject == uobj);
+                       if (by_list && tpg == TAILQ_NEXT(pg, listq))
+                               pg = tpg;
                        if (tpg->offset < startoff || tpg->offset >= endoff)
                                continue;
                        if (flags & PGO_DEACTIVATE &&
@@ -1213,6 +1215,13 @@
                                                uvm_pagedequeue(tpg);
                                        }
                                } else {
+
+                                       /*
+                                        * ``page is not busy''
+                                        * implies that npages is 1
+                                        * and needs_clean is false.
+                                        */
+
                                        nextpg = TAILQ_NEXT(tpg, listq);
                                        uvm_pagefree(tpg);
                                }



Home | Main Index | Thread Index | Old Index