1247580Smm
2247580Smm/*
3247580Smm * CDDL HEADER START
4247580Smm *
5247580Smm * The contents of this file are subject to the terms of the
6247580Smm * Common Development and Distribution License (the "License").
7247580Smm * You may not use this file except in compliance with the License.
8247580Smm *
9247580Smm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10247580Smm * or http://www.opensolaris.org/os/licensing.
11247580Smm * See the License for the specific language governing permissions
12247580Smm * and limitations under the License.
13247580Smm *
14247580Smm * When distributing Covered Code, include this CDDL HEADER in each
15247580Smm * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16247580Smm * If applicable, add the following below this CDDL HEADER, with the
17247580Smm * fields enclosed by brackets "[]" replaced with your own identifying
18247580Smm * information: Portions Copyright [yyyy] [name of copyright owner]
19247580Smm *
20247580Smm * CDDL HEADER END
21247580Smm */
22247580Smm/*
23247580Smm * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24247580Smm * Copyright (c) 2012 by Delphix. All rights reserved.
25247580Smm * Copyright (c) 2012, Joyent, Inc. All rights reserved.
26251646Sdelphij * Copyright (c) 2013 Steven Hartland. All rights reserved.
27247580Smm */
28247580Smm
29247580Smm#ifndef	_SYS_DSL_USERHOLD_H
30247580Smm#define	_SYS_DSL_USERHOLD_H
31247580Smm
32247580Smm#include <sys/nvpair.h>
33247580Smm#include <sys/types.h>
34247580Smm
35247580Smm#ifdef	__cplusplus
36247580Smmextern "C" {
37247580Smm#endif
38247580Smm
39247580Smmstruct dsl_pool;
40247580Smmstruct dsl_dataset;
41247580Smmstruct dmu_tx;
42247580Smm
43247580Smmint dsl_dataset_user_hold(nvlist_t *holds, minor_t cleanup_minor,
44247580Smm    nvlist_t *errlist);
45247580Smmint dsl_dataset_user_release(nvlist_t *holds, nvlist_t *errlist);
46247580Smmint dsl_dataset_get_holds(const char *dsname, nvlist_t *nvl);
47251646Sdelphijvoid dsl_dataset_user_release_tmp(struct dsl_pool *dp, nvlist_t *holds);
48247580Smmint dsl_dataset_user_hold_check_one(struct dsl_dataset *ds, const char *htag,
49247580Smm    boolean_t temphold, struct dmu_tx *tx);
50247580Smmvoid dsl_dataset_user_hold_sync_one(struct dsl_dataset *ds, const char *htag,
51247580Smm    minor_t minor, uint64_t now, struct dmu_tx *tx);
52247580Smm
53247580Smm#ifdef	__cplusplus
54247580Smm}
55247580Smm#endif
56247580Smm
57247580Smm#endif /* _SYS_DSL_USERHOLD_H */
58