arc.h revision c5904d138f3bdf0762dbf452a43d5a5c387ea6a8
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_ARC_H
#define _SYS_ARC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#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
*/
#ifdef ZFS_DEBUG
#endif
void arc_init(void);
void arc_fini(void);
/*
* Level 2 ARC
*/
void l2arc_init(void);
void l2arc_fini(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ARC_H */