arc.h revision 6e6d5868f52089b9026785bd90257a3d3f6e5ee2
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/
#ifndef _SYS_ARC_H
#define _SYS_ARC_H
#include <sys/zfs_context.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct arc_buf_hdr arc_buf_hdr_t;
typedef int arc_evict_func_t(void *private);
/* generic arc_done_func_t's which you can use */
struct arc_buf {
void *b_data;
void *b_private;
};
typedef enum arc_buf_contents {
ARC_BUFC_DATA, /* buffer contains data */
ARC_BUFC_METADATA, /* buffer contains metadata */
/*
* These are the flags we pass into calls to the arc
*/
/*
* The following breakdows of arc_size exist for kstat only.
*/
typedef enum arc_space_type {
#ifdef ZFS_DEBUG
#endif
void arc_init(void);
void arc_fini(void);
/*
* Level 2 ARC
*/
void l2arc_init(void);
void l2arc_fini(void);
void l2arc_start(void);
void l2arc_stop(void);
#ifndef _KERNEL
extern int arc_procfd;
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ARC_H */