mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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 <[email protected]> Signed-off-by: Pawel Jakub Dawidek <[email protected]> Closes #16208
This commit is contained in:
1 parent
efbef9e6cc
commit
08648cf0da
1 file changed
+5
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user