HomeFreeBSD

Enforce "-F" flag on resuming recv of full/newfs on existing dataset

Description

Enforce "-F" flag on resuming recv of full/newfs on existing dataset

When receiving full/newfs on existing dataset, then it should be done
with "-F" flag. Its enforced for initial receive in checks done in
zfs_receive_one function of libzfs. Similarly, on resuming full/newfs
recv on existing dataset, it should be done with "-F" flag.

When dataset doesn't exist, then full/new recv is done on newly created
dataset and it's marked INCONSISTENT. But when receiving on existing
dataset, recv is first done on %recv and its marked INCONSISTENT.
Existing dataset is not marked INCONSISTENT. Resume of full/newfs
receive with dataset not INCONSISTENT indicates that its resuming newfs
on existing dataset. So, enforce "-F" flag in this case.

Also return an error from dmu_recv_resume_begin_check() in zfs kernel,
when its resuming full/newfs recv without force.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Chunwei Chen <david.chen@nutanix.com>
Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #13856
Closes #13857

Details

Provenance
Jitendra Patidar <53164267+jsai20@users.noreply.github.com>Authored on Sep 27 2022, 11:34 PM
GitHub <noreply@github.com>Committed on Sep 27 2022, 11:34 PM
Parents
rGa2163a96ae87: Fix bad free in skein code
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG3ed9d6883bcf: Enforce "-F" flag on resuming recv of full/newfs on existing dataset (authored by Jitendra Patidar <53164267+jsai20@users.noreply.github.com>).Sep 27 2022, 11:34 PM