diff options
author | Martin Matuska <mm@FreeBSD.org> | 2023-04-04 14:34:34 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2023-04-04 14:34:34 +0000 |
commit | 91ef6f14f234a12eb6cc961be01a483e9a0a5955 (patch) | |
tree | d8ef83f29572be92464c8709fe51f14e2532b922 | |
parent | 20c9c3be5acc66de9081f1f24456a62ba9395c4f (diff) |
Revert "zfs: fall back if block_cloning feature is disabled"
This reverts commit 8ee579abe09ec1fe15c588fc9a08370b83b81cd6.
-rw-r--r-- | sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 2cd1d27e37bc..97429b360a36 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -6243,6 +6243,13 @@ zfs_freebsd_copy_file_range(struct vop_copy_file_range_args *ap) int error; uint64_t len = *ap->a_lenp; + /* + * TODO: If offset/length is not aligned to recordsize, use + * vn_generic_copy_file_range() on this fragment. + * It would be better to do this after we lock the vnodes, but then we + * need something else than vn_generic_copy_file_range(). + */ + /* Lock both vnodes, avoiding risk of deadlock. */ do { mp = NULL; @@ -6293,16 +6300,6 @@ unlock: if (mp != NULL) vn_finished_write(mp); - /* - * Fall back if block_cloning feature is disabled - * or other EXDEV failures from zfs_vnops.c - */ - if (error == EXDEV) { - error = vn_generic_copy_file_range(ap->a_invp, ap->a_inoffp, - ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, - ap->a_incred, ap->a_outcred, ap->a_fsizetd); - } - return (error); } |