av_forw/av_back are gone; now use b_actf/b_actb for linking active buffers
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 2 Oct 1992 16:21:00 +0000 (08:21 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 2 Oct 1992 16:21:00 +0000 (08:21 -0800)
SCCS-vsn: sys/ufs/ffs/ufs_disksubr.c 7.18
SCCS-vsn: sys/ufs/ufs/ufs_disksubr.c 7.18
SCCS-vsn: sys/ufs/mfs/mfs_vnops.c 7.39
SCCS-vsn: sys/ufs/mfs/mfs_vfsops.c 7.28
SCCS-vsn: sys/vm/swap_pager.c 7.15
SCCS-vsn: sys/vm/vm_swap.c 7.26

usr/src/sys/ufs/ffs/ufs_disksubr.c
usr/src/sys/ufs/mfs/mfs_vfsops.c
usr/src/sys/ufs/mfs/mfs_vnops.c
usr/src/sys/ufs/ufs/ufs_disksubr.c
usr/src/sys/vm/swap_pager.c
usr/src/sys/vm/vm_swap.c

index 1786c1f..0550d7a 100644 (file)
@@ -44,8 +44,7 @@ disksort(dp, bp)
        ap = dp->b_actf;
        if(ap == NULL) {
                dp->b_actf = bp;
        ap = dp->b_actf;
        if(ap == NULL) {
                dp->b_actf = bp;
-               dp->b_actl = bp;
-               bp->av_forw = NULL;
+               bp->b_actf = NULL;
                return;
        }
        /*
                return;
        }
        /*
@@ -54,13 +53,13 @@ disksort(dp, bp)
         * and add ourselves to it.
         */
        if (bp->b_cylin < ap->b_cylin) {
         * and add ourselves to it.
         */
        if (bp->b_cylin < ap->b_cylin) {
-               while (ap->av_forw) {
+               while (ap->b_actf) {
                        /*
                         * Check for an ``inversion'' in the
                         * normally ascending cylinder numbers,
                         * indicating the start of the second request list.
                         */
                        /*
                         * Check for an ``inversion'' in the
                         * normally ascending cylinder numbers,
                         * indicating the start of the second request list.
                         */
-                       if (ap->av_forw->b_cylin < ap->b_cylin) {
+                       if (ap->b_actf->b_cylin < ap->b_cylin) {
                                /*
                                 * Search the second request list
                                 * for the first request at a larger
                                /*
                                 * Search the second request list
                                 * for the first request at a larger
@@ -68,16 +67,16 @@ disksort(dp, bp)
                                 * if there is no such request, we go at end.
                                 */
                                do {
                                 * if there is no such request, we go at end.
                                 */
                                do {
-                                       if (bp->b_cylin < ap->av_forw->b_cylin)
+                                       if (bp->b_cylin < ap->b_actf->b_cylin)
                                                goto insert;
                                                goto insert;
-                                       if (bp->b_cylin == ap->av_forw->b_cylin &&
-                                           bp->b_blkno < ap->av_forw->b_blkno)
+                                       if (bp->b_cylin == ap->b_actf->b_cylin &&
+                                           bp->b_blkno < ap->b_actf->b_blkno)
                                                goto insert;
                                                goto insert;
-                                       ap = ap->av_forw;
-                               } while (ap->av_forw);
+                                       ap = ap->b_actf;
+                               } while (ap->b_actf);
                                goto insert;            /* after last */
                        }
                                goto insert;            /* after last */
                        }
-                       ap = ap->av_forw;
+                       ap = ap->b_actf;
                }
                /*
                 * No inversions... we will go after the last, and
                }
                /*
                 * No inversions... we will go after the last, and
@@ -89,19 +88,19 @@ disksort(dp, bp)
         * Request is at/after the current request...
         * sort in the first request list.
         */
         * Request is at/after the current request...
         * sort in the first request list.
         */
-       while (ap->av_forw) {
+       while (ap->b_actf) {
                /*
                 * We want to go after the current request
                 * if there is an inversion after it (i.e. it is
                 * the end of the first request list), or if
                 * the next request is a larger cylinder than our request.
                 */
                /*
                 * We want to go after the current request
                 * if there is an inversion after it (i.e. it is
                 * the end of the first request list), or if
                 * the next request is a larger cylinder than our request.
                 */
-               if (ap->av_forw->b_cylin < ap->b_cylin ||
-                   bp->b_cylin < ap->av_forw->b_cylin ||
-                   (bp->b_cylin == ap->av_forw->b_cylin &&
-                   bp->b_blkno < ap->av_forw->b_blkno))
+               if (ap->b_actf->b_cylin < ap->b_cylin ||
+                   bp->b_cylin < ap->b_actf->b_cylin ||
+                   (bp->b_cylin == ap->b_actf->b_cylin &&
+                   bp->b_blkno < ap->b_actf->b_blkno))
                        goto insert;
                        goto insert;
-               ap = ap->av_forw;
+               ap = ap->b_actf;
        }
        /*
         * Neither a second list nor a larger
        }
        /*
         * Neither a second list nor a larger
@@ -109,10 +108,8 @@ disksort(dp, bp)
         * which is the same as the end of the whole schebang.
         */
 insert:
         * which is the same as the end of the whole schebang.
         */
 insert:
-       bp->av_forw = ap->av_forw;
-       ap->av_forw = bp;
-       if (ap == dp->b_actl)
-               dp->b_actl = bp;
+       bp->b_actf = ap->b_actf;
+       ap->b_actf = bp;
 }
 
 /*
 }
 
 /*
index 34e2db4..57dea92 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)mfs_vfsops.c        7.27 (Berkeley) %G%
+ *     @(#)mfs_vfsops.c        7.28 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -229,7 +229,7 @@ mfs_start(mp, flags, p)
        base = mfsp->mfs_baseoff;
        while (mfsp->mfs_buflist != (struct buf *)(-1)) {
                while (bp = mfsp->mfs_buflist) {
        base = mfsp->mfs_baseoff;
        while (mfsp->mfs_buflist != (struct buf *)(-1)) {
                while (bp = mfsp->mfs_buflist) {
-                       mfsp->mfs_buflist = bp->av_forw;
+                       mfsp->mfs_buflist = bp->b_actf;
                        mfs_doio(bp, base);
                        wakeup((caddr_t)bp);
                }
                        mfs_doio(bp, base);
                        wakeup((caddr_t)bp);
                }
index 549ced4..45d6c1a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)mfs_vnops.c 7.38 (Berkeley) %G%
+ *     @(#)mfs_vnops.c 7.39 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -155,7 +155,7 @@ mfs_strategy(ap)
        } else if (mfsp->mfs_pid == p->p_pid) {
                mfs_doio(bp, mfsp->mfs_baseoff);
        } else {
        } else if (mfsp->mfs_pid == p->p_pid) {
                mfs_doio(bp, mfsp->mfs_baseoff);
        } else {
-               bp->av_forw = mfsp->mfs_buflist;
+               bp->b_actf = mfsp->mfs_buflist;
                mfsp->mfs_buflist = bp;
                wakeup((caddr_t)vp);
        }
                mfsp->mfs_buflist = bp;
                wakeup((caddr_t)vp);
        }
@@ -305,7 +305,7 @@ mfs_close(ap)
         * Finish any pending I/O requests.
         */
        while (bp = mfsp->mfs_buflist) {
         * Finish any pending I/O requests.
         */
        while (bp = mfsp->mfs_buflist) {
-               mfsp->mfs_buflist = bp->av_forw;
+               mfsp->mfs_buflist = bp->b_actf;
                mfs_doio(bp, mfsp->mfs_baseoff);
                wakeup((caddr_t)bp);
        }
                mfs_doio(bp, mfsp->mfs_baseoff);
                wakeup((caddr_t)bp);
        }
index 1786c1f..0550d7a 100644 (file)
@@ -44,8 +44,7 @@ disksort(dp, bp)
        ap = dp->b_actf;
        if(ap == NULL) {
                dp->b_actf = bp;
        ap = dp->b_actf;
        if(ap == NULL) {
                dp->b_actf = bp;
-               dp->b_actl = bp;
-               bp->av_forw = NULL;
+               bp->b_actf = NULL;
                return;
        }
        /*
                return;
        }
        /*
@@ -54,13 +53,13 @@ disksort(dp, bp)
         * and add ourselves to it.
         */
        if (bp->b_cylin < ap->b_cylin) {
         * and add ourselves to it.
         */
        if (bp->b_cylin < ap->b_cylin) {
-               while (ap->av_forw) {
+               while (ap->b_actf) {
                        /*
                         * Check for an ``inversion'' in the
                         * normally ascending cylinder numbers,
                         * indicating the start of the second request list.
                         */
                        /*
                         * Check for an ``inversion'' in the
                         * normally ascending cylinder numbers,
                         * indicating the start of the second request list.
                         */
-                       if (ap->av_forw->b_cylin < ap->b_cylin) {
+                       if (ap->b_actf->b_cylin < ap->b_cylin) {
                                /*
                                 * Search the second request list
                                 * for the first request at a larger
                                /*
                                 * Search the second request list
                                 * for the first request at a larger
@@ -68,16 +67,16 @@ disksort(dp, bp)
                                 * if there is no such request, we go at end.
                                 */
                                do {
                                 * if there is no such request, we go at end.
                                 */
                                do {
-                                       if (bp->b_cylin < ap->av_forw->b_cylin)
+                                       if (bp->b_cylin < ap->b_actf->b_cylin)
                                                goto insert;
                                                goto insert;
-                                       if (bp->b_cylin == ap->av_forw->b_cylin &&
-                                           bp->b_blkno < ap->av_forw->b_blkno)
+                                       if (bp->b_cylin == ap->b_actf->b_cylin &&
+                                           bp->b_blkno < ap->b_actf->b_blkno)
                                                goto insert;
                                                goto insert;
-                                       ap = ap->av_forw;
-                               } while (ap->av_forw);
+                                       ap = ap->b_actf;
+                               } while (ap->b_actf);
                                goto insert;            /* after last */
                        }
                                goto insert;            /* after last */
                        }
-                       ap = ap->av_forw;
+                       ap = ap->b_actf;
                }
                /*
                 * No inversions... we will go after the last, and
                }
                /*
                 * No inversions... we will go after the last, and
@@ -89,19 +88,19 @@ disksort(dp, bp)
         * Request is at/after the current request...
         * sort in the first request list.
         */
         * Request is at/after the current request...
         * sort in the first request list.
         */
-       while (ap->av_forw) {
+       while (ap->b_actf) {
                /*
                 * We want to go after the current request
                 * if there is an inversion after it (i.e. it is
                 * the end of the first request list), or if
                 * the next request is a larger cylinder than our request.
                 */
                /*
                 * We want to go after the current request
                 * if there is an inversion after it (i.e. it is
                 * the end of the first request list), or if
                 * the next request is a larger cylinder than our request.
                 */
-               if (ap->av_forw->b_cylin < ap->b_cylin ||
-                   bp->b_cylin < ap->av_forw->b_cylin ||
-                   (bp->b_cylin == ap->av_forw->b_cylin &&
-                   bp->b_blkno < ap->av_forw->b_blkno))
+               if (ap->b_actf->b_cylin < ap->b_cylin ||
+                   bp->b_cylin < ap->b_actf->b_cylin ||
+                   (bp->b_cylin == ap->b_actf->b_cylin &&
+                   bp->b_blkno < ap->b_actf->b_blkno))
                        goto insert;
                        goto insert;
-               ap = ap->av_forw;
+               ap = ap->b_actf;
        }
        /*
         * Neither a second list nor a larger
        }
        /*
         * Neither a second list nor a larger
@@ -109,10 +108,8 @@ disksort(dp, bp)
         * which is the same as the end of the whole schebang.
         */
 insert:
         * which is the same as the end of the whole schebang.
         */
 insert:
-       bp->av_forw = ap->av_forw;
-       ap->av_forw = bp;
-       if (ap == dp->b_actl)
-               dp->b_actl = bp;
+       bp->b_actf = ap->b_actf;
+       ap->b_actf = bp;
 }
 
 /*
 }
 
 /*
index e708358..70ffd5c 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
  *
  *
  * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
  *
- *     @(#)swap_pager.c        7.14 (Berkeley) %G%
+ *     @(#)swap_pager.c        7.15 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -555,7 +555,7 @@ swap_pager_io(swp, m, flags)
         * Get a swap buffer header and perform the IO
         */
        s = splbio();
         * Get a swap buffer header and perform the IO
         */
        s = splbio();
-       while (bswlist.av_forw == NULL) {
+       while (bswlist.b_actf == NULL) {
 #ifdef DEBUG
                if (swpagerdebug & SDB_ANOM)
                        printf("swap_pager_io: wait on swbuf for %x (%d)\n",
 #ifdef DEBUG
                if (swpagerdebug & SDB_ANOM)
                        printf("swap_pager_io: wait on swbuf for %x (%d)\n",
@@ -564,8 +564,8 @@ swap_pager_io(swp, m, flags)
                bswlist.b_flags |= B_WANTED;
                sleep((caddr_t)&bswlist, PSWP+1);
        }
                bswlist.b_flags |= B_WANTED;
                sleep((caddr_t)&bswlist, PSWP+1);
        }
-       bp = bswlist.av_forw;
-       bswlist.av_forw = bp->av_forw;
+       bp = bswlist.b_actf;
+       bswlist.b_actf = bp->b_actf;
        splx(s);
        bp->b_flags = B_BUSY | (flags & B_READ);
        bp->b_proc = &proc0;    /* XXX (but without B_PHYS set this is ok) */
        splx(s);
        bp->b_flags = B_BUSY | (flags & B_READ);
        bp->b_proc = &proc0;    /* XXX (but without B_PHYS set this is ok) */
@@ -653,8 +653,8 @@ swap_pager_io(swp, m, flags)
 #endif
        rv = (bp->b_flags & B_ERROR) ? VM_PAGER_ERROR : VM_PAGER_OK;
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
 #endif
        rv = (bp->b_flags & B_ERROR) ? VM_PAGER_ERROR : VM_PAGER_OK;
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
-       bp->av_forw = bswlist.av_forw;
-       bswlist.av_forw = bp;
+       bp->b_actf = bswlist.b_actf;
+       bswlist.b_actf = bp;
        if (bp->b_vp)
                brelvp(bp);
        if (bswlist.b_flags & B_WANTED) {
        if (bp->b_vp)
                brelvp(bp);
        if (bswlist.b_flags & B_WANTED) {
@@ -875,8 +875,8 @@ swap_pager_iodone(bp)
        }
                
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
        }
                
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
-       bp->av_forw = bswlist.av_forw;
-       bswlist.av_forw = bp;
+       bp->b_actf = bswlist.b_actf;
+       bswlist.b_actf = bp;
        if (bp->b_vp)
                brelvp(bp);
        if (bswlist.b_flags & B_WANTED) {
        if (bp->b_vp)
                brelvp(bp);
        if (bswlist.b_flags & B_WANTED) {
index e905db6..e288ed3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vm_swap.c   7.25 (Berkeley) %G%
+ *     @(#)vm_swap.c   7.26 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -70,13 +70,13 @@ swapinit()
        /*
         * Now set up swap buffer headers.
         */
        /*
         * Now set up swap buffer headers.
         */
-       bswlist.av_forw = sp;
+       bswlist.b_actf = sp;
        for (i = 0; i < nswbuf - 1; i++, sp++) {
        for (i = 0; i < nswbuf - 1; i++, sp++) {
-               sp->av_forw = sp + 1;
+               sp->b_actf = sp + 1;
                sp->b_rcred = sp->b_wcred = p->p_ucred;
        }
        sp->b_rcred = sp->b_wcred = p->p_ucred;
                sp->b_rcred = sp->b_wcred = p->p_ucred;
        }
        sp->b_rcred = sp->b_wcred = p->p_ucred;
-       sp->av_forw = NULL;
+       sp->b_actf = NULL;
 }
 
 void
 }
 
 void