new queue structure
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 31 Dec 1993 08:13:43 +0000 (00:13 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 31 Dec 1993 08:13:43 +0000 (00:13 -0800)
SCCS-vsn: sys/ufs/ffs/ffs_vnops.c 8.4
SCCS-vsn: sys/ufs/lfs/lfs_bio.c 8.4

usr/src/sys/ufs/ffs/ffs_vnops.c
usr/src/sys/ufs/lfs/lfs_bio.c

index cea7b28..7ce577c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ffs_vnops.c 8.3 (Berkeley) %G%
+ *     @(#)ffs_vnops.c 8.4 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -217,8 +217,8 @@ ffs_fsync(ap)
         */
 loop:
        s = splbio();
         */
 loop:
        s = splbio();
-       for (bp = vp->v_dirtyblkhd.le_next; bp; bp = nbp) {
-               nbp = bp->b_vnbufs.qe_next;
+       for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) {
+               nbp = bp->b_vnbufs.le_next;
                if ((bp->b_flags & B_BUSY))
                        continue;
                if ((bp->b_flags & B_DELWRI) == 0)
                if ((bp->b_flags & B_BUSY))
                        continue;
                if ((bp->b_flags & B_DELWRI) == 0)
@@ -242,7 +242,7 @@ loop:
                        sleep((caddr_t)&vp->v_numoutput, PRIBIO + 1);
                }
 #ifdef DIAGNOSTIC
                        sleep((caddr_t)&vp->v_numoutput, PRIBIO + 1);
                }
 #ifdef DIAGNOSTIC
-               if (vp->v_dirtyblkhd.le_next) {
+               if (vp->v_dirtyblkhd.lh_first) {
                        vprint("ffs_fsync: dirty", vp);
                        goto loop;
                }
                        vprint("ffs_fsync: dirty", vp);
                        goto loop;
                }
index 42355a7..ea075cb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lfs_bio.c   8.3 (Berkeley) %G%
+ *     @(#)lfs_bio.c   8.4 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -113,8 +113,7 @@ lfs_flush()
        if (lfs_writing)
                return;
        lfs_writing = 1;
        if (lfs_writing)
                return;
        lfs_writing = 1;
-       mp = rootfs;
-       do {
+       for (mp = mountlist.tqh_first; mp != NULL; mp = mp->mnt_list.tqe_next) {
                /* The lock check below is to avoid races with unmount. */
                if (mp->mnt_stat.f_type == MOUNT_LFS &&
                    (mp->mnt_flag & (MNT_MLOCK|MNT_RDONLY|MNT_UNMOUNT)) == 0 &&
                /* The lock check below is to avoid races with unmount. */
                if (mp->mnt_stat.f_type == MOUNT_LFS &&
                    (mp->mnt_flag & (MNT_MLOCK|MNT_RDONLY|MNT_UNMOUNT)) == 0 &&
@@ -131,8 +130,7 @@ lfs_flush()
 #endif
                        lfs_segwrite(mp, 0);
                }
 #endif
                        lfs_segwrite(mp, 0);
                }
-               mp = mp->mnt_next;
-       } while (mp != rootfs);
+       }
        lfs_writing = 0;
 }
 
        lfs_writing = 0;
 }