13b2aab18SMatthew Ahrens 23b2aab18SMatthew Ahrens /* 33b2aab18SMatthew Ahrens * CDDL HEADER START 43b2aab18SMatthew Ahrens * 53b2aab18SMatthew Ahrens * The contents of this file are subject to the terms of the 63b2aab18SMatthew Ahrens * Common Development and Distribution License (the "License"). 73b2aab18SMatthew Ahrens * You may not use this file except in compliance with the License. 83b2aab18SMatthew Ahrens * 93b2aab18SMatthew Ahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 103b2aab18SMatthew Ahrens * or http://www.opensolaris.org/os/licensing. 113b2aab18SMatthew Ahrens * See the License for the specific language governing permissions 123b2aab18SMatthew Ahrens * and limitations under the License. 133b2aab18SMatthew Ahrens * 143b2aab18SMatthew Ahrens * When distributing Covered Code, include this CDDL HEADER in each 153b2aab18SMatthew Ahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 163b2aab18SMatthew Ahrens * If applicable, add the following below this CDDL HEADER, with the 173b2aab18SMatthew Ahrens * fields enclosed by brackets "[]" replaced with your own identifying 183b2aab18SMatthew Ahrens * information: Portions Copyright [yyyy] [name of copyright owner] 193b2aab18SMatthew Ahrens * 203b2aab18SMatthew Ahrens * CDDL HEADER END 213b2aab18SMatthew Ahrens */ 223b2aab18SMatthew Ahrens /* 233b2aab18SMatthew Ahrens * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 243b2aab18SMatthew Ahrens * Copyright (c) 2012 by Delphix. All rights reserved. 253b2aab18SMatthew Ahrens * Copyright (c) 2012, Joyent, Inc. All rights reserved. 26*a7a845e4SSteven Hartland * Copyright (c) 2013 Steven Hartland. All rights reserved. 273b2aab18SMatthew Ahrens */ 283b2aab18SMatthew Ahrens 293b2aab18SMatthew Ahrens #ifndef _SYS_DSL_USERHOLD_H 303b2aab18SMatthew Ahrens #define _SYS_DSL_USERHOLD_H 313b2aab18SMatthew Ahrens 323b2aab18SMatthew Ahrens #include <sys/nvpair.h> 333b2aab18SMatthew Ahrens #include <sys/types.h> 343b2aab18SMatthew Ahrens 353b2aab18SMatthew Ahrens #ifdef __cplusplus 363b2aab18SMatthew Ahrens extern "C" { 373b2aab18SMatthew Ahrens #endif 383b2aab18SMatthew Ahrens 393b2aab18SMatthew Ahrens struct dsl_pool; 403b2aab18SMatthew Ahrens struct dsl_dataset; 413b2aab18SMatthew Ahrens struct dmu_tx; 423b2aab18SMatthew Ahrens 433b2aab18SMatthew Ahrens int dsl_dataset_user_hold(nvlist_t *holds, minor_t cleanup_minor, 443b2aab18SMatthew Ahrens nvlist_t *errlist); 453b2aab18SMatthew Ahrens int dsl_dataset_user_release(nvlist_t *holds, nvlist_t *errlist); 463b2aab18SMatthew Ahrens int dsl_dataset_get_holds(const char *dsname, nvlist_t *nvl); 47*a7a845e4SSteven Hartland void dsl_dataset_user_release_tmp(struct dsl_pool *dp, nvlist_t *holds); 483b2aab18SMatthew Ahrens int dsl_dataset_user_hold_check_one(struct dsl_dataset *ds, const char *htag, 493b2aab18SMatthew Ahrens boolean_t temphold, struct dmu_tx *tx); 503b2aab18SMatthew Ahrens void dsl_dataset_user_hold_sync_one(struct dsl_dataset *ds, const char *htag, 513b2aab18SMatthew Ahrens minor_t minor, uint64_t now, struct dmu_tx *tx); 523b2aab18SMatthew Ahrens 533b2aab18SMatthew Ahrens #ifdef __cplusplus 543b2aab18SMatthew Ahrens } 553b2aab18SMatthew Ahrens #endif 563b2aab18SMatthew Ahrens 573b2aab18SMatthew Ahrens #endif /* _SYS_DSL_USERHOLD_H */ 58