mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add a tunable to disable BRT support.
Copy the disable parameter that FreeBSD implemented, and extend it to work on Linux as well, until we're sure this is stable. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #15529
This commit is contained in:
committed by
Tony Hutter
parent
0733fe2aa5
commit
87e9e82865
@@ -89,6 +89,10 @@ int zfs_debug_level;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0,
|
||||
"Debug level");
|
||||
|
||||
int zfs_bclone_enabled = 1;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, bclone_enabled, CTLFLAG_RWTUN,
|
||||
&zfs_bclone_enabled, 0, "Enable block cloning");
|
||||
|
||||
struct zfs_jailparam {
|
||||
int mount_snapshot;
|
||||
};
|
||||
|
||||
@@ -6243,6 +6243,11 @@ zfs_freebsd_copy_file_range(struct vop_copy_file_range_args *ap)
|
||||
int error;
|
||||
uint64_t len = *ap->a_lenp;
|
||||
|
||||
if (!zfs_bclone_enabled) {
|
||||
mp = NULL;
|
||||
goto bad_write_fallback;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: If offset/length is not aligned to recordsize, use
|
||||
* vn_generic_copy_file_range() on this fragment.
|
||||
|
||||
Reference in New Issue
Block a user