FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/conf.h>
#include <sys/buf.h>
#include <sys/devicestat.h>
#include <sys/eventhandler.h>
#include <sys/fail.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <sys/vnode.h>
#include <geom/geom.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_kern.h>
#include <vm/vm_pageout.h>
#include <vm/vm_page.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <vm/vm_map.h>
#include "opt_compat.h"
#include "opt_directio.h"
#include "opt_swap.h"
#include "opt_ddb.h"
Go to the source code of this file.
Macros | |
#define | BUFFER_QUEUES 6 /* number of free buffer queues */ |
#define | QUEUE_NONE 0 /* on no queue */ |
#define | QUEUE_CLEAN 1 /* non-B_DELWRI buffers */ |
#define | QUEUE_DIRTY 2 /* B_DELWRI buffers */ |
#define | QUEUE_DIRTY_GIANT 3 /* B_DELWRI buffers that need giant */ |
#define | QUEUE_EMPTYKVA 4 /* empty buffer headers w/KVA assignment */ |
#define | QUEUE_EMPTY 5 /* empty buffer headers */ |
#define | QUEUE_SENTINEL 1024 /* not an queue index, but mark for sentinel */ |
#define | VFS_BIO_NEED_ANY 0x01 /* any freeable buffer */ |
#define | VFS_BIO_NEED_DIRTYFLUSH 0x02 /* waiting for dirty buffer flush */ |
#define | VFS_BIO_NEED_FREE 0x04 /* wait for free bufs, hi hysteresis */ |
#define | VFS_BIO_NEED_BUFSPACE 0x08 /* wait for buf space, lo hysteresis */ |
#define | NSWBUF_MIN 16 |
#define | TRANSIENT_DENOM 10 |
#define | BUF_CHECK_MAPPED(bp) do {} while (0) |
#define | BUF_CHECK_UNMAPPED(bp) do {} while (0) |
Functions | |
__FBSDID ("$BSDSUniX$") | |
static | MALLOC_DEFINE (M_BIOBUF,"biobuf","BIO buffer") |
static int | inmem (struct vnode *vp, daddr_t blkno) |
static void | vm_hold_free_pages (struct buf *bp, int newbsize) |
static void | vm_hold_load_pages (struct buf *bp, vm_offset_t from, vm_offset_t to) |
static void | vfs_page_set_valid (struct buf *bp, vm_ooffset_t off, vm_page_t m) |
static void | vfs_page_set_validclean (struct buf *bp, vm_ooffset_t off, vm_page_t m) |
static void | vfs_drain_busy_pages (struct buf *bp) |
static void | vfs_clean_pages_dirty_buf (struct buf *bp) |
static void | vfs_setdirty_locked_object (struct buf *bp) |
static void | vfs_vmio_release (struct buf *bp) |
static int | vfs_bio_clcheck (struct vnode *vp, int size, daddr_t lblkno, daddr_t blkno) |
static int | buf_do_flush (struct vnode *vp) |
static int | flushbufqueues (struct vnode *, int, int) |
static void | buf_daemon (void) |
static void | bremfreel (struct buf *bp) |
SYSCTL_INT (_vfs, OID_AUTO, vmiodirenable, CTLFLAG_RW,&vmiodirenable, 0,"Use the VM system for directory writes") | |
SYSCTL_LONG (_vfs, OID_AUTO, runningbufspace, CTLFLAG_RD,&runningbufspace, 0,"Amount of presently outstanding async buffer io") | |
SYSCTL_LONG (_vfs, OID_AUTO, bufspace, CTLFLAG_RD,&bufspace, 0,"Virtual memory used for buffers") | |
SYSCTL_LONG (_vfs, OID_AUTO, unmapped_bufspace, CTLFLAG_RD,&unmapped_bufspace, 0,"Amount of unmapped buffers, inclusive in the bufspace") | |
SYSCTL_LONG (_vfs, OID_AUTO, maxbufspace, CTLFLAG_RD,&maxbufspace, 0,"Maximum allowed value of bufspace (including buf_daemon)") | |
SYSCTL_LONG (_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD,&bufmallocspace, 0,"Amount of malloced memory for buffers") | |
SYSCTL_LONG (_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW,&maxbufmallocspace, 0,"Maximum amount of malloced memory for buffers") | |
SYSCTL_LONG (_vfs, OID_AUTO, lobufspace, CTLFLAG_RD,&lobufspace, 0,"Minimum amount of buffers we want to have") | |
SYSCTL_LONG (_vfs, OID_AUTO, hibufspace, CTLFLAG_RD,&hibufspace, 0,"Maximum allowed value of bufspace (excluding buf_daemon)") | |
SYSCTL_INT (_vfs, OID_AUTO, bufreusecnt, CTLFLAG_RW,&bufreusecnt, 0,"Number of times we have reused a buffer") | |
SYSCTL_INT (_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW,&buffreekvacnt, 0,"Number of times we have freed the KVA space from some buffer") | |
SYSCTL_INT (_vfs, OID_AUTO, bufdefragcnt, CTLFLAG_RW,&bufdefragcnt, 0,"Number of times we have had to repeat buffer allocation to defragment") | |
SYSCTL_LONG (_vfs, OID_AUTO, lorunningspace, CTLFLAG_RW,&lorunningspace, 0,"Minimum preferred space used for in-progress I/O") | |
SYSCTL_LONG (_vfs, OID_AUTO, hirunningspace, CTLFLAG_RW,&hirunningspace, 0,"Maximum amount of space to use for in-progress I/O") | |
SYSCTL_INT (_vfs, OID_AUTO, dirtybufferflushes, CTLFLAG_RW,&dirtybufferflushes, 0,"Number of bdwrite to bawrite conversions to limit dirty buffers") | |
SYSCTL_INT (_vfs, OID_AUTO, bdwriteskip, CTLFLAG_RW,&bdwriteskip, 0,"Number of buffers supplied to bdwrite with snapshot deadlock risk") | |
SYSCTL_INT (_vfs, OID_AUTO, altbufferflushes, CTLFLAG_RW,&altbufferflushes, 0,"Number of fsync flushes to limit dirty buffers") | |
SYSCTL_INT (_vfs, OID_AUTO, recursiveflushes, CTLFLAG_RW,&recursiveflushes, 0,"Number of flushes skipped due to being recursive") | |
SYSCTL_INT (_vfs, OID_AUTO, numdirtybuffers, CTLFLAG_RD,&numdirtybuffers, 0,"Number of buffers that are dirty (has unwritten changes) at the moment") | |
SYSCTL_INT (_vfs, OID_AUTO, lodirtybuffers, CTLFLAG_RW,&lodirtybuffers, 0,"How many buffers we want to have free before bufdaemon can sleep") | |
SYSCTL_INT (_vfs, OID_AUTO, hidirtybuffers, CTLFLAG_RW,&hidirtybuffers, 0,"When the number of dirty buffers is considered severe") | |
SYSCTL_INT (_vfs, OID_AUTO, dirtybufthresh, CTLFLAG_RW,&dirtybufthresh, 0,"Number of bdwrite to bawrite conversions to clear dirty buffers") | |
SYSCTL_INT (_vfs, OID_AUTO, numfreebuffers, CTLFLAG_RD,&numfreebuffers, 0,"Number of free buffers") | |
SYSCTL_INT (_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW,&lofreebuffers, 0,"XXX Unused") | |
SYSCTL_INT (_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW,&hifreebuffers, 0,"XXX Complicatedly unused") | |
SYSCTL_INT (_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RW,&getnewbufcalls, 0,"Number of calls to getnewbuf") | |
SYSCTL_INT (_vfs, OID_AUTO, getnewbufrestarts, CTLFLAG_RW,&getnewbufrestarts, 0,"Number of times getnewbuf has had to restart a buffer aquisition") | |
SYSCTL_INT (_vfs, OID_AUTO, mappingrestarts, CTLFLAG_RW,&mappingrestarts, 0,"Number of times getblk has had to restart a buffer mapping for ""unmapped buffer") | |
SYSCTL_INT (_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW,&flushbufqtarget, 0,"Amount of work to do in flushbufqueues when helping bufdaemon") | |
SYSCTL_LONG (_vfs, OID_AUTO, notbufdflashes, CTLFLAG_RD,¬bufdflashes, 0,"Number of dirty buffer flushes done by the bufdaemon helpers") | |
SYSCTL_LONG (_vfs, OID_AUTO, barrierwrites, CTLFLAG_RW,&barrierwrites, 0,"Number of barrier writes") | |
SYSCTL_INT (_vfs, OID_AUTO, unmapped_buf_allowed, CTLFLAG_RD,&unmapped_buf_allowed, 0,"Permit the use of the unmapped i/o") | |
static | TAILQ_HEAD (bqueues, buf) |
static __inline void | numdirtywakeup (int level) |
static __inline void | bufspacewakeup (void) |
void | runningbufwakeup (struct buf *bp) |
static __inline void | bufcountwakeup (struct buf *bp) |
void | waitrunningbufspace (void) |
static __inline void | vfs_buf_test_cache (struct buf *bp, vm_ooffset_t foff, vm_offset_t off, vm_offset_t size, vm_page_t m) |
static __inline void | bd_wakeup (int dirtybuflevel) |
void | bd_speedup (void) |
caddr_t | kern_vfs_bio_buffer_alloc (caddr_t v, long physmem_est) |
void | bufinit (void) |
static void | bpmap_qenter (struct buf *bp) |
static void | bfreekva (struct buf *bp) |
void | bremfree (struct buf *bp) |
void | bremfreef (struct buf *bp) |
int | bread (struct vnode *vp, daddr_t blkno, int size, struct ucred *cred, struct buf **bpp) |
void | breada (struct vnode *vp, daddr_t *rablkno, int *rabsize, int cnt, struct ucred *cred) |
int | bread_gb (struct vnode *vp, daddr_t blkno, int cnt, struct ucred *cred, int gbflags, struct buf **bpp) |
int | breadn (struct vnode *vp, daddr_t blkno, int size, daddr_t *rablkno, int *rabsize, int cnt, struct ucred *cred, struct buf **bpp) |
int | breadn_flags (struct vnode *vp, daddr_t blkno, int size, daddr_t *rablkno, int *rabsize, int cnt, struct ucred *cred, int flags, struct buf **bpp) |
int | bufwrite (struct buf *bp) |
void | bufbdflush (struct bufobj *bo, struct buf *bp) |
void | bdwrite (struct buf *bp) |
void | bdirty (struct buf *bp) |
void | bundirty (struct buf *bp) |
void | bawrite (struct buf *bp) |
void | babarrierwrite (struct buf *bp) |
int | bbarrierwrite (struct buf *bp) |
void | bwillwrite (void) |
int | buf_dirty_count_severe (void) |
static __noinline int | buf_vm_page_count_severe (void) |
void | brelse (struct buf *bp) |
void | bqrelse (struct buf *bp) |
int | vfs_bio_awrite (struct buf *bp) |
static void | setbufkva (struct buf *bp, vm_offset_t addr, int maxsize, int gbflags) |
static int | allocbufkva (struct buf *bp, int maxsize, int gbflags) |
static void | getnewbuf_bufd_help (struct vnode *vp, int gbflags, int slpflag, int slptimeo, int defrag) |
static void | getnewbuf_reuse_bp (struct buf *bp, int qindex) |
static struct buf * | getnewbuf_scan (int maxsize, int defrag, int unmapped, int metadata) |
static struct buf * | getnewbuf (struct vnode *vp, int slpflag, int slptimeo, int size, int maxsize, int gbflags) |
SYSINIT (bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start,&buf_kp) | |
SYSCTL_INT (_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW,&flushwithdeps, 0,"Number of buffers flushed with dependecies that require rollbacks") | |
struct buf * | incore (struct bufobj *bo, daddr_t blkno) |
static void | bp_unmapped_get_kva (struct buf *bp, daddr_t blkno, int size, int gbflags) |
struct buf * | getblk (struct vnode *vp, daddr_t blkno, int size, int slpflag, int slptimeo, int flags) |
struct buf * | geteblk (int size, int flags) |
int | allocbuf (struct buf *bp, int size) |
void | biodone (struct bio *bp) |
int | biowait (struct bio *bp, const char *wchan) |
void | biofinish (struct bio *bp, struct devstat *stat, int error) |
int | bufwait (struct buf *bp) |
static void | bufdonebio (struct bio *bip) |
void | dev_strategy (struct cdev *dev, struct buf *bp) |
void | dev_strategy_csw (struct cdev *dev, struct cdevsw *csw, struct buf *bp) |
void | bufdone (struct buf *bp) |
void | bufdone_finish (struct buf *bp) |
void | vfs_unbusy_pages (struct buf *bp) |
void | vfs_busy_pages (struct buf *bp, int clear_modify) |
void | vfs_bio_set_valid (struct buf *bp, int base, int size) |
void | vfs_bio_clrbuf (struct buf *bp) |
void | vfs_bio_bzero_buf (struct buf *bp, int base, int size) |
int | vmapbuf (struct buf *bp, int mapbuf) |
void | vunmapbuf (struct buf *bp) |
void | bdone (struct buf *bp) |
void | bwait (struct buf *bp, u_char pri, const char *wchan) |
int | bufsync (struct bufobj *bo, int waitfor) |
void | bufstrategy (struct bufobj *bo, struct buf *bp) |
void | bufobj_wrefl (struct bufobj *bo) |
void | bufobj_wref (struct bufobj *bo) |
void | bufobj_wdrop (struct bufobj *bo) |
int | bufobj_wwait (struct bufobj *bo, int slpflag, int timeo) |
void | bpin (struct buf *bp) |
void | bunpin (struct buf *bp) |
void | bunpin_wait (struct buf *bp) |
void | bdata2bio (struct buf *bp, struct bio *bip) |
Variables | |
struct bio_ops | bioops |
struct buf_ops | buf_ops_bio |
struct buf * | buf |
caddr_t | unmapped_buf |
static struct proc * | bufdaemonproc |
int | vmiodirenable = TRUE |
long | runningbufspace |
static long | bufspace |
static long | unmapped_bufspace |
static long | maxbufspace |
static long | bufmallocspace |
static long | maxbufmallocspace |
static long | lobufspace |
long | hibufspace |
static int | bufreusecnt |
static int | buffreekvacnt |
static int | bufdefragcnt |
static long | lorunningspace |
static long | hirunningspace |
int | dirtybufferflushes |
int | bdwriteskip |
int | altbufferflushes |
static int | recursiveflushes |
static int | numdirtybuffers |
static int | lodirtybuffers |
static int | hidirtybuffers |
int | dirtybufthresh |
static int | numfreebuffers |
static int | lofreebuffers |
static int | hifreebuffers |
static int | getnewbufcalls |
static int | getnewbufrestarts |
static int | mappingrestarts |
static int | flushbufqtarget = 100 |
static long | notbufdflashes |
static long | barrierwrites |
static int | bd_request |
static int | bd_speedupreq |
static struct mtx | bdlock |
vm_page_t | bogus_page |
static int | runningbufreq |
static struct mtx | rbreqlock |
static int | needsbuffer |
static struct mtx | nblock |
static struct mtx | bqlock |
const char * | buf_wmesg = BUF_WMESG |
static int | flushingbufs |
static struct kproc_desc | buf_kp |
static int | flushwithdeps = 0 |
int | inflight_transient_maps |
#define BUF_CHECK_MAPPED | ( | bp | ) | do {} while (0) |
Definition at line 788 of file vfs_bio.c.
Referenced by allocbuf(), bfreekva(), bp_unmapped_get_kva(), bpmap_qenter(), brelse(), bufdone_finish(), getblk(), getnewbuf(), vfs_bio_bzero_buf(), vfs_busy_pages(), vfs_unbusy_pages(), vfs_vmio_release(), vm_hold_free_pages(), and vm_hold_load_pages().
#define BUF_CHECK_UNMAPPED | ( | bp | ) | do {} while (0) |
Definition at line 789 of file vfs_bio.c.
Referenced by allocbuf(), bfreekva(), bp_unmapped_get_kva(), vfs_bio_bzero_buf(), vfs_unbusy_pages(), and vfs_vmio_release().
#define BUFFER_QUEUES 6 /* number of free buffer queues */ |
#define NSWBUF_MIN 16 |
Definition at line 524 of file vfs_bio.c.
Referenced by kern_vfs_bio_buffer_alloc().
#define QUEUE_CLEAN 1 /* non-B_DELWRI buffers */ |
Definition at line 291 of file vfs_bio.c.
Referenced by bqrelse(), brelse(), getnewbuf_reuse_bp(), and getnewbuf_scan().
#define QUEUE_DIRTY 2 /* B_DELWRI buffers */ |
Definition at line 292 of file vfs_bio.c.
Referenced by bqrelse(), brelse(), and buf_do_flush().
#define QUEUE_DIRTY_GIANT 3 /* B_DELWRI buffers that need giant */ |
Definition at line 293 of file vfs_bio.c.
Referenced by bqrelse(), brelse(), and buf_do_flush().
#define QUEUE_EMPTY 5 /* empty buffer headers */ |
Definition at line 295 of file vfs_bio.c.
Referenced by brelse(), bufinit(), and getnewbuf_scan().
#define QUEUE_EMPTYKVA 4 /* empty buffer headers w/KVA assignment */ |
Definition at line 294 of file vfs_bio.c.
Referenced by brelse(), and getnewbuf_scan().
#define QUEUE_NONE 0 /* on no queue */ |
Definition at line 290 of file vfs_bio.c.
Referenced by bdirty(), bqrelse(), brelse(), bremfree(), bremfreel(), and bundirty().
#define QUEUE_SENTINEL 1024 /* not an queue index, but mark for sentinel */ |
Definition at line 296 of file vfs_bio.c.
Referenced by flushbufqueues().
#define TRANSIENT_DENOM 10 |
Definition at line 530 of file vfs_bio.c.
Referenced by kern_vfs_bio_buffer_alloc().
#define VFS_BIO_NEED_ANY 0x01 /* any freeable buffer */ |
Definition at line 313 of file vfs_bio.c.
Referenced by bufcountwakeup(), getblk(), and getnewbuf_bufd_help().
#define VFS_BIO_NEED_BUFSPACE 0x08 /* wait for buf space, lo hysteresis */ |
Definition at line 316 of file vfs_bio.c.
Referenced by bufspacewakeup(), and getnewbuf_bufd_help().
#define VFS_BIO_NEED_DIRTYFLUSH 0x02 /* waiting for dirty buffer flush */ |
Definition at line 314 of file vfs_bio.c.
Referenced by bwillwrite(), and numdirtywakeup().
#define VFS_BIO_NEED_FREE 0x04 /* wait for free bufs, hi hysteresis */ |
Definition at line 315 of file vfs_bio.c.
Referenced by bufcountwakeup().
__FBSDID | ( | "$BSDSUniX$" | ) |
int allocbuf | ( | struct buf * | bp, |
int | size | ||
) |
Definition at line 3390 of file vfs_bio.c.
References bogus_page, bpmap_qenter(), BUF_CHECK_MAPPED, BUF_CHECK_UNMAPPED, bufmallocspace, bufspacewakeup(), free(), malloc(), maxbufmallocspace, panic(), vfs_buf_test_cache(), vm_hold_free_pages(), and vm_hold_load_pages().
Referenced by brelse(), getblk(), geteblk(), and getnewbuf_reuse_bp().
|
static |
Definition at line 2050 of file vfs_bio.c.
References bfreekva(), bufdefragcnt, bufspace, and setbufkva().
Referenced by bp_unmapped_get_kva(), and getnewbuf().
void bawrite | ( | struct buf * | bp | ) |
Definition at line 1357 of file vfs_bio.c.
Referenced by bufbdflush(), cluster_wbuild_gb(), cluster_write_gb(), vop_stdfsync(), and vtruncbuf().
void bd_speedup | ( | void | ) |
Definition at line 508 of file vfs_bio.c.
References bd_request, bd_speedupreq, bdlock, and wakeup().
Referenced by getnewbuf_bufd_help().
|
static |
Definition at line 492 of file vfs_bio.c.
References bd_request, bdlock, numdirtybuffers, and wakeup().
Referenced by bdirty(), bdwrite(), and bwillwrite().
void bdata2bio | ( | struct buf * | bp, |
struct bio * | bip | ||
) |
Definition at line 4559 of file vfs_bio.c.
References unmapped_buf.
Referenced by dev_strategy_csw().
void bdirty | ( | struct buf * | bp | ) |
Definition at line 1294 of file vfs_bio.c.
References bd_wakeup(), hidirtybuffers, lodirtybuffers, numdirtybuffers, QUEUE_NONE, and reassignbuf().
Referenced by bdwrite(), and brelse().
void bdone | ( | struct buf * | bp | ) |
Definition at line 4425 of file vfs_bio.c.
References mtx_pool_find(), mtxpool_sleep, and wakeup().
Referenced by bufdone_finish(), and physio().
void bdwrite | ( | struct buf * | bp | ) |
Definition at line 1195 of file vfs_bio.c.
References bd_wakeup(), bdirty(), bqrelse(), brelse(), hidirtybuffers, lodirtybuffers, recursiveflushes, and vfs_clean_pages_dirty_buf().
Referenced by cluster_write_gb().
|
static |
Definition at line 814 of file vfs_bio.c.
References BUF_CHECK_MAPPED, BUF_CHECK_UNMAPPED, buffreekvacnt, bufspace, bufspacewakeup(), and unmapped_bufspace.
Referenced by allocbufkva(), getnewbuf(), and getnewbuf_scan().
void biodone | ( | struct bio * | bp | ) |
Definition at line 3644 of file vfs_bio.c.
References mtx_pool_find(), mtxpool_sleep, start, and wakeup().
Referenced by biofinish(), and bufdone().
void biofinish | ( | struct bio * | bp, |
struct devstat * | stat, | ||
int | error | ||
) |
Definition at line 3699 of file vfs_bio.c.
References biodone(), and devstat_end_transaction_bio().
Referenced by bioq_flush(), dead_strategy(), giant_strategy(), and no_strategy().
int biowait | ( | struct bio * | bp, |
const char * | wchan | ||
) |
Definition at line 3682 of file vfs_bio.c.
References hz, mtx_pool_find(), and mtxpool_sleep.
|
static |
Definition at line 2979 of file vfs_bio.c.
References allocbufkva(), bpmap_qenter(), brelse(), buf, BUF_CHECK_MAPPED, BUF_CHECK_UNMAPPED, getnewbuf(), mappingrestarts, panic(), setbufkva(), unmapped_bufspace, and vn_isdisk().
Referenced by getblk().
void bpin | ( | struct buf * | bp | ) |
Definition at line 4521 of file vfs_bio.c.
References mtx_pool_find(), and mtxpool_sleep.
|
static |
Definition at line 793 of file vfs_bio.c.
References BUF_CHECK_MAPPED.
Referenced by allocbuf(), and bp_unmapped_get_kva().
void bqrelse | ( | struct buf * | bp | ) |
Definition at line 1760 of file vfs_bio.c.
References bqlock, brelse(), bremfreel(), buf_vm_page_count_severe(), bufcountwakeup(), bufspacewakeup(), panic(), QUEUE_CLEAN, QUEUE_DIRTY, QUEUE_DIRTY_GIANT, and QUEUE_NONE.
Referenced by bdwrite(), brelse(), bufdone_finish(), cluster_rbuild(), cluster_read_gb(), cluster_wbuild_gb(), and getblk().
int bread | ( | struct vnode * | vp, |
daddr_t | blkno, | ||
int | size, | ||
struct ucred * | cred, | ||
struct buf ** | bpp | ||
) |
Definition at line 937 of file vfs_bio.c.
References breadn_flags().
int bread_gb | ( | struct vnode * | vp, |
daddr_t | blkno, | ||
int | cnt, | ||
struct ucred * | cred, | ||
int | gbflags, | ||
struct buf ** | bpp | ||
) |
Definition at line 984 of file vfs_bio.c.
References breadn_flags().
Referenced by cluster_collectbufs().
void breada | ( | struct vnode * | vp, |
daddr_t * | rablkno, | ||
int * | rabsize, | ||
int | cnt, | ||
struct ucred * | cred | ||
) |
Definition at line 950 of file vfs_bio.c.
References brelse(), buf, crhold(), getblk(), inmem(), and vfs_busy_pages().
Referenced by breadn_flags().
int breadn | ( | struct vnode * | vp, |
daddr_t | blkno, | ||
int | size, | ||
daddr_t * | rablkno, | ||
int * | rabsize, | ||
int | cnt, | ||
struct ucred * | cred, | ||
struct buf ** | bpp | ||
) |
Definition at line 997 of file vfs_bio.c.
References breadn_flags().
int breadn_flags | ( | struct vnode * | vp, |
daddr_t | blkno, | ||
int | size, | ||
daddr_t * | rablkno, | ||
int * | rabsize, | ||
int | cnt, | ||
struct ucred * | cred, | ||
int | flags, | ||
struct buf ** | bpp | ||
) |
void brelse | ( | struct buf * | bp | ) |
Definition at line 1451 of file vfs_bio.c.
References allocbuf(), bdirty(), bogus_page, bqlock, bqrelse(), brelvp(), bremfreel(), BUF_CHECK_MAPPED, buf_vm_page_count_severe(), bufcountwakeup(), bufspacewakeup(), bundirty(), lodirtybuffers, numdirtybuffers, numdirtywakeup(), panic(), printf(), QUEUE_CLEAN, QUEUE_DIRTY, QUEUE_DIRTY_GIANT, QUEUE_EMPTY, QUEUE_EMPTYKVA, QUEUE_NONE, vfs_vmio_release(), and vn_isdisk().
Referenced by bdwrite(), bp_unmapped_get_kva(), bqrelse(), breada(), bufdone_finish(), bufwrite(), cluster_rbuild(), cluster_write_gb(), flushbuflist(), flushbufqueues(), getblk(), getnewbuf(), getnewbuf_scan(), and vtruncbuf().
void bremfree | ( | struct buf * | bp | ) |
Definition at line 846 of file vfs_bio.c.
References numfreebuffers, and QUEUE_NONE.
Referenced by bufbdflush(), cluster_wbuild_gb(), flushbuflist(), flushbufqueues(), getblk(), vfs_bio_awrite(), vop_stdfsync(), and vtruncbuf().
void bremfreef | ( | struct buf * | bp | ) |
Definition at line 877 of file vfs_bio.c.
References bqlock, and bremfreel().
|
static |
Definition at line 891 of file vfs_bio.c.
References bqlock, numfreebuffers, and QUEUE_NONE.
Referenced by bqrelse(), brelse(), bremfreef(), flushbufqueues(), and getnewbuf_scan().
|
static |
Definition at line 2589 of file vfs_bio.c.
References bd_request, bd_speedupreq, bdlock, buf_do_flush(), bufdaemonproc, hz, kern_yield(), kproc_shutdown(), kproc_suspend_check(), lodirtybuffers, and numdirtybuffers.
int buf_dirty_count_severe | ( | void | ) |
Definition at line 1428 of file vfs_bio.c.
References hidirtybuffers, and numdirtybuffers.
|
static |
Definition at line 2560 of file vfs_bio.c.
References flushbufqueues(), Giant, QUEUE_DIRTY, and QUEUE_DIRTY_GIANT.
Referenced by buf_daemon(), and getnewbuf_bufd_help().
|
static |
Definition at line 1435 of file vfs_bio.c.
Referenced by bqrelse(), brelse(), and vfs_vmio_release().
void bufbdflush | ( | struct bufobj * | bo, |
struct buf * | bp | ||
) |
Definition at line 1145 of file vfs_bio.c.
References altbufferflushes, bawrite(), bremfree(), buf, dirtybufferflushes, dirtybufthresh, panic(), and vfs_bio_awrite().
|
static |
Definition at line 417 of file vfs_bio.c.
References hifreebuffers, nblock, nbuf, needsbuffer, numfreebuffers, VFS_BIO_NEED_ANY, VFS_BIO_NEED_FREE, and wakeup().
Referenced by bqrelse(), and brelse().
void bufdone | ( | struct buf * | bp | ) |
Definition at line 3825 of file vfs_bio.c.
References biodone(), buf, bufdone_finish(), bufobj_wdrop(), and runningbufwakeup().
Referenced by bufdonebio(), cluster_callback(), dev_strategy_csw(), and vop_nostrategy().
void bufdone_finish | ( | struct buf * | bp | ) |
Definition at line 3856 of file vfs_bio.c.
References bdone(), bogus_page, bqrelse(), brelse(), BUF_CHECK_MAPPED, panic(), and vfs_page_set_valid().
Referenced by bufdone().
|
static |
Definition at line 3740 of file vfs_bio.c.
References buf, and bufdone().
Referenced by dev_strategy_csw().
void bufinit | ( | void | ) |
Definition at line 659 of file vfs_bio.c.
References bdlock, bogus_page, bqlock, buf, BUFFER_QUEUES, dirtybufthresh, hibufspace, hidirtybuffers, hifreebuffers, hirunningspace, lobufspace, lodirtybuffers, lofreebuffers, lorunningspace, maxbufmallocspace, maxbufspace, mtx_init(), nblock, nbuf, numdirtybuffers, numfreebuffers, QUEUE_EMPTY, rbreqlock, and unmapped_buf.
void bufobj_wdrop | ( | struct bufobj * | bo | ) |
void bufobj_wref | ( | struct bufobj * | bo | ) |
Definition at line 4479 of file vfs_bio.c.
Referenced by bufwrite(), and cluster_wbuild_gb().
int bufobj_wwait | ( | struct bufobj * | bo, |
int | slpflag, | ||
int | timeo | ||
) |
Definition at line 4503 of file vfs_bio.c.
Referenced by bufobj_invalbuf(), vop_stdfsync(), and vtruncbuf().
|
static |
Definition at line 371 of file vfs_bio.c.
References nblock, needsbuffer, VFS_BIO_NEED_BUFSPACE, and wakeup().
Referenced by allocbuf(), bfreekva(), bqrelse(), brelse(), and vfs_vmio_release().
int bufwait | ( | struct buf * | bp | ) |
Definition at line 3719 of file vfs_bio.c.
References bwait().
Referenced by breadn_flags(), bufwrite(), and cluster_read_gb().
int bufwrite | ( | struct buf * | bp | ) |
Definition at line 1064 of file vfs_bio.c.
References barrierwrites, brelse(), bufobj_wref(), bufwait(), bundirty(), bunpin_wait(), runningbufspace, vfs_busy_pages(), and waitrunningbufspace().
void bundirty | ( | struct buf * | bp | ) |
Definition at line 1326 of file vfs_bio.c.
References lodirtybuffers, numdirtybuffers, numdirtywakeup(), QUEUE_NONE, and reassignbuf().
Referenced by brelse(), bufwrite(), and cluster_wbuild_gb().
void bunpin | ( | struct buf * | bp | ) |
Definition at line 4532 of file vfs_bio.c.
References mtx_pool_find(), mtxpool_sleep, and wakeup().
void bunpin_wait | ( | struct buf * | bp | ) |
Definition at line 4544 of file vfs_bio.c.
References mtx_pool_find(), and mtxpool_sleep.
Referenced by bufwrite(), and getblk().
void bwait | ( | struct buf * | bp, |
u_char | pri, | ||
const char * | wchan | ||
) |
Definition at line 4437 of file vfs_bio.c.
References mtx_pool_find(), and mtxpool_sleep.
Referenced by bufwait(), and physio().
void bwillwrite | ( | void | ) |
Definition at line 1409 of file vfs_bio.c.
References bd_wakeup(), hidirtybuffers, nblock, needsbuffer, numdirtybuffers, and VFS_BIO_NEED_DIRTYFLUSH.
Referenced by aio_process(), dofilewrite(), kern_linkat(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_posix_fallocate(), kern_renameat(), kern_rmdirat(), kern_symlinkat(), kern_unlinkat(), sys_undelete(), vn_open_cred(), vn_rdwr_inchunks(), and vn_write().
void dev_strategy | ( | struct cdev * | dev, |
struct buf * | bp | ||
) |
Definition at line 3756 of file vfs_bio.c.
References dev_refthread(), dev_relthread(), dev_strategy_csw(), and devtoname().
void dev_strategy_csw | ( | struct cdev * | dev, |
struct cdevsw * | csw, | ||
struct buf * | bp | ||
) |
Definition at line 3771 of file vfs_bio.c.
References bdata2bio(), bufdone(), bufdonebio(), devtoname(), and hz.
Referenced by aio_qphysio(), dev_strategy(), and physio().
|
static |
Definition at line 2669 of file vfs_bio.c.
References bqlock, brelse(), bremfree(), bremfreel(), buf, bufdaemonproc, flushbufqtarget, free(), hidirtybuffers, lodirtybuffers, malloc(), notbufdflashes, numdirtybuffers, numdirtywakeup(), QUEUE_SENTINEL, vfs_bio_awrite(), vn_finished_write(), vn_start_write(), and waitrunningbufspace().
Referenced by buf_do_flush().
struct buf* getblk | ( | struct vnode * | vp, |
daddr_t | blkno, | ||
int | size, | ||
int | slpflag, | ||
int | slptimeo, | ||
int | flags | ||
) |
Definition at line 3094 of file vfs_bio.c.
References allocbuf(), bgetvp(), bp_unmapped_get_kva(), bqrelse(), brelse(), bremfree(), buf, BUF_CHECK_MAPPED, bunpin_wait(), gbincore(), getnewbuf(), nblock, needsbuffer, numfreebuffers, panic(), VFS_BIO_NEED_ANY, and vn_isdisk().
Referenced by breada(), breadn_flags(), cluster_rbuild(), and cluster_read_gb().
struct buf* geteblk | ( | int | size, |
int | flags | ||
) |
Definition at line 3356 of file vfs_bio.c.
References allocbuf(), buf, and getnewbuf().
|
static |
Definition at line 2437 of file vfs_bio.c.
References allocbufkva(), bfreekva(), bqlock, brelse(), buf, BUF_CHECK_MAPPED, bufreusecnt, bufspace, getnewbuf_bufd_help(), getnewbuf_scan(), getnewbufcalls, getnewbufrestarts, unmapped_buf, and unmapped_bufspace.
Referenced by bp_unmapped_get_kva(), getblk(), and geteblk().
|
static |
Definition at line 2083 of file vfs_bio.c.
References bd_speedup(), bqlock, buf_do_flush(), bufspace, hibufspace, nblock, needsbuffer, VFS_BIO_NEED_ANY, and VFS_BIO_NEED_BUFSPACE.
Referenced by getnewbuf().
|
static |
Definition at line 2145 of file vfs_bio.c.
References allocbuf(), bqlock, brelvp(), crfree(), panic(), QUEUE_CLEAN, and vfs_vmio_release().
Referenced by getnewbuf_scan().
|
static |
Definition at line 2221 of file vfs_bio.c.
References bfreekva(), bqlock, brelse(), bremfreel(), buf, bufspace, getnewbuf_reuse_bp(), getnewbufrestarts, hibufspace, lobufspace, printf(), QUEUE_CLEAN, QUEUE_EMPTY, and QUEUE_EMPTYKVA.
Referenced by getnewbuf().
struct buf* incore | ( | struct bufobj * | bo, |
daddr_t | blkno | ||
) |
Definition at line 2809 of file vfs_bio.c.
References buf, and gbincore().
Referenced by inmem().
|
static |
caddr_t kern_vfs_bio_buffer_alloc | ( | caddr_t | v, |
long | physmem_est | ||
) |
Definition at line 540 of file vfs_bio.c.
References bio_transient_maxcnt, buf, maxbcache, nbuf, nswbuf, NSWBUF_MIN, printf(), swbuf, and TRANSIENT_DENOM.
|
static |
|
static |
Definition at line 348 of file vfs_bio.c.
References nblock, needsbuffer, numdirtybuffers, VFS_BIO_NEED_DIRTYFLUSH, and wakeup().
Referenced by brelse(), bundirty(), and flushbufqueues().
void runningbufwakeup | ( | struct buf * | bp | ) |
Definition at line 392 of file vfs_bio.c.
References lorunningspace, rbreqlock, runningbufreq, runningbufspace, and wakeup().
Referenced by bufdone(), and vfs_unbusy_pages().
|
static |
Definition at line 2028 of file vfs_bio.c.
References unmapped_bufspace.
Referenced by allocbufkva(), and bp_unmapped_get_kva().
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
vmiodirenable | , | ||
CTLFLAG_RW | , | ||
& | vmiodirenable, | ||
0 | , | ||
"Use the VM system for directory writes" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
bufreusecnt | , | ||
CTLFLAG_RW | , | ||
& | bufreusecnt, | ||
0 | , | ||
"Number of times we have reused a buffer" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
buffreekvacnt | , | ||
CTLFLAG_RW | , | ||
& | buffreekvacnt, | ||
0 | , | ||
"Number of times we have freed the KVA space from some buffer" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
bufdefragcnt | , | ||
CTLFLAG_RW | , | ||
& | bufdefragcnt, | ||
0 | , | ||
"Number of times we have had to repeat buffer allocation to defragment" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
dirtybufferflushes | , | ||
CTLFLAG_RW | , | ||
& | dirtybufferflushes, | ||
0 | , | ||
"Number of bdwrite to bawrite conversions to limit dirty buffers" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
bdwriteskip | , | ||
CTLFLAG_RW | , | ||
& | bdwriteskip, | ||
0 | , | ||
"Number of buffers supplied to bdwrite with snapshot deadlock risk" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
altbufferflushes | , | ||
CTLFLAG_RW | , | ||
& | altbufferflushes, | ||
0 | , | ||
"Number of fsync flushes to limit dirty buffers" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
recursiveflushes | , | ||
CTLFLAG_RW | , | ||
& | recursiveflushes, | ||
0 | , | ||
"Number of flushes skipped due to being recursive" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
numdirtybuffers | , | ||
CTLFLAG_RD | , | ||
& | numdirtybuffers, | ||
0 | , | ||
"Number of buffers that are dirty (has unwritten changes) at the moment" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
lodirtybuffers | , | ||
CTLFLAG_RW | , | ||
& | lodirtybuffers, | ||
0 | , | ||
"How many buffers we want to have free before bufdaemon can sleep" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
hidirtybuffers | , | ||
CTLFLAG_RW | , | ||
& | hidirtybuffers, | ||
0 | , | ||
"When the number of dirty buffers is considered severe" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
dirtybufthresh | , | ||
CTLFLAG_RW | , | ||
& | dirtybufthresh, | ||
0 | , | ||
"Number of bdwrite to bawrite conversions to clear dirty buffers" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
numfreebuffers | , | ||
CTLFLAG_RD | , | ||
& | numfreebuffers, | ||
0 | , | ||
"Number of free buffers" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
lofreebuffers | , | ||
CTLFLAG_RW | , | ||
& | lofreebuffers, | ||
0 | , | ||
"XXX Unused" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
hifreebuffers | , | ||
CTLFLAG_RW | , | ||
& | hifreebuffers, | ||
0 | , | ||
"XXX Complicatedly unused" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
getnewbufcalls | , | ||
CTLFLAG_RW | , | ||
& | getnewbufcalls, | ||
0 | , | ||
"Number of calls to getnewbuf" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
getnewbufrestarts | , | ||
CTLFLAG_RW | , | ||
& | getnewbufrestarts, | ||
0 | , | ||
"Number of times getnewbuf has had to restart a buffer aquisition" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
mappingrestarts | , | ||
CTLFLAG_RW | , | ||
& | mappingrestarts, | ||
0 | , | ||
"Number of times getblk has had to restart a buffer mapping for ""unmapped buffer" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
flushbufqtarget | , | ||
CTLFLAG_RW | , | ||
& | flushbufqtarget, | ||
0 | , | ||
"Amount of work to do in flushbufqueues when helping bufdaemon" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
unmapped_buf_allowed | , | ||
CTLFLAG_RD | , | ||
& | unmapped_buf_allowed, | ||
0 | , | ||
"Permit the use of the unmapped i/o" | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
flushwithdeps | , | ||
CTLFLAG_RW | , | ||
& | flushwithdeps, | ||
0 | , | ||
"Number of buffers flushed with dependecies that require rollbacks" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
runningbufspace | , | ||
CTLFLAG_RD | , | ||
& | runningbufspace, | ||
0 | , | ||
"Amount of presently outstanding async buffer io" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
bufspace | , | ||
CTLFLAG_RD | , | ||
& | bufspace, | ||
0 | , | ||
"Virtual memory used for buffers" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
unmapped_bufspace | , | ||
CTLFLAG_RD | , | ||
& | unmapped_bufspace, | ||
0 | , | ||
"Amount of unmapped | buffers, | ||
inclusive in the bufspace" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
maxbufspace | , | ||
CTLFLAG_RD | , | ||
& | maxbufspace, | ||
0 | , | ||
"Maximum allowed value of bufspace (including buf_daemon)" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
bufmallocspace | , | ||
CTLFLAG_RD | , | ||
& | bufmallocspace, | ||
0 | , | ||
"Amount of malloced memory for buffers" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
maxmallocbufspace | , | ||
CTLFLAG_RW | , | ||
& | maxbufmallocspace, | ||
0 | , | ||
"Maximum amount of malloced memory for buffers" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
lobufspace | , | ||
CTLFLAG_RD | , | ||
& | lobufspace, | ||
0 | , | ||
"Minimum amount of buffers we want to have" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
hibufspace | , | ||
CTLFLAG_RD | , | ||
& | hibufspace, | ||
0 | , | ||
"Maximum allowed value of bufspace (excluding buf_daemon)" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
lorunningspace | , | ||
CTLFLAG_RW | , | ||
& | lorunningspace, | ||
0 | , | ||
"Minimum preferred space used for in-progress I/O" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
hirunningspace | , | ||
CTLFLAG_RW | , | ||
& | hirunningspace, | ||
0 | , | ||
"Maximum amount of space to use for in-progress I/O" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
notbufdflashes | , | ||
CTLFLAG_RD | , | ||
& | notbufdflashes, | ||
0 | , | ||
"Number of dirty buffer flushes done by the bufdaemon helpers" | |||
) |
SYSCTL_LONG | ( | _vfs | , |
OID_AUTO | , | ||
barrierwrites | , | ||
CTLFLAG_RW | , | ||
& | barrierwrites, | ||
0 | , | ||
"Number of barrier writes" | |||
) |
SYSINIT | ( | bufdaemon | , |
SI_SUB_KTHREAD_BUF | , | ||
SI_ORDER_FIRST | , | ||
kproc_start | , | ||
& | buf_kp | ||
) |
int vfs_bio_awrite | ( | struct buf * | bp | ) |
Definition at line 1964 of file vfs_bio.c.
References bremfree(), cluster_wbuild_gb(), and vfs_bio_clcheck().
Referenced by bufbdflush(), flushbufqueues(), and vop_stdfsync().
void vfs_bio_bzero_buf | ( | struct buf * | bp, |
int | base, | ||
int | size | ||
) |
Definition at line 4272 of file vfs_bio.c.
References BUF_CHECK_MAPPED, and BUF_CHECK_UNMAPPED.
|
static |
Definition at line 1921 of file vfs_bio.c.
References buf, and gbincore().
Referenced by vfs_bio_awrite().
void vfs_bio_clrbuf | ( | struct buf * | bp | ) |
Definition at line 4215 of file vfs_bio.c.
References bogus_page, and mask.
void vfs_bio_set_valid | ( | struct buf * | bp, |
int | base, | ||
int | size | ||
) |
|
static |
Definition at line 476 of file vfs_bio.c.
Referenced by allocbuf().
void vfs_busy_pages | ( | struct buf * | bp, |
int | clear_modify | ||
) |
Definition at line 4105 of file vfs_bio.c.
References bogus_page, BUF_CHECK_MAPPED, vfs_drain_busy_pages(), vfs_page_set_validclean(), and vfs_setdirty_locked_object().
Referenced by breada(), breadn_flags(), bufwrite(), and cluster_read_gb().
|
static |
Definition at line 2881 of file vfs_bio.c.
References vfs_drain_busy_pages(), vfs_page_set_validclean(), and vfs_setdirty_locked_object().
Referenced by bdwrite().
|
static |
Definition at line 4072 of file vfs_bio.c.
Referenced by vfs_busy_pages(), and vfs_clean_pages_dirty_buf().
|
static |
Definition at line 4010 of file vfs_bio.c.
Referenced by bufdone_finish().
|
static |
Definition at line 4039 of file vfs_bio.c.
Referenced by vfs_busy_pages(), and vfs_clean_pages_dirty_buf().
|
static |
Definition at line 2911 of file vfs_bio.c.
Referenced by vfs_busy_pages(), and vfs_clean_pages_dirty_buf().
void vfs_unbusy_pages | ( | struct buf * | bp | ) |
Definition at line 3968 of file vfs_bio.c.
References bogus_page, BUF_CHECK_MAPPED, BUF_CHECK_UNMAPPED, panic(), and runningbufwakeup().
|
static |
Definition at line 1862 of file vfs_bio.c.
References brelvp(), BUF_CHECK_MAPPED, BUF_CHECK_UNMAPPED, buf_vm_page_count_severe(), and bufspacewakeup().
Referenced by brelse(), and getnewbuf_reuse_bp().
|
static |
Definition at line 4336 of file vfs_bio.c.
References BUF_CHECK_MAPPED, and printf().
Referenced by allocbuf().
|
static |
Definition at line 4303 of file vfs_bio.c.
References BUF_CHECK_MAPPED.
Referenced by allocbuf().
int vmapbuf | ( | struct buf * | bp, |
int | mapbuf | ||
) |
Definition at line 4374 of file vfs_bio.c.
References unmapped_buf.
Referenced by aio_qphysio(), and physio().
void vunmapbuf | ( | struct buf * | bp | ) |
Definition at line 4410 of file vfs_bio.c.
Referenced by biohelper(), and physio().
void waitrunningbufspace | ( | void | ) |
Definition at line 455 of file vfs_bio.c.
References hirunningspace, rbreqlock, runningbufreq, and runningbufspace.
Referenced by bufwrite(), and flushbufqueues().
int altbufferflushes |
Definition at line 179 of file vfs_bio.c.
Referenced by bufbdflush().
|
static |
Definition at line 222 of file vfs_bio.c.
Referenced by bufwrite().
|
static |
Definition at line 234 of file vfs_bio.c.
Referenced by bd_speedup(), bd_wakeup(), and buf_daemon().
|
static |
Definition at line 242 of file vfs_bio.c.
Referenced by bd_speedup(), and buf_daemon().
|
static |
Definition at line 247 of file vfs_bio.c.
Referenced by bd_speedup(), bd_wakeup(), buf_daemon(), and bufinit().
vm_page_t bogus_page |
Definition at line 256 of file vfs_bio.c.
Referenced by allocbuf(), brelse(), bufdone_finish(), bufinit(), cluster_rbuild(), vfs_bio_clrbuf(), vfs_busy_pages(), and vfs_unbusy_pages().
|
static |
Definition at line 305 of file vfs_bio.c.
Referenced by bqrelse(), brelse(), bremfreef(), bremfreel(), bufinit(), flushbufqueues(), getnewbuf(), getnewbuf_bufd_help(), getnewbuf_reuse_bp(), and getnewbuf_scan().
struct buf* buf |
Definition at line 97 of file vfs_bio.c.
Referenced by aio_qphysio(), be_uuid_dec(), be_uuid_enc(), biohelper(), bp_unmapped_get_kva(), breada(), breadn_flags(), buf_splay(), buf_vlist_add(), buf_vlist_remove(), bufbdflush(), bufdone(), bufdonebio(), bufinit(), cluster_callback(), cluster_collectbufs(), cluster_rbuild(), cluster_read_gb(), cluster_wbuild_gb(), cluster_write_gb(), cpusetobj_strprint(), device_sysctl_handler(), fail_point_sysctl(), flushbuflist(), flushbufqueues(), gbincore(), getblk(), geteblk(), getenv(), getnewbuf(), getnewbuf_scan(), gz_open(), incore(), init_static_kenv(), kdb_sysctl_current(), kern_alternate_path(), kern_ptrace(), kern_reboot(), kern_vfs_bio_buffer_alloc(), kproc_kthread_add(), le_uuid_dec(), le_uuid_enc(), logread(), m_extadd(), mqfs_read(), msgbuf_addstr(), note_threadmd(), panic(), physio(), printf_uuid(), sbuf_bcat(), sbuf_newbuf(), sbuf_printf_uuid(), setenv(), sysctl_kern_arnd(), sysctl_kern_eventtimer_choice(), sysctl_kern_eventtimer_timer(), sysctl_kern_msgbuf(), sysctl_kern_timecounter_choice(), sysctl_sysctl_name(), ttydisc_getc_uio(), ttyinq_write(), ttyoutq_read(), ttyoutq_write(), uipc_bind(), unp_connect(), vfs_bio_clcheck(), vfs_mountroot_readconf(), vn_extattr_get(), vn_extattr_set(), vn_fullpath(), vn_fullpath_global(), vn_printf(), vop_stdallocate(), vop_stdfsync(), vop_stdvptocnp(), vsscanf(), and vtruncbuf().
|
static |
struct buf_ops buf_ops_bio |
Definition at line 85 of file vfs_bio.c.
Referenced by getnewvnode().
|
static |
Definition at line 100 of file vfs_bio.c.
Referenced by buf_daemon(), and flushbufqueues().
|
static |
Definition at line 164 of file vfs_bio.c.
Referenced by allocbufkva().
|
static |
Definition at line 161 of file vfs_bio.c.
Referenced by bfreekva().
|
static |
Definition at line 146 of file vfs_bio.c.
Referenced by allocbuf().
|
static |
Definition at line 158 of file vfs_bio.c.
Referenced by getnewbuf().
|
static |
Definition at line 130 of file vfs_bio.c.
Referenced by allocbufkva(), bfreekva(), getnewbuf(), getnewbuf_bufd_help(), and getnewbuf_scan().
int dirtybufferflushes |
Definition at line 173 of file vfs_bio.c.
Referenced by bufbdflush().
int dirtybufthresh |
Definition at line 194 of file vfs_bio.c.
Referenced by bufbdflush(), and bufinit().
|
static |
Definition at line 216 of file vfs_bio.c.
Referenced by flushbufqueues().
|
static |
Definition at line 206 of file vfs_bio.c.
Referenced by getnewbuf().
|
static |
Definition at line 209 of file vfs_bio.c.
Referenced by getnewbuf(), and getnewbuf_scan().
long hibufspace |
Definition at line 155 of file vfs_bio.c.
Referenced by bufinit(), getnewbuf_bufd_help(), and getnewbuf_scan().
|
static |
Definition at line 191 of file vfs_bio.c.
Referenced by bdirty(), bdwrite(), buf_dirty_count_severe(), bufinit(), bwillwrite(), and flushbufqueues().
|
static |
Definition at line 203 of file vfs_bio.c.
Referenced by bufcountwakeup(), and bufinit().
|
static |
Definition at line 170 of file vfs_bio.c.
Referenced by bufinit(), and waitrunningbufspace().
int inflight_transient_maps |
|
static |
Definition at line 152 of file vfs_bio.c.
Referenced by bufinit(), and getnewbuf_scan().
|
static |
Definition at line 188 of file vfs_bio.c.
Referenced by bdirty(), bdwrite(), brelse(), buf_daemon(), bufinit(), bundirty(), and flushbufqueues().
|
static |
Definition at line 167 of file vfs_bio.c.
Referenced by bufinit(), and runningbufwakeup().
|
static |
Definition at line 212 of file vfs_bio.c.
Referenced by bp_unmapped_get_kva().
|
static |
Definition at line 149 of file vfs_bio.c.
Referenced by allocbuf(), and bufinit().
|
static |
Definition at line 283 of file vfs_bio.c.
Referenced by bufcountwakeup(), bufinit(), bufspacewakeup(), bwillwrite(), getblk(), getnewbuf_bufd_help(), and numdirtywakeup().
|
static |
Definition at line 278 of file vfs_bio.c.
Referenced by bufcountwakeup(), bufspacewakeup(), bwillwrite(), getblk(), getnewbuf_bufd_help(), and numdirtywakeup().
|
static |
Definition at line 219 of file vfs_bio.c.
Referenced by flushbufqueues().
|
static |
Definition at line 185 of file vfs_bio.c.
Referenced by bd_wakeup(), bdirty(), brelse(), buf_daemon(), buf_dirty_count_severe(), bufinit(), bundirty(), bwillwrite(), flushbufqueues(), and numdirtywakeup().
|
static |
Definition at line 197 of file vfs_bio.c.
Referenced by bremfree(), bremfreel(), bufcountwakeup(), bufinit(), and getblk().
|
static |
Definition at line 269 of file vfs_bio.c.
Referenced by bufinit(), runningbufwakeup(), and waitrunningbufspace().
|
static |
Definition at line 263 of file vfs_bio.c.
Referenced by runningbufwakeup(), and waitrunningbufspace().
long runningbufspace |
Definition at line 127 of file vfs_bio.c.
Referenced by bufwrite(), runningbufwakeup(), and waitrunningbufspace().
caddr_t unmapped_buf |
Definition at line 98 of file vfs_bio.c.
Referenced by bdata2bio(), bufinit(), cluster_rbuild(), cluster_wbuild_gb(), getnewbuf(), and vmapbuf().
|
static |
Definition at line 139 of file vfs_bio.c.
Referenced by bfreekva(), bp_unmapped_get_kva(), getnewbuf(), and setbufkva().