Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_cluster.c
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | if (bp) { | ||||
bstrategy(bp); | bstrategy(bp); | ||||
#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); | ||||
} | } | ||||
/* | /* | ||||
* If we have been doing sequential I/O, then do some read-ahead. | * If we have been doing sequential I/O, then do some read-ahead. | ||||
*/ | */ | ||||
while (lblkno < (origblkno + maxra)) { | while (lblkno < (origblkno + maxra)) { | ||||
error = VOP_BMAP(vp, lblkno, NULL, &blkno, &ncontig, NULL); | error = VOP_BMAP(vp, lblkno, NULL, &blkno, &ncontig, NULL); | ||||
if (error) | if (error) | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | while (lblkno < (origblkno + maxra)) { | ||||
bstrategy(rbp); | bstrategy(rbp); | ||||
#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, rbp, 0); | racct_add_buf(td->td_proc, rbp, 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); | ||||
} | } | ||||
if (reqbp) { | if (reqbp) { | ||||
/* | /* | ||||
* Like bread, always brelse() the buffer when | * Like bread, always brelse() the buffer when | ||||
* returning an error. | * returning an error. | ||||
*/ | */ | ||||
error = bufwait(reqbp); | error = bufwait(reqbp); | ||||
▲ Show 20 Lines • Show All 765 Lines • Show Last 20 Lines |