mirror of https://github.com/openzfs/zfs.git
Allow block cloning to be interrupted by a signal.
Even though block cloning is much faster than regular copying, it is not instantaneous - the file might be large and the recordsize small. It would be nice to be able to interrupt it with a signal (e.g., SIGINFO on FreeBSD to see the progress). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Closes #16208
This commit is contained in:
parent
efbef9e6cc
commit
08648cf0da
|
@ -1412,6 +1412,11 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
|||
outoff += size;
|
||||
len -= size;
|
||||
done += size;
|
||||
|
||||
if (issig(JUSTLOOKING) && issig(FORREAL)) {
|
||||
error = SET_ERROR(EINTR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vmem_free(bps, sizeof (bps[0]) * maxblocks);
|
||||
|
|
Loading…
Reference in New Issue