FreeBSD kernel kern code
subr_disk.c File Reference
#include <sys/cdefs.h>
#include "opt_geom.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/conf.h>
#include <sys/disk.h>
#include <sys/sysctl.h>
#include <geom/geom_disk.h>
Include dependency graph for subr_disk.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
 SYSCTL_INT (_debug, OID_AUTO, bioq_batchsize, CTLFLAG_RW, &bioq_batchsize, 0, "BIOQ batch size")
 
void disk_err (struct bio *bp, const char *what, int blkdone, int nl)
 
void bioq_init (struct bio_queue_head *head)
 
void bioq_remove (struct bio_queue_head *head, struct bio *bp)
 
void bioq_flush (struct bio_queue_head *head, struct devstat *stp, int error)
 
void bioq_insert_head (struct bio_queue_head *head, struct bio *bp)
 
void bioq_insert_tail (struct bio_queue_head *head, struct bio *bp)
 
struct bio * bioq_first (struct bio_queue_head *head)
 
struct bio * bioq_takefirst (struct bio_queue_head *head)
 
static uoff_t bioq_bio_key (struct bio_queue_head *head, struct bio *bp)
 
void bioq_disksort (struct bio_queue_head *head, struct bio *bp)
 

Variables

static int bioq_batchsize = 128
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ bioq_bio_key()

static uoff_t bioq_bio_key ( struct bio_queue_head *  head,
struct bio *  bp 
)
inlinestatic

Definition at line 235 of file subr_disk.c.

Referenced by bioq_disksort().

Here is the caller graph for this function:

◆ bioq_disksort()

void bioq_disksort ( struct bio_queue_head *  head,
struct bio *  bp 
)

Definition at line 249 of file subr_disk.c.

References bioq_batchsize, bioq_bio_key(), and bioq_insert_tail().

Here is the call graph for this function:

◆ bioq_first()

struct bio * bioq_first ( struct bio_queue_head *  head)

Definition at line 212 of file subr_disk.c.

◆ bioq_flush()

void bioq_flush ( struct bio_queue_head *  head,
struct devstat *  stp,
int  error 
)

Definition at line 181 of file subr_disk.c.

References biofinish(), and bioq_takefirst().

Here is the call graph for this function:

◆ bioq_init()

void bioq_init ( struct bio_queue_head *  head)

Definition at line 154 of file subr_disk.c.

◆ bioq_insert_head()

void bioq_insert_head ( struct bio_queue_head *  head,
struct bio *  bp 
)

Definition at line 190 of file subr_disk.c.

◆ bioq_insert_tail()

void bioq_insert_tail ( struct bio_queue_head *  head,
struct bio *  bp 
)

Definition at line 201 of file subr_disk.c.

Referenced by bioq_disksort().

Here is the caller graph for this function:

◆ bioq_remove()

void bioq_remove ( struct bio_queue_head *  head,
struct bio *  bp 
)

Definition at line 165 of file subr_disk.c.

Referenced by bioq_takefirst().

Here is the caller graph for this function:

◆ bioq_takefirst()

struct bio * bioq_takefirst ( struct bio_queue_head *  head)

Definition at line 219 of file subr_disk.c.

References bioq_remove().

Referenced by bioq_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disk_err()

void disk_err ( struct bio *  bp,
const char *  what,
int  blkdone,
int  nl 
)

Definition at line 41 of file subr_disk.c.

References devtoname(), and printf().

Here is the call graph for this function:

◆ SYSCTL_INT()

SYSCTL_INT ( _debug  ,
OID_AUTO  ,
bioq_batchsize  ,
CTLFLAG_RW  ,
bioq_batchsize,
,
"BIOQ batch size"   
)

Variable Documentation

◆ bioq_batchsize

int bioq_batchsize = 128
static

Definition at line 29 of file subr_disk.c.

Referenced by bioq_disksort().