|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include "opt_debug_cluster.h"#include <sys/param.h>#include <sys/systm.h>#include <sys/kernel.h>#include <sys/proc.h>#include <sys/bio.h>#include <sys/buf.h>#include <sys/vnode.h>#include <sys/malloc.h>#include <sys/mount.h>#include <sys/resourcevar.h>#include <sys/vmmeter.h>#include <vm/vm.h>#include <vm/vm_object.h>#include <vm/vm_page.h>#include <sys/sysctl.h>
Go to the source code of this file.
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| static | MALLOC_DEFINE (M_SEGMENT,"cl_savebuf","cluster_save buffer") |
| static struct cluster_save * | cluster_collectbufs (struct vnode *vp, struct buf *last_bp, int gbflags) |
| static struct buf * | cluster_rbuild (struct vnode *vp, u_quad_t filesize, daddr_t lbn, daddr_t blkno, long size, int run, int gbflags, struct buf *fbp) |
| static void | cluster_callback (struct buf *) |
| SYSCTL_INT (_vfs, OID_AUTO, write_behind, CTLFLAG_RW,&write_behind, 0,"Cluster write-behind; 0: disable, 1: enable, 2: backed off") | |
| SYSCTL_INT (_vfs, OID_AUTO, read_max, CTLFLAG_RW,&read_max, 0,"Cluster read-ahead max block count") | |
| SYSCTL_INT (_vfs, OID_AUTO, read_min, CTLFLAG_RW,&read_min, 0,"Cluster read min block count") | |
| int | cluster_read (struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size, struct ucred *cred, long totread, int seqcount, struct buf **bpp) |
| int | cluster_read_gb (struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size, struct ucred *cred, long totread, int seqcount, int gbflags, struct buf **bpp) |
| static __inline int | cluster_wbuild_wb (struct vnode *vp, long size, daddr_t start_lbn, int len, int gbflags) |
| void | cluster_write (struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount) |
| void | cluster_write_gb (struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, int gbflags) |
| int | cluster_wbuild (struct vnode *vp, long size, daddr_t start_lbn, int len) |
| int | cluster_wbuild_gb (struct vnode *vp, long size, daddr_t start_lbn, int len, int gbflags) |
Variables | |
| static int | write_behind = 1 |
| static int | read_max = 64 |
| static int | read_min = 1 |
| vm_page_t | bogus_page |
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 533 of file vfs_cluster.c.
References buf, and bufdone().
Referenced by cluster_rbuild(), and cluster_wbuild_gb().


|
static |
Definition at line 1040 of file vfs_cluster.c.
References bread_gb(), buf, and malloc().
Referenced by cluster_write_gb().


|
static |
Definition at line 318 of file vfs_cluster.c.
References bogus_page, bqrelse(), brelse(), buf, cluster_callback(), getblk(), panic(), printf(), and unmapped_buf.
Referenced by cluster_read_gb().


| int cluster_read | ( | struct vnode * | vp, |
| u_quad_t | filesize, | ||
| daddr_t | lblkno, | ||
| long | size, | ||
| struct ucred * | cred, | ||
| long | totread, | ||
| int | seqcount, | ||
| struct buf ** | bpp | ||
| ) |
Definition at line 90 of file vfs_cluster.c.
References cluster_read_gb().

| int cluster_read_gb | ( | struct vnode * | vp, |
| u_quad_t | filesize, | ||
| daddr_t | lblkno, | ||
| long | size, | ||
| struct ucred * | cred, | ||
| long | totread, | ||
| int | seqcount, | ||
| int | gbflags, | ||
| struct buf ** | bpp | ||
| ) |
Definition at line 99 of file vfs_cluster.c.
References bqrelse(), buf, bufwait(), cluster_rbuild(), gbincore(), getblk(), nbuf, read_max, read_min, and vfs_busy_pages().
Referenced by cluster_read().


| int cluster_wbuild | ( | struct vnode * | vp, |
| long | size, | ||
| daddr_t | start_lbn, | ||
| int | len | ||
| ) |
Definition at line 781 of file vfs_cluster.c.
References cluster_wbuild_gb().

| int cluster_wbuild_gb | ( | struct vnode * | vp, |
| long | size, | ||
| daddr_t | start_lbn, | ||
| int | len, | ||
| int | gbflags | ||
| ) |
Definition at line 788 of file vfs_cluster.c.
References bawrite(), bqrelse(), bremfree(), buf, bufobj_wref(), bundirty(), cluster_callback(), crhold(), gbincore(), panic(), reassignbuf(), and unmapped_buf.
Referenced by cluster_wbuild(), cluster_wbuild_wb(), and vfs_bio_awrite().


|
static |
Definition at line 590 of file vfs_cluster.c.
References cluster_wbuild_gb(), and write_behind.
Referenced by cluster_write_gb().


| void cluster_write | ( | struct vnode * | vp, |
| struct buf * | bp, | ||
| u_quad_t | filesize, | ||
| int | seqcount | ||
| ) |
Definition at line 622 of file vfs_cluster.c.
References cluster_write_gb().

| void cluster_write_gb | ( | struct vnode * | vp, |
| struct buf * | bp, | ||
| u_quad_t | filesize, | ||
| int | seqcount, | ||
| int | gbflags | ||
| ) |
Definition at line 629 of file vfs_cluster.c.
References bawrite(), bdwrite(), brelse(), buf, cluster_collectbufs(), cluster_wbuild_wb(), and free().
Referenced by cluster_write().


|
static |
| SYSCTL_INT | ( | _vfs | , |
| OID_AUTO | , | ||
| write_behind | , | ||
| CTLFLAG_RW | , | ||
| & | write_behind, | ||
| 0 | , | ||
| "Cluster write-behind; 0: | disable, | ||
| 1:enable | , | ||
| 2:backed off" | |||
| ) |
| SYSCTL_INT | ( | _vfs | , |
| OID_AUTO | , | ||
| read_max | , | ||
| CTLFLAG_RW | , | ||
| & | read_max, | ||
| 0 | , | ||
| "Cluster read-ahead max block count" | |||
| ) |
| SYSCTL_INT | ( | _vfs | , |
| OID_AUTO | , | ||
| read_min | , | ||
| CTLFLAG_RW | , | ||
| & | read_min, | ||
| 0 | , | ||
| "Cluster read min block count" | |||
| ) |
| 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 74 of file vfs_cluster.c.
Referenced by cluster_read_gb().
|
static |
Definition at line 78 of file vfs_cluster.c.
Referenced by cluster_read_gb().
|
static |
Definition at line 70 of file vfs_cluster.c.
Referenced by cluster_wbuild_wb().