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

Function sglist_append_bio

freebsd/kern/subr_sglist.c:336–347  ·  view source on GitHub ↗

* Append the segments to describe a bio's data to a scatter/gather list. * If there are insufficient segments, then this fails with EFBIG. * * NOTE: This function expects bio_bcount to be initialized. */

Source from the content-addressed store, hash-verified

334 * NOTE: This function expects bio_bcount to be initialized.
335 */
336int
337sglist_append_bio(struct sglist *sg, struct bio *bp)
338{
339 int error;
340
341 if ((bp->bio_flags & BIO_UNMAPPED) == 0)
342 error = sglist_append(sg, bp->bio_data, bp->bio_bcount);
343 else
344 error = sglist_append_vmpages(sg, bp->bio_ma,
345 bp->bio_ma_offset, bp->bio_bcount);
346 return (error);
347}
348
349/*
350 * Append a single physical address range to a scatter/gather list.

Callers

nothing calls this directly

Calls 2

sglist_appendFunction · 0.85
sglist_append_vmpagesFunction · 0.85

Tested by

no test coverage detected