Print this page
*** NO COMMENTS ***


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  25  * Copyright (c) 2012 by Delphix. All rights reserved.
  26  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  27  */
  28 
  29 #ifndef _LIBZFS_H
  30 #define _LIBZFS_H
  31 
  32 #include <assert.h>
  33 #include <libnvpair.h>
  34 #include <sys/mnttab.h>
  35 #include <sys/param.h>
  36 #include <sys/types.h>
  37 #include <sys/varargs.h>
  38 #include <sys/fs/zfs.h>
  39 #include <sys/avl.h>
  40 #include <ucred.h>
  41 
  42 #ifdef  __cplusplus
  43 extern "C" {
  44 #endif


 563         boolean_t verbose;
 564 
 565         /* recursive send  (ie, -R) */
 566         boolean_t replicate;
 567 
 568         /* for incrementals, do all intermediate snapshots */
 569         boolean_t doall;
 570 
 571         /* if dataset is a clone, do incremental from its origin */
 572         boolean_t fromorigin;
 573 
 574         /* do deduplication */
 575         boolean_t dedup;
 576 
 577         /* send properties (ie, -p) */
 578         boolean_t props;
 579 
 580         /* do not send (no-op, ie. -n) */
 581         boolean_t dryrun;
 582 



 583         /* parsable verbose output (ie. -P) */
 584         boolean_t parsable;
 585 
 586         /* show progress (ie. -v) */
 587         boolean_t progress;
 588 } sendflags_t;
 589 
 590 typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *);
 591 
 592 extern int zfs_send(zfs_handle_t *, const char *, const char *,
 593     sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **);
 594 
 595 extern int zfs_promote(zfs_handle_t *);
 596 extern int zfs_hold(zfs_handle_t *, const char *, const char *, boolean_t,
 597     boolean_t, boolean_t, int, uint64_t, uint64_t);
 598 extern int zfs_release(zfs_handle_t *, const char *, const char *, boolean_t);
 599 extern int zfs_get_holds(zfs_handle_t *, nvlist_t **);
 600 extern uint64_t zvol_volsize_to_reservation(uint64_t, nvlist_t *);
 601 
 602 typedef int (*zfs_userspace_cb_t)(void *arg, const char *domain,




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  25  * Copyright (c) 2012 by Delphix. All rights reserved.
  26  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  27  */
  28 
  29 #ifndef _LIBZFS_H
  30 #define _LIBZFS_H
  31 
  32 #include <assert.h>
  33 #include <libnvpair.h>
  34 #include <sys/mnttab.h>
  35 #include <sys/param.h>
  36 #include <sys/types.h>
  37 #include <sys/varargs.h>
  38 #include <sys/fs/zfs.h>
  39 #include <sys/avl.h>
  40 #include <ucred.h>
  41 
  42 #ifdef  __cplusplus
  43 extern "C" {
  44 #endif


 563         boolean_t verbose;
 564 
 565         /* recursive send  (ie, -R) */
 566         boolean_t replicate;
 567 
 568         /* for incrementals, do all intermediate snapshots */
 569         boolean_t doall;
 570 
 571         /* if dataset is a clone, do incremental from its origin */
 572         boolean_t fromorigin;
 573 
 574         /* do deduplication */
 575         boolean_t dedup;
 576 
 577         /* send properties (ie, -p) */
 578         boolean_t props;
 579 
 580         /* do not send (no-op, ie. -n) */
 581         boolean_t dryrun;
 582 
 583         /* do not send (just calculate exact send stream size, ie. -s */
 584         boolean_t sendsize;
 585 
 586         /* parsable verbose output (ie. -P) */
 587         boolean_t parsable;
 588 
 589         /* show progress (ie. -v) */
 590         boolean_t progress;
 591 } sendflags_t;
 592 
 593 typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *);
 594 
 595 extern int zfs_send(zfs_handle_t *, const char *, const char *,
 596     sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **);
 597 
 598 extern int zfs_promote(zfs_handle_t *);
 599 extern int zfs_hold(zfs_handle_t *, const char *, const char *, boolean_t,
 600     boolean_t, boolean_t, int, uint64_t, uint64_t);
 601 extern int zfs_release(zfs_handle_t *, const char *, const char *, boolean_t);
 602 extern int zfs_get_holds(zfs_handle_t *, nvlist_t **);
 603 extern uint64_t zvol_volsize_to_reservation(uint64_t, nvlist_t *);
 604 
 605 typedef int (*zfs_userspace_cb_t)(void *arg, const char *domain,