SCCS-vsn: sys/kern/kern_physio.c 4.25
SCCS-vsn: sys/kern/vfs_bio.c 4.25
SCCS-vsn: sys/kern/vfs_cluster.c 4.25
SCCS-vsn: sys/vax/mba/hp.c 4.43
SCCS-vsn: sys/vax/uba/rk.c 4.38
SCCS-vsn: sys/vax/uba/uda.c 4.2
SCCS-vsn: sys/vax/uba/up.c 4.41
-/* kern_physio.c 4.24 82/01/17 */
+/* kern_physio.c 4.25 82/01/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
geteblk()
{
register struct buf *bp, *dp;
geteblk()
{
register struct buf *bp, *dp;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
iowait(bp)
register struct buf *bp;
{
iowait(bp)
register struct buf *bp;
{
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
register int c;
int p2dp;
register struct pte *dpte, *vpte;
register int c;
int p2dp;
register struct pte *dpte, *vpte;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
panic("big push");
return;
}
panic("big push");
return;
}
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
nbytes -= c;
dblkno += btoc(c);
}
nbytes -= c;
dblkno += btoc(c);
}
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_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
bp->av_forw = bswlist.av_forw;
bswlist.av_forw = bp;
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
{
register struct buf *bp;
register struct buf *flist;
{
register struct buf *bp;
register struct buf *flist;
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
{
register int c;
char *a;
{
register int c;
char *a;
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
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;
-/* vfs_bio.c 4.24 82/01/17 */
+/* vfs_bio.c 4.25 82/01/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
geteblk()
{
register struct buf *bp, *dp;
geteblk()
{
register struct buf *bp, *dp;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
iowait(bp)
register struct buf *bp;
{
iowait(bp)
register struct buf *bp;
{
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
register int c;
int p2dp;
register struct pte *dpte, *vpte;
register int c;
int p2dp;
register struct pte *dpte, *vpte;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
panic("big push");
return;
}
panic("big push");
return;
}
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
nbytes -= c;
dblkno += btoc(c);
}
nbytes -= c;
dblkno += btoc(c);
}
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_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
bp->av_forw = bswlist.av_forw;
bswlist.av_forw = bp;
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
{
register struct buf *bp;
register struct buf *flist;
{
register struct buf *bp;
register struct buf *flist;
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
{
register int c;
char *a;
{
register int c;
char *a;
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
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;
-/* vfs_cluster.c 4.24 82/01/17 */
+/* vfs_cluster.c 4.25 82/01/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
geteblk()
{
register struct buf *bp, *dp;
geteblk()
{
register struct buf *bp, *dp;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
for (dp = &bfreelist[BQUEUES-1]; dp > bfreelist; dp--)
if (dp->av_forw != dp)
break;
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
sleep((caddr_t)dp, PRIBIO+1);
goto loop;
}
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
bp = dp->av_forw;
notavail(bp);
if (bp->b_flags & B_DELWRI) {
iowait(bp)
register struct buf *bp;
{
iowait(bp)
register struct buf *bp;
{
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
while ((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PRIBIO);
register int c;
int p2dp;
register struct pte *dpte, *vpte;
register int c;
int p2dp;
register struct pte *dpte, *vpte;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
while (bswlist.av_forw == NULL) {
bswlist.b_flags |= B_WANTED;
sleep((caddr_t)&bswlist, PSWP+1);
}
bp = bswlist.av_forw;
bswlist.av_forw = bp->av_forw;
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
bp->b_flags = B_BUSY | B_PHYS | rdflg | flag;
if ((bp->b_flags & (B_DIRTY|B_PGIN)) == 0)
panic("big push");
return;
}
panic("big push");
return;
}
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
while((bp->b_flags&B_DONE)==0)
sleep((caddr_t)bp, PSWP);
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
bp->b_un.b_addr += c;
bp->b_flags &= ~B_DONE;
if (bp->b_flags & B_ERROR) {
nbytes -= c;
dblkno += btoc(c);
}
nbytes -= c;
dblkno += btoc(c);
}
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_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
bp->av_forw = bswlist.av_forw;
bswlist.av_forw = bp;
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
wakeup((caddr_t)&bswlist);
wakeup((caddr_t)&proc[2]);
}
{
register struct buf *bp;
register struct buf *flist;
{
register struct buf *bp;
register struct buf *flist;
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
for (flist = bfreelist; flist < &bfreelist[BQUEUES]; flist++)
for (bp = flist->av_forw; bp != flist; bp = bp->av_forw) {
if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) {
{
register int c;
char *a;
{
register int c;
char *a;
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
if (useracc(u.u_base,u.u_count,rw==B_READ?B_WRITE:B_READ) == NULL) {
u.u_error = EFAULT;
return;
}
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
while (bp->b_flags&B_BUSY) {
bp->b_flags |= B_WANTED;
sleep((caddr_t)bp, PRIBIO+1);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
u.u_procp->p_flag &= ~SPHYSIO;
if (bp->b_flags&B_WANTED)
wakeup((caddr_t)bp);
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;
-/* hp.c 4.42 81/11/18 */
+/* hp.c 4.43 82/01/17 */
#ifdef HPDEBUG
int hpdebug;
#ifdef HPDEBUG
int hpdebug;
register int unit;
long sz, bn;
int xunit = minor(bp->b_dev) & 07;
register int unit;
long sz, bn;
int xunit = minor(bp->b_dev) & 07;
sz = bp->b_bcount;
sz = (sz+511) >> 9;
sz = bp->b_bcount;
sz = (sz+511) >> 9;
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
disksort(&mi->mi_tab, bp);
if (mi->mi_tab.b_active == 0)
mbustart(mi);
disksort(&mi->mi_tab, bp);
if (mi->mi_tab.b_active == 0)
mbustart(mi);
-/* rk.c 4.37 81/11/18 */
+/* rk.c 4.38 82/01/17 */
#include "rk.h"
#if NHK > 0
#include "rk.h"
#if NHK > 0
register struct buf *dp;
int xunit = minor(bp->b_dev) & 07;
long bn, sz;
register struct buf *dp;
int xunit = minor(bp->b_dev) & 07;
long bn, sz;
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
dp = &rkutab[ui->ui_unit];
disksort(dp, bp);
if (dp->b_active == 0) {
dp = &rkutab[ui->ui_unit];
disksort(dp, bp);
if (dp->b_active == 0) {
if (bp->b_actf && bp->b_active == 0)
(void) rkstart(ui->ui_mi);
}
if (bp->b_actf && bp->b_active == 0)
(void) rkstart(ui->ui_mi);
}
-/* uda.c 4.1 81/11/04 */
+/* uda.c 4.2 82/01/17 */
#include "ra.h"
#if NUDA > 0
#include "ra.h"
#if NUDA > 0
register int unit;
register struct uba_device *ui;
register struct uda_softc *sc;
register int unit;
register struct uba_device *ui;
register struct uda_softc *sc;
unit = minor(dev) >> 3;
if (unit >= NRA || (ui = uddinfo[unit]) == 0 || ui->ui_alive == 0) {
unit = minor(dev) >> 3;
if (unit >= NRA || (ui = uddinfo[unit]) == 0 || ui->ui_alive == 0) {
return;
}
sc = &uda_softc[ui->ui_ctlr];
return;
}
sc = &uda_softc[ui->ui_ctlr];
if (sc->sc_state != S_RUN) {
if (sc->sc_state == S_IDLE)
udinit(ui->ui_ctlr);
if (sc->sc_state != S_RUN) {
if (sc->sc_state == S_IDLE)
udinit(ui->ui_ctlr);
/* SHOULD PROBABLY FORCE AN ONLINE ATTEMPT
TO SEE IF DISK IS REALLY THERE */
}
/* SHOULD PROBABLY FORCE AN ONLINE ATTEMPT
TO SEE IF DISK IS REALLY THERE */
}
register int unit;
int xunit = minor(bp->b_dev) & 07;
daddr_t sz, maxsz;
register int unit;
int xunit = minor(bp->b_dev) & 07;
daddr_t sz, maxsz;
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
if (bp->b_blkno < 0 || bp->b_blkno+sz > maxsz ||
ra_sizes[xunit].blkoff >= radsize[unit])
goto bad;
if (bp->b_blkno < 0 || bp->b_blkno+sz > maxsz ||
ra_sizes[xunit].blkoff >= radsize[unit])
goto bad;
/*
* Link the buffer onto the drive queue
*/
/*
* Link the buffer onto the drive queue
*/
#endif
(void) udstart(um);
}
#endif
(void) udstart(um);
}
-/* up.c 4.40 81/11/18 */
+/* up.c 4.41 82/01/17 */
#include "up.h"
#if NSC > 0
#include "up.h"
#if NSC > 0
register struct buf *dp;
int xunit = minor(bp->b_dev) & 07;
long bn, sz;
register struct buf *dp;
int xunit = minor(bp->b_dev) & 07;
long bn, sz;
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
sz = (bp->b_bcount+511) >> 9;
unit = dkunit(bp);
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
(bn = dkblock(bp))+sz > st->sizes[xunit].nblocks)
goto bad;
bp->b_cylin = bn/st->nspc + st->sizes[xunit].cyloff;
dp = &uputab[ui->ui_unit];
disksort(dp, bp);
if (dp->b_active == 0) {
dp = &uputab[ui->ui_unit];
disksort(dp, bp);
if (dp->b_active == 0) {
if (bp->b_actf && bp->b_active == 0)
(void) upstart(ui->ui_mi);
}
if (bp->b_actf && bp->b_active == 0)
(void) upstart(ui->ui_mi);
}