Source-Changes-HG archive

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

[src/trunk]: src/sys allow building without SOFTDEP by adding the pageiodone ...



details:   https://anonhg.NetBSD.org/src/rev/b6c2551e05ca
branches:  trunk
changeset: 499724:b6c2551e05ca
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Nov 27 18:26:38 2000 +0000

description:
allow building without SOFTDEP by adding the pageiodone hook to bio_ops.

diffstat:

 sys/miscfs/genfs/genfs_vnops.c |  8 +++-----
 sys/sys/buf.h                  |  3 ++-
 sys/ufs/ffs/ffs_softdep.c      |  3 ++-
 sys/uvm/uvm_pager.c            |  8 +++-----
 4 files changed, 10 insertions(+), 12 deletions(-)

diffs (78 lines):

diff -r 36f51d565bdf -r b6c2551e05ca sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c    Mon Nov 27 18:04:32 2000 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c    Mon Nov 27 18:26:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_vnops.c,v 1.21 2000/11/27 08:39:45 chs Exp $     */
+/*     $NetBSD: genfs_vnops.c,v 1.22 2000/11/27 18:26:38 chs Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -1044,10 +1044,8 @@
                UVMHIST_LOG(ubchist, "waiting for mbp %p", mbp,0,0,0);
                error2 = biowait(mbp);
        }
-       {
-               /* XXXUBC */
-               void softdep_pageiodone(struct buf *);
-               softdep_pageiodone(mbp);
+       if (bioops.io_pageiodone) {
+               (*bioops.io_pageiodone)(mbp);
        }
        s = splbio();
        vwakeup(mbp);
diff -r 36f51d565bdf -r b6c2551e05ca sys/sys/buf.h
--- a/sys/sys/buf.h     Mon Nov 27 18:04:32 2000 +0000
+++ b/sys/sys/buf.h     Mon Nov 27 18:26:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.44 2000/11/27 08:39:51 chs Exp $     */
+/*     $NetBSD: buf.h,v 1.45 2000/11/27 18:26:40 chs Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -162,6 +162,7 @@
        int     (*io_sync) __P((struct mount *));
        void    (*io_movedeps) __P((struct buf *, struct buf *));
        int     (*io_countdeps) __P((struct buf *, int));
+       void    (*io_pageiodone) __P((struct buf *));
 } bioops;
 
 /*
diff -r 36f51d565bdf -r b6c2551e05ca sys/ufs/ffs/ffs_softdep.c
--- a/sys/ufs/ffs/ffs_softdep.c Mon Nov 27 18:04:32 2000 +0000
+++ b/sys/ufs/ffs/ffs_softdep.c Mon Nov 27 18:26:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_softdep.c,v 1.8 2000/11/27 08:39:54 chs Exp $      */
+/*     $NetBSD: ffs_softdep.c,v 1.9 2000/11/27 18:26:40 chs Exp $      */
 
 /*
  * Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
@@ -190,6 +190,7 @@
        softdep_process_worklist,               /* io_sync */
        softdep_move_dependencies,              /* io_movedeps */
        softdep_count_dependencies,             /* io_countdeps */
+       softdep_pageiodone,                     /* io_pageiodone */
 };
 
 /*
diff -r 36f51d565bdf -r b6c2551e05ca sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c       Mon Nov 27 18:04:32 2000 +0000
+++ b/sys/uvm/uvm_pager.c       Mon Nov 27 18:26:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pager.c,v 1.35 2000/11/27 08:40:05 chs Exp $       */
+/*     $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $       */
 
 /*
  *
@@ -808,10 +808,8 @@
        release = (bp->b_flags & (B_ERROR|B_READ)) == (B_ERROR|B_READ);
        write = (bp->b_flags & B_READ) == 0;
        /* XXXUBC B_NOCACHE is for swap pager, should be done differently */
-       if (write && !(bp->b_flags & B_NOCACHE)) {
-               /* XXXUBC */
-               void softdep_pageiodone(struct buf *);
-               softdep_pageiodone(bp);
+       if (write && !(bp->b_flags & B_NOCACHE) && bioops.io_pageiodone) {
+               (*bioops.io_pageiodone)(bp);
        }
 
        uobj = NULL;



Home | Main Index | Thread Index | Old Index