From 35a494b8e5d9212deb2e263c2c45b55b80408cba Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Tue, 18 Jan 1983 02:11:07 -0800 Subject: [PATCH] brain damage for network disk SCCS-vsn: sys/kern/kern_physio.c 4.38 --- usr/src/sys/kern/kern_physio.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr/src/sys/kern/kern_physio.c b/usr/src/sys/kern/kern_physio.c index 7375a2a00d..0d0cc7e73f 100644 --- a/usr/src/sys/kern/kern_physio.c +++ b/usr/src/sys/kern/kern_physio.c @@ -1,4 +1,4 @@ -/* kern_physio.c 4.37 82/12/17 */ +/* kern_physio.c 4.38 83/01/17 */ #include "../machine/pte.h" @@ -213,7 +213,7 @@ nextiov: uio->uio_resid -= c; uio->uio_offset += c; /* temp kludge for tape drives */ - if (bp->b_resid || bp->b_flags&B_ERROR) + if (bp->b_resid || (bp->b_flags&B_ERROR)) break; } bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS); @@ -226,12 +226,20 @@ nextiov: goto nextiov; } +#define MAXPHYS (63 * 1024) + +/* network disk brain damage */ +#include "nd.h" +#if NND > 0 +#define MAXPHYS (32 * 1024) +#endif + unsigned minphys(bp) struct buf *bp; { - if (bp->b_bcount > 63 * 1024) - bp->b_bcount = 63 * 1024; + if (bp->b_bcount > MAXPHYS) + bp->b_bcount = MAXPHYS; } -- 2.20.1