MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bufwait

Function bufwait

freebsd/kern/vfs_bio.c:4418–4434  ·  view source on GitHub ↗

* bufwait: * * Wait for buffer I/O completion, returning error status. The buffer * is left locked and B_DONE on return. B_EINTR is converted into an EINTR * error and cleared. */

Source from the content-addressed store, hash-verified

4416 * error and cleared.
4417 */
4418int
4419bufwait(struct buf *bp)
4420{
4421 if (bp->b_iocmd == BIO_READ)
4422 bwait(bp, PRIBIO, "biord");
4423 else
4424 bwait(bp, PRIBIO, "biowr");
4425 if (bp->b_flags & B_EINTR) {
4426 bp->b_flags &= ~B_EINTR;
4427 return (EINTR);
4428 }
4429 if (bp->b_ioflags & BIO_ERROR) {
4430 return (bp->b_error ? bp->b_error : EIO);
4431 } else {
4432 return (0);
4433 }
4434}
4435
4436/*
4437 * bufdone:

Callers 3

breadn_flagsFunction · 0.85
bufwriteFunction · 0.85
cluster_readFunction · 0.85

Calls 1

bwaitFunction · 0.85

Tested by

no test coverage detected