* 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. */
| 334 | * NOTE: This function expects bio_bcount to be initialized. |
| 335 | */ |
| 336 | int |
| 337 | sglist_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. |
nothing calls this directly
no test coverage detected