usr/src/lib/libzfs/common/libzfs.h
changeset 11007 216d8396182e
parent 10921 8aac17999e4d
child 11022 63ab26072e41
equal deleted inserted replaced
11006:4fe66eb82610 11007:216d8396182e
   116 	EZFS_ACTIVE_SPARE,	/* pool has active shared spare devices */
   116 	EZFS_ACTIVE_SPARE,	/* pool has active shared spare devices */
   117 	EZFS_UNPLAYED_LOGS,	/* log device has unplayed logs */
   117 	EZFS_UNPLAYED_LOGS,	/* log device has unplayed logs */
   118 	EZFS_REFTAG_RELE,	/* snapshot release: tag not found */
   118 	EZFS_REFTAG_RELE,	/* snapshot release: tag not found */
   119 	EZFS_REFTAG_HOLD,	/* snapshot hold: tag already exists */
   119 	EZFS_REFTAG_HOLD,	/* snapshot hold: tag already exists */
   120 	EZFS_TAGTOOLONG,	/* snapshot hold/rele: tag too long */
   120 	EZFS_TAGTOOLONG,	/* snapshot hold/rele: tag too long */
       
   121 	EZFS_PIPEFAILED,	/* pipe create failed */
       
   122 	EZFS_THREADCREATEFAILED, /* thread create failed */
   121 	EZFS_UNKNOWN
   123 	EZFS_UNKNOWN
   122 };
   124 };
   123 
   125 
   124 /*
   126 /*
   125  * The following data structures are all part
   127  * The following data structures are all part
   468 extern int zfs_destroy_snaps(zfs_handle_t *, char *, boolean_t);
   470 extern int zfs_destroy_snaps(zfs_handle_t *, char *, boolean_t);
   469 extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *);
   471 extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *);
   470 extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *);
   472 extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *);
   471 extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t);
   473 extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t);
   472 extern int zfs_rename(zfs_handle_t *, const char *, boolean_t);
   474 extern int zfs_rename(zfs_handle_t *, const char *, boolean_t);
       
   475 
       
   476 typedef struct sendflags {
       
   477 	/* print informational messages (ie, -v was specified) */
       
   478 	int verbose : 1;
       
   479 
       
   480 	/* recursive send  (i.e., -R) */
       
   481 	int replicate : 1;
       
   482 
       
   483 	/* for incrementals, do all intermediate snapshots */
       
   484 	int doall : 1; /* (i.e., -I) */
       
   485 
       
   486 	/* if dataset is a clone, do incremental from its origin */
       
   487 	int fromorigin : 1;
       
   488 
       
   489 	/* do deduplication */
       
   490 	int dedup : 1;
       
   491 } sendflags_t;
       
   492 
       
   493 typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *);
       
   494 
   473 extern int zfs_send(zfs_handle_t *, const char *, const char *,
   495 extern int zfs_send(zfs_handle_t *, const char *, const char *,
   474     boolean_t, boolean_t, boolean_t, boolean_t, int);
   496     sendflags_t, int, snapfilter_cb_t, void *);
       
   497 
   475 extern int zfs_promote(zfs_handle_t *);
   498 extern int zfs_promote(zfs_handle_t *);
   476 extern int zfs_hold(zfs_handle_t *, const char *, const char *, boolean_t,
   499 extern int zfs_hold(zfs_handle_t *, const char *, const char *, boolean_t,
   477     boolean_t);
   500     boolean_t);
   478 extern int zfs_hold_range(zfs_handle_t *, const char *, const char *,
   501 extern int zfs_hold_range(zfs_handle_t *, const char *, const char *,
   479     const char *, boolean_t);
   502     const char *, boolean_t);