in adosfs_read(), only do the UBC thang for "FFS" files (ie. those that

don't mix data and metadata in the same sector).  in adosfs_bmap(), set
the "run" return value to 0 to indicate the result is only good for 1 block.
these fix the rest of PR 12270.
This commit is contained in:
chs 2001-04-12 04:12:04 +00:00
parent ae21cdde67
commit 49a0cbf7f6
1 changed files with 8 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: advnops.c,v 1.57 2001/02/27 04:37:44 chs Exp $ */
/* $NetBSD: advnops.c,v 1.58 2001/04/12 04:12:04 chs Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -269,7 +269,7 @@ adosfs_read(v)
* taken from ufs_read()
*/
if (vp->v_type == VREG) {
if (vp->v_type == VREG && IS_FFS(amp)) {
error = 0;
while (uio->uio_resid > 0) {
void *win;
@ -291,10 +291,6 @@ adosfs_read(v)
}
do {
/*
* we are only supporting ADosFFS currently
* (which have data blocks without headers)
*/
size = amp->dbsize;
lbn = uio->uio_offset / size;
on = uio->uio_offset % size;
@ -329,8 +325,7 @@ adosfs_read(v)
bp->b_blkno / (amp->bsize / DEV_BSIZE));
#endif
error = EINVAL;
}
else if ( adoscksum(bp, ap->nwords)) {
} else if (adoscksum(bp, ap->nwords)) {
#ifdef DIAGNOSTIC
printf("adosfs: blk %ld failed cksum.\n",
bp->b_blkno / (amp->bsize / DEV_BSIZE));
@ -487,6 +482,9 @@ adosfs_bmap(v)
ap = VTOA(sp->a_vp);
bn = sp->a_bn / (ap->amp->bsize / DEV_BSIZE);
bnp = sp->a_bnp;
if (sp->a_runp) {
*sp->a_runp = 0;
}
error = 0;
if (sp->a_vpp != NULL)