fix bug in physio which weirded out tape drive
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 9 May 1981 12:52:33 +0000 (04:52 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 9 May 1981 12:52:33 +0000 (04:52 -0800)
SCCS-vsn: sys/kern/kern_physio.c 4.21
SCCS-vsn: sys/kern/vfs_bio.c 4.21
SCCS-vsn: sys/kern/vfs_cluster.c 4.21

usr/src/sys/kern/kern_physio.c
usr/src/sys/kern/vfs_bio.c
usr/src/sys/kern/vfs_cluster.c

index 92b26ad..0eb0ff7 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_physio.c   4.20    81/04/24        */
+/*     kern_physio.c   4.21    81/05/08        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -716,7 +716,7 @@ unsigned (*mincnt)();
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
-       while (u.u_count != 0 && (bp->b_flags&B_ERROR)==0) {
+       while (u.u_count != 0) {
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
@@ -737,6 +737,8 @@ unsigned (*mincnt)();
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
+               if (bp->b_flags&B_ERROR)
+                       break;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;
index 2f5df94..7889b1d 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_bio.c       4.20    81/04/24        */
+/*     vfs_bio.c       4.21    81/05/08        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -716,7 +716,7 @@ unsigned (*mincnt)();
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
-       while (u.u_count != 0 && (bp->b_flags&B_ERROR)==0) {
+       while (u.u_count != 0) {
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
@@ -737,6 +737,8 @@ unsigned (*mincnt)();
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
+               if (bp->b_flags&B_ERROR)
+                       break;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;
index cca3112..5740dbe 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_cluster.c   4.20    81/04/24        */
+/*     vfs_cluster.c   4.21    81/05/08        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -716,7 +716,7 @@ unsigned (*mincnt)();
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
        bp->b_error = 0;
        bp->b_proc = u.u_procp;
        bp->b_un.b_addr = u.u_base;
-       while (u.u_count != 0 && (bp->b_flags&B_ERROR)==0) {
+       while (u.u_count != 0) {
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
                bp->b_flags = B_BUSY | B_PHYS | rw;
                bp->b_dev = dev;
                bp->b_blkno = u.u_offset >> PGSHIFT;
@@ -737,6 +737,8 @@ unsigned (*mincnt)();
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
                bp->b_un.b_addr += c;
                u.u_count -= c;
                u.u_offset += c;
+               if (bp->b_flags&B_ERROR)
+                       break;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;
        }
        bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS);
        u.u_count = bp->b_resid;