mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +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:
@@ -829,6 +829,9 @@ typedef struct recvflags {
|
||||
|
||||
/* force unmount while recv snapshot (private) */
|
||||
boolean_t forceunmount;
|
||||
|
||||
/* use this recv to check (and heal if needed) an existing snapshot */
|
||||
boolean_t heal;
|
||||
} recvflags_t;
|
||||
|
||||
_LIBZFS_H int zfs_receive(libzfs_handle_t *, const char *, nvlist_t *,
|
||||
|
||||
Reference in New Issue
Block a user