mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
DuH!
bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file)
This commit is contained in:
parent
cc81271eaa
commit
2c18019f14
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121205
@ -1544,6 +1544,7 @@ rf_DispatchKernelIO(queue, req)
|
||||
raidbp->rf_buf.b_vp->v_numoutput++;
|
||||
}
|
||||
#endif
|
||||
raidbp->rf_buf.b_iooffset = dbtob(raidbp->rf_buf.b_blkno);
|
||||
(*devsw(raidbp->rf_buf.bio_dev)->d_strategy)(&raidbp->rf_buf);
|
||||
|
||||
break;
|
||||
@ -1861,7 +1862,7 @@ raidread_component_label(dev, b_vp, clabel)
|
||||
|
||||
/* get our ducks in a row for the read */
|
||||
bp->b_blkno = RF_COMPONENT_INFO_OFFSET / DEV_BSIZE;
|
||||
bp->b_offset = RF_COMPONENT_INFO_OFFSET;
|
||||
bp->b_iooffset = RF_COMPONENT_INFO_OFFSET;
|
||||
bp->b_bcount = RF_COMPONENT_INFO_SIZE;
|
||||
bp->b_iocmd = BIO_READ;
|
||||
bp->b_resid = RF_COMPONENT_INFO_SIZE / DEV_BSIZE;
|
||||
@ -1901,7 +1902,7 @@ raidwrite_component_label(dev, b_vp, clabel)
|
||||
/* get our ducks in a row for the write */
|
||||
bp->b_flags = 0;
|
||||
bp->b_blkno = RF_COMPONENT_INFO_OFFSET / DEV_BSIZE;
|
||||
bp->b_offset = RF_COMPONENT_INFO_OFFSET;
|
||||
bp->b_iooffset = RF_COMPONENT_INFO_OFFSET;
|
||||
bp->b_bcount = RF_COMPONENT_INFO_SIZE;
|
||||
bp->b_iocmd = BIO_WRITE;
|
||||
bp->b_resid = RF_COMPONENT_INFO_SIZE / DEV_BSIZE;
|
||||
|
@ -737,7 +737,7 @@ cd9660_strategy(ap)
|
||||
}
|
||||
vp = ip->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ hpfs_strategy(ap)
|
||||
return (0);
|
||||
}
|
||||
bp->b_dev = hp->h_devvp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(hp->h_devvp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -1785,7 +1785,7 @@ msdosfs_strategy(ap)
|
||||
*/
|
||||
vp = dep->de_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -839,7 +839,7 @@ udf_strategy(struct vop_strategy_args *a)
|
||||
}
|
||||
vp = node->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
|
||||
bp->b_flags &= ~B_INVAL;
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
|
||||
error = bufwait(bp);
|
||||
|
@ -404,7 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
panic("ext2_indirtrunc: bad buffer size");
|
||||
bp->b_blkno = dbn;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(vp, bp);
|
||||
error = bufwait(bp);
|
||||
}
|
||||
|
@ -1484,7 +1484,7 @@ ext2_strategy(ap)
|
||||
}
|
||||
vp = ip->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
|
||||
bp->b_flags &= ~B_INVAL;
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
|
||||
error = bufwait(bp);
|
||||
|
@ -404,7 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
panic("ext2_indirtrunc: bad buffer size");
|
||||
bp->b_blkno = dbn;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(vp, bp);
|
||||
error = bufwait(bp);
|
||||
}
|
||||
|
@ -1484,7 +1484,7 @@ ext2_strategy(ap)
|
||||
}
|
||||
vp = ip->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ cd9660_strategy(ap)
|
||||
}
|
||||
vp = ip->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
if ((bp->b_flags & B_ASYNC) || bp->b_iodone != NULL)
|
||||
BUF_KERNPROC(bp);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
error = VOP_STRATEGY(vp, bp);
|
||||
curproc->p_stats->p_ru.ru_inblock++;
|
||||
if (error)
|
||||
@ -294,7 +294,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
|
||||
rbp->b_ioflags &= ~BIO_ERROR;
|
||||
if ((rbp->b_flags & B_ASYNC) || rbp->b_iodone != NULL)
|
||||
BUF_KERNPROC(rbp);
|
||||
rbp->b_offset = dbtob(rbp->b_blkno);
|
||||
rbp->b_iooffset = dbtob(rbp->b_blkno);
|
||||
(void) VOP_STRATEGY(vp, rbp);
|
||||
curproc->p_stats->p_ru.ru_inblock++;
|
||||
}
|
||||
|
@ -2975,7 +2975,7 @@ nfs_writebp(struct buf *bp, int force, struct thread *td)
|
||||
if (force)
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
BUF_KERNPROC(bp);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
||||
if( (oldflags & B_ASYNC) == 0) {
|
||||
|
@ -114,6 +114,7 @@ struct buf {
|
||||
#define b_error b_io.bio_error
|
||||
#define b_iocmd b_io.bio_cmd
|
||||
#define b_ioflags b_io.bio_flags
|
||||
#define b_iooffset b_io.bio_offset
|
||||
#define b_pblkno b_io.bio_pblkno
|
||||
#define b_resid b_io.bio_resid
|
||||
struct buf_ops *b_op;
|
||||
|
@ -565,7 +565,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
panic("ffs_indirtrunc: bad buffer size");
|
||||
bp->b_blkno = dbn;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
error = bufwait(bp);
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb)
|
||||
bp->b_flags &= ~B_INVAL;
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
|
||||
error = bufwait(bp);
|
||||
|
@ -1969,7 +1969,7 @@ ufs_strategy(ap)
|
||||
}
|
||||
vp = ip->i_devvp;
|
||||
bp->b_dev = vp->v_rdev;
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
return (0);
|
||||
}
|
||||
|
@ -2541,7 +2541,7 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp)
|
||||
}
|
||||
bp->b_vp = vp2;
|
||||
splx(s);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(vp2, bp);
|
||||
return;
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ vnode_pager_input_smlfs(object, m)
|
||||
runningbufspace += bp->b_runningbufspace;
|
||||
|
||||
/* do the input */
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_SPECSTRATEGY(bp->b_vp, bp);
|
||||
|
||||
/* we definitely need to be at splvm here */
|
||||
@ -817,7 +817,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
|
||||
cnt.v_vnodepgsin += count;
|
||||
|
||||
/* do the input */
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
if (dp->v_type == VCHR)
|
||||
VOP_SPECSTRATEGY(bp->b_vp, bp);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user