FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bio.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/sglist.h>
#include <sys/uio.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <sys/ktr.h>
Go to the source code of this file.
Data Structures | |
struct | sgsave |
Macros | |
#define | SGLIST_SAVE(sg, sgsave) |
#define | SGLIST_RESTORE(sg, sgsave) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_SGLIST, "sglist", "scatter/gather lists") |
static __inline int | _sglist_append_range (struct sglist *sg, struct sglist_seg **ssp, vm_paddr_t paddr, size_t len) |
static __inline int | _sglist_append_buf (struct sglist *sg, void *buf, size_t len, pmap_t pmap, size_t *donep) |
int | sglist_count (void *buf, size_t len) |
int | sglist_count_vmpages (vm_page_t *m, size_t pgoff, size_t len) |
int | sglist_count_mbuf_epg (struct mbuf *m, size_t off, size_t len) |
struct sglist * | sglist_alloc (int nsegs, int mflags) |
void | sglist_free (struct sglist *sg) |
int | sglist_append (struct sglist *sg, void *buf, size_t len) |
int | sglist_append_bio (struct sglist *sg, struct bio *bp) |
int | sglist_append_phys (struct sglist *sg, vm_paddr_t paddr, size_t len) |
int | sglist_append_mbuf_epg (struct sglist *sg, struct mbuf *m, size_t off, size_t len) |
int | sglist_append_mbuf (struct sglist *sg, struct mbuf *m0) |
int | sglist_append_single_mbuf (struct sglist *sg, struct mbuf *m) |
int | sglist_append_vmpages (struct sglist *sg, vm_page_t *m, size_t pgoff, size_t len) |
int | sglist_append_user (struct sglist *sg, void *buf, size_t len, struct thread *td) |
int | sglist_append_sglist (struct sglist *sg, struct sglist *source, size_t offset, size_t length) |
int | sglist_append_uio (struct sglist *sg, struct uio *uio) |
int | sglist_consume_uio (struct sglist *sg, struct uio *uio, size_t resid) |
struct sglist * | sglist_build (void *buf, size_t len, int mflags) |
struct sglist * | sglist_clone (struct sglist *sg, int mflags) |
size_t | sglist_length (struct sglist *sg) |
int | sglist_split (struct sglist *original, struct sglist **head, size_t length, int mflags) |
int | sglist_join (struct sglist *first, struct sglist *second) |
int | sglist_slice (struct sglist *original, struct sglist **slice, size_t offset, size_t length, int mflags) |
#define SGLIST_RESTORE | ( | sg, | |
sgsave | |||
) |
Definition at line 74 of file subr_sglist.c.
#define SGLIST_SAVE | ( | sg, | |
sgsave | |||
) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 111 of file subr_sglist.c.
References _sglist_append_range(), and buf.
Referenced by sglist_append(), sglist_append_uio(), sglist_append_user(), and sglist_consume_uio().
|
static |
Definition at line 86 of file subr_sglist.c.
Referenced by _sglist_append_buf(), sglist_append_phys(), sglist_append_sglist(), and sglist_append_vmpages().
|
static |
struct sglist * sglist_alloc | ( | int | nsegs, |
int | mflags | ||
) |
Definition at line 284 of file subr_sglist.c.
References malloc().
Referenced by sglist_build(), sglist_clone(), sglist_slice(), and sglist_split().
int sglist_append | ( | struct sglist * | sg, |
void * | buf, | ||
size_t | len | ||
) |
Definition at line 316 of file subr_sglist.c.
References _sglist_append_buf(), buf, SGLIST_RESTORE, and SGLIST_SAVE.
Referenced by sglist_append_bio(), sglist_append_mbuf(), sglist_append_mbuf_epg(), sglist_append_single_mbuf(), and sglist_build().
int sglist_append_bio | ( | struct sglist * | sg, |
struct bio * | bp | ||
) |
Definition at line 337 of file subr_sglist.c.
References sglist_append(), and sglist_append_vmpages().
int sglist_append_mbuf | ( | struct sglist * | sg, |
struct mbuf * | m0 | ||
) |
Definition at line 441 of file subr_sglist.c.
References sglist_append(), sglist_append_mbuf_epg(), SGLIST_RESTORE, and SGLIST_SAVE.
int sglist_append_mbuf_epg | ( | struct sglist * | sg, |
struct mbuf * | m, | ||
size_t | off, | ||
size_t | len | ||
) |
Definition at line 384 of file subr_sglist.c.
References sglist_append(), and sglist_append_phys().
Referenced by sglist_append_mbuf(), and sglist_append_single_mbuf().
int sglist_append_phys | ( | struct sglist * | sg, |
vm_paddr_t | paddr, | ||
size_t | len | ||
) |
Definition at line 354 of file subr_sglist.c.
References _sglist_append_range(), SGLIST_RESTORE, SGLIST_SAVE, and sgsave::ss_len.
Referenced by sglist_append_mbuf_epg().
int sglist_append_sglist | ( | struct sglist * | sg, |
struct sglist * | source, | ||
size_t | offset, | ||
size_t | length | ||
) |
Definition at line 556 of file subr_sglist.c.
References _sglist_append_range(), SGLIST_RESTORE, and SGLIST_SAVE.
int sglist_append_single_mbuf | ( | struct sglist * | sg, |
struct mbuf * | m | ||
) |
Definition at line 475 of file subr_sglist.c.
References sglist_append(), and sglist_append_mbuf_epg().
int sglist_append_uio | ( | struct sglist * | sg, |
struct uio * | uio | ||
) |
Definition at line 599 of file subr_sglist.c.
References _sglist_append_buf(), SGLIST_RESTORE, and SGLIST_SAVE.
int sglist_append_user | ( | struct sglist * | sg, |
void * | buf, | ||
size_t | len, | ||
struct thread * | td | ||
) |
Definition at line 535 of file subr_sglist.c.
References _sglist_append_buf(), buf, SGLIST_RESTORE, and SGLIST_SAVE.
int sglist_append_vmpages | ( | struct sglist * | sg, |
vm_page_t * | m, | ||
size_t | pgoff, | ||
size_t | len | ||
) |
Definition at line 490 of file subr_sglist.c.
References _sglist_append_range(), SGLIST_RESTORE, and SGLIST_SAVE.
Referenced by sglist_append_bio().
struct sglist * sglist_build | ( | void * | buf, |
size_t | len, | ||
int | mflags | ||
) |
Definition at line 697 of file subr_sglist.c.
References buf, sglist_alloc(), sglist_append(), sglist_count(), and sglist_free().
struct sglist * sglist_clone | ( | struct sglist * | sg, |
int | mflags | ||
) |
Definition at line 720 of file subr_sglist.c.
References sglist_alloc().
int sglist_consume_uio | ( | struct sglist * | sg, |
struct uio * | uio, | ||
size_t | resid | ||
) |
Definition at line 647 of file subr_sglist.c.
References _sglist_append_buf().
int sglist_count | ( | void * | buf, |
size_t | len | ||
) |
Definition at line 172 of file subr_sglist.c.
References buf.
Referenced by sglist_build(), and sglist_count_mbuf_epg().
int sglist_count_mbuf_epg | ( | struct mbuf * | m, |
size_t | off, | ||
size_t | len | ||
) |
Definition at line 226 of file subr_sglist.c.
References sglist_count().
int sglist_count_vmpages | ( | vm_page_t * | m, |
size_t | pgoff, | ||
size_t | len | ||
) |
Definition at line 201 of file subr_sglist.c.
void sglist_free | ( | struct sglist * | sg | ) |
Definition at line 300 of file subr_sglist.c.
References free().
Referenced by sglist_build().
int sglist_join | ( | struct sglist * | first, |
struct sglist * | second | ||
) |
Definition at line 847 of file subr_sglist.c.
size_t sglist_length | ( | struct sglist * | sg | ) |
Definition at line 740 of file subr_sglist.c.
int sglist_slice | ( | struct sglist * | original, |
struct sglist ** | slice, | ||
size_t | offset, | ||
size_t | length, | ||
int | mflags | ||
) |
Definition at line 900 of file subr_sglist.c.
References count, and sglist_alloc().
int sglist_split | ( | struct sglist * | original, |
struct sglist ** | head, | ||
size_t | length, | ||
int | mflags | ||
) |
Definition at line 769 of file subr_sglist.c.
References count, and sglist_alloc().