FreeBSD kernel kern code
subr_blist.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/kernel.h>
#include <sys/blist.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/mutex.h>
Include dependency graph for subr_blist.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
static daddr_t blst_leaf_alloc (blmeta_t *scan, daddr_t blk, int count)
 
static daddr_t blst_meta_alloc (blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, int skip)
 
static void blst_leaf_free (blmeta_t *scan, daddr_t relblk, int count)
 
static void blst_meta_free (blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, int skip, daddr_t blk)
 
static void blst_copy (blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, blist_t dest, daddr_t count)
 
static int blst_leaf_fill (blmeta_t *scan, daddr_t blk, int count)
 
static int blst_meta_fill (blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, int skip, daddr_t blk)
 
static daddr_t blst_radix_init (blmeta_t *scan, daddr_t radix, int skip, daddr_t count)
 
static MALLOC_DEFINE (M_SWAP,"SWAP","Swap space")
 
blist_t blist_create (daddr_t blocks, int flags)
 
void blist_destroy (blist_t bl)
 
daddr_t blist_alloc (blist_t bl, daddr_t count)
 
void blist_free (blist_t bl, daddr_t blkno, daddr_t count)
 
int blist_fill (blist_t bl, daddr_t blkno, daddr_t count)
 
void blist_resize (blist_t *pbl, daddr_t count, int freenew, int flags)
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
daddr_t blist_alloc ( blist_t  bl,
daddr_t  count 
)

Definition at line 214 of file subr_blist.c.

References blst_leaf_alloc(), blst_meta_alloc(), and count.

Here is the call graph for this function:

blist_t blist_create ( daddr_t  blocks,
int  flags 
)

Definition at line 159 of file subr_blist.c.

References blst_radix_init(), malloc(), and printf().

Referenced by blist_resize().

Here is the call graph for this function:

Here is the caller graph for this function:

void blist_destroy ( blist_t  bl)

Definition at line 201 of file subr_blist.c.

References free().

Referenced by blist_resize().

Here is the call graph for this function:

Here is the caller graph for this function:

int blist_fill ( blist_t  bl,
daddr_t  blkno,
daddr_t  count 
)

Definition at line 255 of file subr_blist.c.

References blst_leaf_fill(), and blst_meta_fill().

Here is the call graph for this function:

void blist_free ( blist_t  bl,
daddr_t  blkno,
daddr_t  count 
)

Definition at line 236 of file subr_blist.c.

References blst_leaf_free(), blst_meta_free(), and count.

Referenced by blist_resize(), and blst_copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void blist_resize ( blist_t *  pbl,
daddr_t  count,
int  freenew,
int  flags 
)

Definition at line 280 of file subr_blist.c.

References blist_create(), blist_destroy(), blist_free(), and blst_copy().

Here is the call graph for this function:

static void blst_copy ( blmeta_t *  scan,
daddr_t  blk,
daddr_t  radix,
daddr_t  skip,
blist_t  dest,
daddr_t  count 
)
static

Definition at line 637 of file subr_blist.c.

References blist_free(), and count.

Referenced by blist_resize().

Here is the call graph for this function:

Here is the caller graph for this function:

static daddr_t blst_leaf_alloc ( blmeta_t *  scan,
daddr_t  blk,
int  count 
)
static

Definition at line 335 of file subr_blist.c.

References count, and mask.

Referenced by blist_alloc(), and blst_meta_alloc().

Here is the caller graph for this function:

static int blst_leaf_fill ( blmeta_t *  scan,
daddr_t  blk,
int  count 
)
static

Definition at line 733 of file subr_blist.c.

References mask.

Referenced by blist_fill(), and blst_meta_fill().

Here is the caller graph for this function:

static void blst_leaf_free ( blmeta_t *  scan,
daddr_t  relblk,
int  count 
)
static

Definition at line 497 of file subr_blist.c.

References mask, and panic().

Referenced by blist_free(), and blst_meta_free().

Here is the call graph for this function:

Here is the caller graph for this function:

static daddr_t blst_meta_alloc ( blmeta_t *  scan,
daddr_t  blk,
daddr_t  count,
daddr_t  radix,
int  skip 
)
static

Definition at line 411 of file subr_blist.c.

References blst_leaf_alloc(), count, and panic().

Referenced by blist_alloc().

Here is the call graph for this function:

Here is the caller graph for this function:

static int blst_meta_fill ( blmeta_t *  scan,
daddr_t  allocBlk,
daddr_t  count,
daddr_t  radix,
int  skip,
daddr_t  blk 
)
static

Definition at line 760 of file subr_blist.c.

References blst_leaf_fill(), count, and panic().

Referenced by blist_fill().

Here is the call graph for this function:

Here is the caller graph for this function:

static void blst_meta_free ( blmeta_t *  scan,
daddr_t  freeBlk,
daddr_t  count,
daddr_t  radix,
int  skip,
daddr_t  blk 
)
static

Definition at line 541 of file subr_blist.c.

References blst_leaf_free(), count, panic(), and printf().

Referenced by blist_free().

Here is the call graph for this function:

Here is the caller graph for this function:

static daddr_t blst_radix_init ( blmeta_t *  scan,
daddr_t  radix,
int  skip,
daddr_t  count 
)
static

Definition at line 845 of file subr_blist.c.

Referenced by blist_create().

Here is the caller graph for this function:

static MALLOC_DEFINE ( M_SWAP  ,
"SWAP"  ,
"Swap space"   
)
static