mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
OpenZFS 6052 - decouple lzc_create() from the implementation details
Authored by: Andriy Gapon <andriy.gapon@clusterhq.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov mail@gmelikov.ru OpenZFS-issue: https://www.illumos.org/issues/6052 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/26455f9 Closes #5622
This commit is contained in:
committed by
Brian Behlendorf
parent
f85c06bedf
commit
e67a7ffb5d
@@ -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 **);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user