Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clvnops.c
Show First 20 Lines • Show All 2,738 Lines • ▼ Show 20 Lines | nfs_strategy(struct vop_strategy_args *ap) | ||||
bp = ap->a_bp; | bp = ap->a_bp; | ||||
vp = ap->a_vp; | vp = ap->a_vp; | ||||
KASSERT(bp->b_vp == vp, ("missing b_getvp")); | KASSERT(bp->b_vp == vp, ("missing b_getvp")); | ||||
KASSERT(!(bp->b_flags & B_DONE), | KASSERT(!(bp->b_flags & B_DONE), | ||||
("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp)); | ("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp)); | ||||
if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno) | if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno) | ||||
bp->b_blkno = bp->b_lblkno * (vp->v_bufobj.bo_bsize / | bp->b_blkno = bp->b_lblkno * (vp2bo(vp)->bo_bsize / DEV_BSIZE); | ||||
DEV_BSIZE); | |||||
if (bp->b_iocmd == BIO_READ) | if (bp->b_iocmd == BIO_READ) | ||||
cr = bp->b_rcred; | cr = bp->b_rcred; | ||||
else | else | ||||
cr = bp->b_wcred; | cr = bp->b_wcred; | ||||
/* | /* | ||||
* If the op is asynchronous and an i/o daemon is waiting | * If the op is asynchronous and an i/o daemon is waiting | ||||
* queue the request, wake it up and wait for completion | * queue the request, wake it up and wait for completion | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | #endif | ||||
u_int bvecsize = 0, bveccount; | u_int bvecsize = 0, bveccount; | ||||
if (called_from_renewthread != 0) | if (called_from_renewthread != 0) | ||||
slptimeo = hz; | slptimeo = hz; | ||||
if (nmp->nm_flag & NFSMNT_INT) | if (nmp->nm_flag & NFSMNT_INT) | ||||
slpflag = PCATCH; | slpflag = PCATCH; | ||||
if (!commit) | if (!commit) | ||||
passone = 0; | passone = 0; | ||||
bo = &vp->v_bufobj; | bo = vp2bo(vp); | ||||
/* | /* | ||||
* A b_flags == (B_DELWRI | B_NEEDCOMMIT) block has been written to the | * A b_flags == (B_DELWRI | B_NEEDCOMMIT) block has been written to the | ||||
* server, but has not been committed to stable storage on the server | * server, but has not been committed to stable storage on the server | ||||
* yet. On the first pass, the byte range is worked out and the commit | * yet. On the first pass, the byte range is worked out and the commit | ||||
* rpc is done. On the second pass, ncl_writebp() is called to do the | * rpc is done. On the second pass, ncl_writebp() is called to do the | ||||
* job. | * job. | ||||
*/ | */ | ||||
again: | again: | ||||
▲ Show 20 Lines • Show All 1,463 Lines • Show Last 20 Lines |