mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +03:00
Implement a new type of zfs receive: corrective receive (-c)
This type of recv is used to heal corrupted data when a replica of the data already exists (in the form of a send file for example). With the provided send stream, corrective receive will read from disk blocks described by the WRITE records. When any of the reads come back with ECKSUM we use the data from the corresponding WRITE record to rewrite the corrupted block. Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Paul Zuchowski <pzuchowski@datto.com> Signed-off-by: Alek Pinchuk <apinchuk@axcient.com> Closes #9372
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
* Copyright (c) 2012, 2020 by Delphix. All rights reserved.
|
||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2019 Datto Inc.
|
||||
*/
|
||||
|
||||
#ifndef _DMU_RECV_H
|
||||
@@ -47,6 +48,7 @@ typedef struct dmu_recv_cookie {
|
||||
boolean_t drc_byteswap;
|
||||
uint64_t drc_featureflags;
|
||||
boolean_t drc_force;
|
||||
boolean_t drc_heal;
|
||||
boolean_t drc_resumable;
|
||||
boolean_t drc_should_save;
|
||||
boolean_t drc_raw;
|
||||
@@ -78,7 +80,7 @@ typedef struct dmu_recv_cookie {
|
||||
} dmu_recv_cookie_t;
|
||||
|
||||
int dmu_recv_begin(char *, char *, dmu_replay_record_t *,
|
||||
boolean_t, boolean_t, nvlist_t *, nvlist_t *, char *,
|
||||
boolean_t, boolean_t, boolean_t, nvlist_t *, nvlist_t *, char *,
|
||||
dmu_recv_cookie_t *, zfs_file_t *, offset_t *);
|
||||
int dmu_recv_stream(dmu_recv_cookie_t *, offset_t *);
|
||||
int dmu_recv_end(dmu_recv_cookie_t *, void *);
|
||||
|
||||
Reference in New Issue
Block a user