Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_cluster.c
Show All 30 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 | * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_debug_cluster.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/bio.h> | #include <sys/bio.h> | ||||
#include <sys/buf.h> | #include <sys/buf.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/racct.h> | #include <sys/racct.h> | ||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_object.h> | #include <vm/vm_object.h> | ||||
#include <vm/vm_page.h> | #include <vm/vm_page.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#if defined(CLUSTERDEBUG) | |||||
static int rcluster= 0; | |||||
SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rcluster, 0, | |||||
"Debug VFS clustering code"); | |||||
#endif | |||||
static MALLOC_DEFINE(M_SEGMENT, "cl_savebuf", "cluster_save buffer"); | static MALLOC_DEFINE(M_SEGMENT, "cl_savebuf", "cluster_save buffer"); | ||||
static uma_zone_t cluster_pbuf_zone; | static uma_zone_t cluster_pbuf_zone; | ||||
static void cluster_init(void *); | static void cluster_init(void *); | ||||
static struct cluster_save *cluster_collectbufs(struct vnode *vp, | static struct cluster_save *cluster_collectbufs(struct vnode *vp, | ||||
struct buf *last_bp, int gbflags); | struct buf *last_bp, int gbflags); | ||||
static struct buf *cluster_rbuild(struct vnode *vp, u_quad_t filesize, | static struct buf *cluster_rbuild(struct vnode *vp, u_quad_t filesize, | ||||
▲ Show 20 Lines • Show All 1,014 Lines • Show Last 20 Lines |