summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2017-01-23 20:49:57 +0300
committerBrian Behlendorf <[email protected]>2017-01-23 09:49:57 -0800
commite67a7ffb5d1f4255a89d7511ea3554c7c7488e5a (patch)
tree36ed7e0bba5131d3de4ca06968d75d44afad08e8 /include
parentf85c06bedfd2a60f5b5d6a7492ed847c2bffd9fe (diff)
OpenZFS 6052 - decouple lzc_create() from the implementation details
Authored by: Andriy Gapon <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov [email protected] OpenZFS-issue: https://www.illumos.org/issues/6052 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/26455f9 Closes #5622
Diffstat (limited to 'include')
-rw-r--r--include/libzfs_core.h10
-rw-r--r--include/sys/fs/zfs.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/include/libzfs_core.h b/include/libzfs_core.h
index bc0f115bb..e67e4a130 100644
--- a/include/libzfs_core.h
+++ b/include/libzfs_core.h
@@ -38,8 +38,16 @@ extern "C" {
int libzfs_core_init(void);
void libzfs_core_fini(void);
+/*
+ * NB: this type should be kept binary compatible with dmu_objset_type_t.
+ */
+enum lzc_dataset_type {
+ LZC_DATSET_TYPE_ZFS = 2,
+ LZC_DATSET_TYPE_ZVOL
+};
+
int lzc_snapshot(nvlist_t *, nvlist_t *, nvlist_t **);
-int lzc_create(const char *, dmu_objset_type_t, nvlist_t *);
+int lzc_create(const char *, enum lzc_dataset_type, nvlist_t *);
int lzc_clone(const char *, const char *, nvlist_t *);
int lzc_destroy_snaps(nvlist_t *, boolean_t, nvlist_t **);
int lzc_bookmark(nvlist_t *, nvlist_t **);
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h
index f09e4bfa0..e95e8ce68 100644
--- a/include/sys/fs/zfs.h
+++ b/include/sys/fs/zfs.h
@@ -54,6 +54,10 @@ typedef enum {
ZFS_TYPE_BOOKMARK = (1 << 4)
} zfs_type_t;
+/*
+ * NB: lzc_dataset_type should be updated whenever a new objset type is added,
+ * if it represents a real type of a dataset that can be created from userland.
+ */
typedef enum dmu_objset_type {
DMU_OST_NONE,
DMU_OST_META,