mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
OpenZFS 2605, 6980, 6902
2605 want to resume interrupted zfs send Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Xin Li <delphij@freebsd.org> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@omniti.com> Ported-by: kernelOfTruth <kerneloftruth@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/2605 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9c3fd12 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Ported by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/6980 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ea4a67f Porting notes: - All rsend and snapshop tests enabled and updated for Linux. - Fix misuse of input argument in traverse_visitbp(). - Fix ISO C90 warnings and errors. - Fix gcc 'missing braces around initializer' in 'struct send_thread_arg to_arg =' warning. - Replace 4 argument fletcher_4_native() with 3 argument version, this change was made in OpenZFS 4185 which has not been ported. - Part of the sections for 'zfs receive' and 'zfs send' was rewritten and reordered to approximate upstream. - Fix mktree xattr creation, 'user.' prefix required. - Minor fixes to newly enabled test cases - Long holds for volumes allowed during receive for minor registration.
This commit is contained in:
committed by
Brian Behlendorf
parent
669cf0ab29
commit
47dfff3b86
+23
-11
@@ -90,16 +90,16 @@ typedef enum drr_headertype {
|
||||
* Feature flags for zfs send streams (flags in drr_versioninfo)
|
||||
*/
|
||||
|
||||
#define DMU_BACKUP_FEATURE_DEDUP (1<<0)
|
||||
#define DMU_BACKUP_FEATURE_DEDUPPROPS (1<<1)
|
||||
#define DMU_BACKUP_FEATURE_SA_SPILL (1<<2)
|
||||
#define DMU_BACKUP_FEATURE_DEDUP (1 << 0)
|
||||
#define DMU_BACKUP_FEATURE_DEDUPPROPS (1 << 1)
|
||||
#define DMU_BACKUP_FEATURE_SA_SPILL (1 << 2)
|
||||
/* flags #3 - #15 are reserved for incompatible closed-source implementations */
|
||||
#define DMU_BACKUP_FEATURE_EMBED_DATA (1<<16)
|
||||
#define DMU_BACKUP_FEATURE_EMBED_DATA_LZ4 (1<<17)
|
||||
#define DMU_BACKUP_FEATURE_EMBED_DATA (1 << 16)
|
||||
#define DMU_BACKUP_FEATURE_EMBED_DATA_LZ4 (1 << 17)
|
||||
/* flag #18 is reserved for a Delphix feature */
|
||||
#define DMU_BACKUP_FEATURE_LARGE_BLOCKS (1<<19)
|
||||
/* flag #20 is reserved for resumable streams */
|
||||
#define DMU_BACKUP_FEATURE_LARGE_DNODE (1<<21)
|
||||
#define DMU_BACKUP_FEATURE_LARGE_BLOCKS (1 << 19)
|
||||
#define DMU_BACKUP_FEATURE_RESUMING (1 << 20)
|
||||
#define DMU_BACKUP_FEATURE_LARGE_DNODE (1 << 21)
|
||||
|
||||
/*
|
||||
* Mask of all supported backup features
|
||||
@@ -107,11 +107,16 @@ typedef enum drr_headertype {
|
||||
#define DMU_BACKUP_FEATURE_MASK (DMU_BACKUP_FEATURE_DEDUP | \
|
||||
DMU_BACKUP_FEATURE_DEDUPPROPS | DMU_BACKUP_FEATURE_SA_SPILL | \
|
||||
DMU_BACKUP_FEATURE_EMBED_DATA | DMU_BACKUP_FEATURE_EMBED_DATA_LZ4 | \
|
||||
DMU_BACKUP_FEATURE_LARGE_BLOCKS | DMU_BACKUP_FEATURE_LARGE_DNODE)
|
||||
DMU_BACKUP_FEATURE_RESUMING | DMU_BACKUP_FEATURE_LARGE_BLOCKS | \
|
||||
DMU_BACKUP_FEATURE_LARGE_DNODE)
|
||||
|
||||
/* Are all features in the given flag word currently supported? */
|
||||
#define DMU_STREAM_SUPPORTED(x) (!((x) & ~DMU_BACKUP_FEATURE_MASK))
|
||||
|
||||
typedef enum dmu_send_resume_token_version {
|
||||
ZFS_SEND_RESUME_TOKEN_VERSION = 1
|
||||
} dmu_send_resume_token_version_t;
|
||||
|
||||
/*
|
||||
* The drr_versioninfo field of the dmu_replay_record has the
|
||||
* following layout:
|
||||
@@ -335,6 +340,12 @@ typedef enum zfs_case {
|
||||
ZFS_CASE_MIXED
|
||||
} zfs_case_t;
|
||||
|
||||
/*
|
||||
* Note: this struct must have the same layout in 32-bit and 64-bit, so
|
||||
* that 32-bit processes (like /sbin/zfs) can pass it to the 64-bit
|
||||
* kernel. Therefore, we add padding to it so that no "hidden" padding
|
||||
* is automatically added on 64-bit (but not on 32-bit).
|
||||
*/
|
||||
typedef struct zfs_cmd {
|
||||
char zc_name[MAXPATHLEN]; /* name of pool or dataset */
|
||||
uint64_t zc_nvlist_src; /* really (char *) */
|
||||
@@ -363,14 +374,15 @@ typedef struct zfs_cmd {
|
||||
uint64_t zc_iflags; /* internal to zfs(7fs) */
|
||||
zfs_share_t zc_share;
|
||||
dmu_objset_stats_t zc_objset_stats;
|
||||
struct drr_begin zc_begin_record;
|
||||
dmu_replay_record_t zc_begin_record;
|
||||
zinject_record_t zc_inject_record;
|
||||
uint32_t zc_defer_destroy;
|
||||
uint32_t zc_flags;
|
||||
uint64_t zc_action_handle;
|
||||
int zc_cleanup_fd;
|
||||
uint8_t zc_simple;
|
||||
uint8_t zc_pad[3]; /* alignment */
|
||||
boolean_t zc_resumable;
|
||||
uint8_t zc_pad[2]; /* alignment */
|
||||
uint64_t zc_sendobj;
|
||||
uint64_t zc_fromobj;
|
||||
uint64_t zc_createtxg;
|
||||
|
||||
Reference in New Issue
Block a user