summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9596e28)
SCCS-vsn: sys/ufs/lfs/lfs_balloc.c 7.29
SCCS-vsn: sys/ufs/lfs/lfs_segment.c 7.19
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_balloc.c 7.28 (Berkeley) %G%
+ * @(#)lfs_balloc.c 7.29 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
register struct inode *ip;
struct buf *bp;
struct lfs *fs;
register struct inode *ip;
struct buf *bp;
struct lfs *fs;
bp->b_blkno = daddr;
bp->b_flags |= B_READ;
bp->b_dev = devvp->v_rdev;
bp->b_blkno = daddr;
bp->b_flags |= B_READ;
bp->b_dev = devvp->v_rdev;
- (devvp->v_op->vop_strategy)(bp);
+ /*
+ * Call a strategy VOP by hand.
+ */
+ vop_strategy_a.a_desc = VDESC(vop_strategy);
+ vop_strategy_a.a_bp=bp;
+ VOCALL(devvp->v_op, VOFFSET(vop_strategy), \
+ &vop_strategy_a);
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
if (error = biowait(bp)) {
brelse(bp);
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
if (error = biowait(bp)) {
brelse(bp);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_segment.c 7.18 (Berkeley) %G%
+ * @(#)lfs_segment.c 7.19 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
struct lfs *fs;
struct segment *sp;
{
struct lfs *fs;
struct segment *sp;
{
struct buf **bpp, *bp, *cbp;
SEGUSE *sup;
SEGSUM *ssp;
dev_t i_dev;
u_long *datap, *dp;
size_t size;
struct buf **bpp, *bp, *cbp;
SEGUSE *sup;
SEGSUM *ssp;
dev_t i_dev;
u_long *datap, *dp;
size_t size;
- int ch_per_blk, i, nblocks, num, s, (*strategy)__P((struct buf *));
+ int ch_per_blk, i, nblocks, num, s, (*strategy)__P((struct vop_strategy_args *));
free(datap, M_SEGMENT);
i_dev = VTOI(fs->lfs_ivnode)->i_dev;
free(datap, M_SEGMENT);
i_dev = VTOI(fs->lfs_ivnode)->i_dev;
- strategy = VTOI(fs->lfs_ivnode)->i_devvp->v_op->vop_strategy;
+ strategy = VTOI(fs->lfs_ivnode)->i_devvp->v_op[VOFFSET(vop_strategy)];
/*
* When we simply write the blocks we lose a rotation for every block
/*
* When we simply write the blocks we lose a rotation for every block
}
splx(s);
cbp->b_bcount = p - cbp->b_un.b_addr;
}
splx(s);
cbp->b_bcount = p - cbp->b_un.b_addr;
+ vop_strategy_a.a_desc = VDESC(vop_strategy);
+ vop_strategy_a.a_bp = cbp;
+ (strategy)(&vop_strategy_a);
}
/* Update the segment usage information. */
}
/* Update the segment usage information. */
struct lfs *fs;
struct segment *sp;
{
struct lfs *fs;
struct segment *sp;
{
struct buf *bp;
dev_t i_dev;
struct buf *bp;
dev_t i_dev;
- int (*strategy) __P((struct buf *));
+ int (*strategy) __P((struct vop_strategy_args *));
#ifdef VERBOSE
printf("lfs_writesuper\n");
#endif
i_dev = VTOI(fs->lfs_ivnode)->i_dev;
#ifdef VERBOSE
printf("lfs_writesuper\n");
#endif
i_dev = VTOI(fs->lfs_ivnode)->i_dev;
- strategy = VTOI(fs->lfs_ivnode)->i_devvp->v_op->vop_strategy;
+ strategy = VTOI(fs->lfs_ivnode)->i_devvp->v_op[VOFFSET(vop_strategy)];
/* Checksum the superblock and copy it into a buffer. */
fs->lfs_cksum = cksum(fs, sizeof(struct lfs) - sizeof(fs->lfs_cksum));
/* Checksum the superblock and copy it into a buffer. */
fs->lfs_cksum = cksum(fs, sizeof(struct lfs) - sizeof(fs->lfs_cksum));
bp->b_dev = i_dev;
bp->b_flags |= B_BUSY;
bp->b_flags &= ~(B_DONE | B_ERROR | B_READ | B_DELWRI);
bp->b_dev = i_dev;
bp->b_flags |= B_BUSY;
bp->b_flags &= ~(B_DONE | B_ERROR | B_READ | B_DELWRI);
+ vop_strategy_a.a_desc = VDESC(vop_strategy);
+ vop_strategy_a.a_bp = bp;
+ (strategy)(&vop_strategy_a);
biowait(bp);
/* Write the second superblock (don't wait). */
bp->b_blkno = bp->b_lblkno = fs->lfs_sboffs[1];
bp->b_flags |= B_ASYNC | B_BUSY;
bp->b_flags &= ~(B_DONE | B_ERROR | B_READ | B_DELWRI);
biowait(bp);
/* Write the second superblock (don't wait). */
bp->b_blkno = bp->b_lblkno = fs->lfs_sboffs[1];
bp->b_flags |= B_ASYNC | B_BUSY;
bp->b_flags &= ~(B_DONE | B_ERROR | B_READ | B_DELWRI);
+ (strategy)(&vop_strategy_a);