3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens/*
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * CDDL HEADER START
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens *
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * The contents of this file are subject to the terms of the
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * Common Development and Distribution License (the "License").
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * You may not use this file except in compliance with the License.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens *
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * or http://www.opensolaris.org/os/licensing.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * See the License for the specific language governing permissions
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * and limitations under the License.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens *
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * When distributing Covered Code, include this CDDL HEADER in each
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * If applicable, add the following below this CDDL HEADER, with the
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * fields enclosed by brackets "[]" replaced with your own identifying
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * information: Portions Copyright [yyyy] [name of copyright owner]
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens *
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * CDDL HEADER END
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens */
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens/*
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * Copyright (c) 2012 by Delphix. All rights reserved.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens * Copyright (c) 2012, Joyent, Inc. All rights reserved.
a7a845e4bf22fd1b2a284729ccd95c7370a0438cSteven Hartland * Copyright (c) 2013 Steven Hartland. All rights reserved.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens */
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#ifndef _SYS_DSL_USERHOLD_H
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#define _SYS_DSL_USERHOLD_H
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#include <sys/nvpair.h>
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#include <sys/types.h>
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#ifdef __cplusplus
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensextern "C" {
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#endif
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensstruct dsl_pool;
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensstruct dsl_dataset;
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensstruct dmu_tx;
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_dataset_user_hold(nvlist_t *holds, minor_t cleanup_minor,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens nvlist_t *errlist);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_dataset_user_release(nvlist_t *holds, nvlist_t *errlist);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_dataset_get_holds(const char *dsname, nvlist_t *nvl);
a7a845e4bf22fd1b2a284729ccd95c7370a0438cSteven Hartlandvoid dsl_dataset_user_release_tmp(struct dsl_pool *dp, nvlist_t *holds);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_dataset_user_hold_check_one(struct dsl_dataset *ds, const char *htag,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens boolean_t temphold, struct dmu_tx *tx);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensvoid dsl_dataset_user_hold_sync_one(struct dsl_dataset *ds, const char *htag,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens minor_t minor, uint64_t now, struct dmu_tx *tx);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#ifdef __cplusplus
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens}
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#endif
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens#endif /* _SYS_DSL_USERHOLD_H */