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) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /*
27 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
28 * Copyright 2015 Toomas Soome <tsoome@me.com>
29 */
30
31 #ifndef _LIBBE_H
32 #define _LIBBE_H
33
34 #include <libnvpair.h>
35 #include <uuid/uuid.h>
36 #include <libzfs.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #define BE_ATTR_ORIG_BE_NAME "orig_be_name"
43 #define BE_ATTR_ORIG_BE_POOL "orig_be_pool"
44 #define BE_ATTR_SNAP_NAME "snap_name"
45
46 #define BE_ATTR_NEW_BE_NAME "new_be_name"
47 #define BE_ATTR_NEW_BE_POOL "new_be_pool"
48 #define BE_ATTR_NEW_BE_DESC "new_be_desc"
223 int be_copy(nvlist_t *);
224
225 int be_mount(nvlist_t *);
226 int be_unmount(nvlist_t *);
227
228 int be_rename(nvlist_t *);
229
230 int be_activate(nvlist_t *);
231
232 int be_create_snapshot(nvlist_t *);
233 int be_destroy_snapshot(nvlist_t *);
234 int be_rollback(nvlist_t *);
235
236 /*
237 * Functions for listing and getting information about existing BEs.
238 */
239 int be_list(char *, be_node_list_t **);
240 void be_free_list(be_node_list_t *);
241 int be_max_avail(char *, uint64_t *);
242 char *be_err_to_str(int);
243 void be_sort(be_node_list_t **, int);
244
245 /*
246 * Library functions
247 */
248 void libbe_print_errors(boolean_t);
249
250 #ifdef __cplusplus
251 }
252 #endif
253
254 #endif /* _LIBBE_H */
|
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) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /*
27 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
28 * Copyright 2015 Toomas Soome <tsoome@me.com>
29 * Copyright 2015 Gary Mills
30 */
31
32 #ifndef _LIBBE_H
33 #define _LIBBE_H
34
35 #include <libnvpair.h>
36 #include <uuid/uuid.h>
37 #include <libzfs.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define BE_ATTR_ORIG_BE_NAME "orig_be_name"
44 #define BE_ATTR_ORIG_BE_POOL "orig_be_pool"
45 #define BE_ATTR_SNAP_NAME "snap_name"
46
47 #define BE_ATTR_NEW_BE_NAME "new_be_name"
48 #define BE_ATTR_NEW_BE_POOL "new_be_pool"
49 #define BE_ATTR_NEW_BE_DESC "new_be_desc"
224 int be_copy(nvlist_t *);
225
226 int be_mount(nvlist_t *);
227 int be_unmount(nvlist_t *);
228
229 int be_rename(nvlist_t *);
230
231 int be_activate(nvlist_t *);
232
233 int be_create_snapshot(nvlist_t *);
234 int be_destroy_snapshot(nvlist_t *);
235 int be_rollback(nvlist_t *);
236
237 /*
238 * Functions for listing and getting information about existing BEs.
239 */
240 int be_list(char *, be_node_list_t **);
241 void be_free_list(be_node_list_t *);
242 int be_max_avail(char *, uint64_t *);
243 char *be_err_to_str(int);
244 int be_sort(be_node_list_t **, int);
245
246 /*
247 * Library functions
248 */
249 void libbe_print_errors(boolean_t);
250
251 #ifdef __cplusplus
252 }
253 #endif
254
255 #endif /* _LIBBE_H */
|