HomeFreeBSD

zfs_clone_range should return a descriptive error codes

Description

zfs_clone_range should return a descriptive error codes

Return the more descriptive error codes instead of EXDEV when
the parameters don't match the requirements of the clone function.
Updated the comments in brt.c accordingly.
The first three errors are just invalid parameters, which zfs can
not handle.
The fourth error indicates that the block which should be cloned
is created and cloned or modified in the same transaction
group (txg).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Kay Pedersen <mail@mkwg.de>
Closes #15148

Details

Provenance
oromenahar <christianpe96@gmail.com>Authored on Aug 8 2023, 4:37 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 25 2023, 8:33 PM
Parents
rG6bdc7259d1a3: libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG895cb689d310: zfs_clone_range should return a descriptive error codes (authored by oromenahar <christianpe96@gmail.com>).Aug 25 2023, 8:33 PM