zfs/contrib/pyzfs/libzfs_core
Jitendra Patidar 3ed9d6883b
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
2022-09-27 16:34:27 -07:00
..
bindings Implement a new type of zfs receive: corrective receive (-c) 2022-07-28 15:52:46 -07:00
test Implement a new type of zfs receive: corrective receive (-c) 2022-07-28 15:52:46 -07:00
__init__.py Implement a new type of zfs receive: corrective receive (-c) 2022-07-28 15:52:46 -07:00
_constants.py Enforce "-F" flag on resuming recv of full/newfs on existing dataset 2022-09-27 16:34:27 -07:00
_error_translation.py Implement a new type of zfs receive: corrective receive (-c) 2022-07-28 15:52:46 -07:00
_libzfs_core.py Implement a new type of zfs receive: corrective receive (-c) 2022-07-28 15:52:46 -07:00
_nvlist.py Fix typos in contrib/ 2019-08-30 09:44:43 -07:00
ctypes.py pyzfs: python3 support (library 2/2) 2019-01-06 10:39:41 -08:00
exceptions.py Fix cstyle warnings 2020-03-17 15:42:27 -07:00