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

Function sglist_append

freebsd/kern/subr_sglist.c:315–328  ·  view source on GitHub ↗

* Append the segments to describe a single kernel virtual address * range to a scatter/gather list. If there are insufficient * segments, then this fails with EFBIG. */

Source from the content-addressed store, hash-verified

313 * segments, then this fails with EFBIG.
314 */
315int
316sglist_append(struct sglist *sg, void *buf, size_t len)
317{
318 struct sgsave save;
319 int error;
320
321 if (sg->sg_maxseg == 0)
322 return (EINVAL);
323 SGLIST_SAVE(sg, save);
324 error = _sglist_append_buf(sg, buf, len, NULL, NULL);
325 if (error)
326 SGLIST_RESTORE(sg, save);
327 return (error);
328}
329
330/*
331 * Append the segments to describe a bio's data to a scatter/gather list.

Callers 8

ccp_do_hmacFunction · 0.85
ccp_do_pst_to_lsbFunction · 0.85
ccp_gcmFunction · 0.85
ccp_populate_sglistFunction · 0.85
sglist_append_bioFunction · 0.85
sglist_append_mbuf_epgFunction · 0.85
sglist_append_mbufFunction · 0.85
sglist_buildFunction · 0.85

Calls 1

_sglist_append_bufFunction · 0.85

Tested by

no test coverage detected