Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_bio.c
Show First 20 Lines • Show All 2,126 Lines • ▼ Show 20 Lines | for (i = 0; i < cnt; i++, rablkno++, rabsize++) { | ||||
} | } | ||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | if (racct_enable) { | ||||
PROC_LOCK(curproc); | PROC_LOCK(curproc); | ||||
racct_add_buf(curproc, rabp, 0); | racct_add_buf(curproc, rabp, 0); | ||||
PROC_UNLOCK(curproc); | PROC_UNLOCK(curproc); | ||||
} | } | ||||
#endif /* RACCT */ | #endif /* RACCT */ | ||||
td->td_ru.ru_inblock++; | RU_ATOMIC_INC(td->td_ru.ru_inblock); | ||||
rabp->b_flags |= B_ASYNC; | rabp->b_flags |= B_ASYNC; | ||||
rabp->b_flags &= ~B_INVAL; | rabp->b_flags &= ~B_INVAL; | ||||
if ((flags & GB_CKHASH) != 0) { | if ((flags & GB_CKHASH) != 0) { | ||||
rabp->b_flags |= B_CKHASH; | rabp->b_flags |= B_CKHASH; | ||||
rabp->b_ckhashcalc = ckhashfunc; | rabp->b_ckhashcalc = ckhashfunc; | ||||
} | } | ||||
rabp->b_ioflags &= ~BIO_ERROR; | rabp->b_ioflags &= ~BIO_ERROR; | ||||
rabp->b_iocmd = BIO_READ; | rabp->b_iocmd = BIO_READ; | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | breadn_flags(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, | ||||
if ((bp->b_flags & B_CACHE) == 0) { | if ((bp->b_flags & B_CACHE) == 0) { | ||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | if (racct_enable) { | ||||
PROC_LOCK(td->td_proc); | PROC_LOCK(td->td_proc); | ||||
racct_add_buf(td->td_proc, bp, 0); | racct_add_buf(td->td_proc, bp, 0); | ||||
PROC_UNLOCK(td->td_proc); | PROC_UNLOCK(td->td_proc); | ||||
} | } | ||||
#endif /* RACCT */ | #endif /* RACCT */ | ||||
td->td_ru.ru_inblock++; | RU_ATOMIC_INC(td->td_ru.ru_inblock); | ||||
bp->b_iocmd = BIO_READ; | bp->b_iocmd = BIO_READ; | ||||
bp->b_flags &= ~B_INVAL; | bp->b_flags &= ~B_INVAL; | ||||
if ((flags & GB_CKHASH) != 0) { | if ((flags & GB_CKHASH) != 0) { | ||||
bp->b_flags |= B_CKHASH; | bp->b_flags |= B_CKHASH; | ||||
bp->b_ckhashcalc = ckhashfunc; | bp->b_ckhashcalc = ckhashfunc; | ||||
} | } | ||||
if ((flags & GB_CVTENXIO) != 0) | if ((flags & GB_CVTENXIO) != 0) | ||||
bp->b_xflags |= BX_CVTENXIO; | bp->b_xflags |= BX_CVTENXIO; | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | if (racct_enable) { | ||||
PROC_LOCK(curproc); | PROC_LOCK(curproc); | ||||
racct_add_buf(curproc, bp, 1); | racct_add_buf(curproc, bp, 1); | ||||
PROC_UNLOCK(curproc); | PROC_UNLOCK(curproc); | ||||
} | } | ||||
#endif /* RACCT */ | #endif /* RACCT */ | ||||
curthread->td_ru.ru_oublock++; | RU_ATOMIC_INC(curthread->td_ru.ru_oublock); | ||||
if (oldflags & B_ASYNC) | if (oldflags & B_ASYNC) | ||||
BUF_KERNPROC(bp); | BUF_KERNPROC(bp); | ||||
bp->b_iooffset = dbtob(bp->b_blkno); | bp->b_iooffset = dbtob(bp->b_blkno); | ||||
buf_track(bp, __func__); | buf_track(bp, __func__); | ||||
bstrategy(bp); | bstrategy(bp); | ||||
if ((oldflags & B_ASYNC) == 0) { | if ((oldflags & B_ASYNC) == 0) { | ||||
int rtval = bufwait(bp); | int rtval = bufwait(bp); | ||||
▲ Show 20 Lines • Show All 3,233 Lines • Show Last 20 Lines |