dmu_traverse.h revision b24ab6762772a3f6a89393947930c7fa61306783
563N/A/*
563N/A * CDDL HEADER START
563N/A *
563N/A * The contents of this file are subject to the terms of the
563N/A * Common Development and Distribution License (the "License").
563N/A * You may not use this file except in compliance with the License.
563N/A *
563N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6983N/A * or http://www.opensolaris.org/os/licensing.
6983N/A * See the License for the specific language governing permissions
563N/A * and limitations under the License.
563N/A *
563N/A * When distributing Covered Code, include this CDDL HEADER in each
563N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6983N/A * If applicable, add the following below this CDDL HEADER, with the
6983N/A * fields enclosed by brackets "[]" replaced with your own identifying
6983N/A * information: Portions Copyright [yyyy] [name of copyright owner]
6983N/A *
563N/A * CDDL HEADER END
563N/A */
563N/A/*
563N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
563N/A * Use is subject to license terms.
4972N/A */
6238N/A
563N/A#ifndef _SYS_DMU_TRAVERSE_H
563N/A#define _SYS_DMU_TRAVERSE_H
563N/A
563N/A#include <sys/zfs_context.h>
563N/A#include <sys/spa.h>
563N/A#include <sys/zio.h>
563N/A
662N/A#ifdef __cplusplus
662N/Aextern "C" {
1473N/A#endif
1473N/A
563N/Astruct dnode_phys;
1405N/Astruct dsl_dataset;
563N/Astruct zilog;
563N/A
563N/Atypedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
662N/A const zbookmark_t *zb, const struct dnode_phys *dnp, void *arg);
1042N/A
662N/A#define TRAVERSE_PRE (1<<0)
1042N/A#define TRAVERSE_POST (1<<1)
2086N/A#define TRAVERSE_PREFETCH_METADATA (1<<2)
2086N/A#define TRAVERSE_PREFETCH_DATA (1<<3)
563N/A#define TRAVERSE_PREFETCH (TRAVERSE_PREFETCH_METADATA | TRAVERSE_PREFETCH_DATA)
563N/A
1701N/Aint traverse_dataset(struct dsl_dataset *ds, uint64_t txg_start,
563N/A int flags, blkptr_cb_t func, void *arg);
563N/Aint traverse_pool(spa_t *spa, blkptr_cb_t func, void *arg, uint64_t txg_start);
563N/A
563N/A#ifdef __cplusplus
563N/A}
563N/A#endif
563N/A
563N/A#endif /* _SYS_DMU_TRAVERSE_H */
563N/A