mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
OpenZFS 8600 - ZFS channel programs - snapshot
Authored by: Chris Williamson <chris.williamson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Reviewed by: Brad Lewis <brad.lewis@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Ported-by: Don Brady <don.brady@delphix.com> ZFS channel programs should be able to create snapshots. In addition to the base snapshot functionality, this entails extra logic to handle edge cases which were formerly not possible, such as creating then destroying a snapshot in the same transaction sync. OpenZFS-issue: https://www.illumos.org/issues/8600 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/68089b8b
This commit is contained in:
committed by
Brian Behlendorf
parent
af07368986
commit
234c91c508
@@ -252,6 +252,13 @@ typedef struct dsl_dataset_rollback_arg {
|
||||
nvlist_t *ddra_result;
|
||||
} dsl_dataset_rollback_arg_t;
|
||||
|
||||
typedef struct dsl_dataset_snapshot_arg {
|
||||
nvlist_t *ddsa_snaps;
|
||||
nvlist_t *ddsa_props;
|
||||
nvlist_t *ddsa_errors;
|
||||
cred_t *ddsa_cr;
|
||||
} dsl_dataset_snapshot_arg_t;
|
||||
|
||||
/*
|
||||
* The max length of a temporary tag prefix is the number of hex digits
|
||||
* required to express UINT64_MAX plus one for the hyphen.
|
||||
@@ -296,6 +303,8 @@ uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
|
||||
struct dsl_crypto_params *, dmu_tx_t *);
|
||||
uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
|
||||
struct dsl_crypto_params *dcp, uint64_t flags, dmu_tx_t *tx);
|
||||
void dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx);
|
||||
int dsl_dataset_snapshot_check(void *arg, dmu_tx_t *tx);
|
||||
int dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors);
|
||||
void dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx);
|
||||
int dsl_dataset_promote_check(void *arg, dmu_tx_t *tx);
|
||||
|
||||
+1
-3
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2016, 2017 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_ZCP_H
|
||||
@@ -137,8 +137,6 @@ typedef struct zcp_lib_info {
|
||||
const zcp_arg_t kwargs[2];
|
||||
} zcp_lib_info_t;
|
||||
|
||||
int zcp_nvlist_to_lua(lua_State *, nvlist_t *, char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user