mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	config: remove HAVE_VFS_COPY_FILE_RANGE
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
		
							parent
							
								
									0d53034f91
								
							
						
					
					
						commit
						b5a21883bf
					
				@ -19,36 +19,6 @@ dnl #
 | 
			
		||||
dnl # 6.8: generic_copy_file_range() removed, replaced by
 | 
			
		||||
dnl #      splice_copy_file_range()
 | 
			
		||||
dnl #
 | 
			
		||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_COPY_FILE_RANGE], [
 | 
			
		||||
	ZFS_LINUX_TEST_SRC([vfs_copy_file_range], [
 | 
			
		||||
		#include <linux/fs.h>
 | 
			
		||||
 | 
			
		||||
		static ssize_t test_copy_file_range(struct file *src_file,
 | 
			
		||||
		    loff_t src_off, struct file *dst_file, loff_t dst_off,
 | 
			
		||||
		    size_t len, unsigned int flags) {
 | 
			
		||||
			(void) src_file; (void) src_off;
 | 
			
		||||
			(void) dst_file; (void) dst_off;
 | 
			
		||||
			(void) len; (void) flags;
 | 
			
		||||
			return (0);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		static const struct file_operations
 | 
			
		||||
		    fops __attribute__ ((unused)) = {
 | 
			
		||||
			.copy_file_range	= test_copy_file_range,
 | 
			
		||||
		};
 | 
			
		||||
	],[])
 | 
			
		||||
])
 | 
			
		||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_COPY_FILE_RANGE], [
 | 
			
		||||
	AC_MSG_CHECKING([whether fops->copy_file_range() is available])
 | 
			
		||||
	ZFS_LINUX_TEST_RESULT([vfs_copy_file_range], [
 | 
			
		||||
		AC_MSG_RESULT([yes])
 | 
			
		||||
		AC_DEFINE(HAVE_VFS_COPY_FILE_RANGE, 1,
 | 
			
		||||
		    [fops->copy_file_range() is available])
 | 
			
		||||
	],[
 | 
			
		||||
		AC_MSG_RESULT([no])
 | 
			
		||||
	])
 | 
			
		||||
])
 | 
			
		||||
 | 
			
		||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE], [
 | 
			
		||||
	ZFS_LINUX_TEST_SRC([generic_copy_file_range], [
 | 
			
		||||
		#include <linux/fs.h>
 | 
			
		||||
 | 
			
		||||
@ -96,7 +96,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_READPAGES
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_SPLICE_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_SRC_VFS_REMAP_FILE_RANGE
 | 
			
		||||
@ -223,7 +222,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_READPAGES
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_IOV_ITER
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_SPLICE_COPY_FILE_RANGE
 | 
			
		||||
	ZFS_AC_KERNEL_VFS_REMAP_FILE_RANGE
 | 
			
		||||
 | 
			
		||||
@ -1146,9 +1146,7 @@ const struct file_operations zpl_file_operations = {
 | 
			
		||||
	.aio_fsync	= zpl_aio_fsync,
 | 
			
		||||
#endif
 | 
			
		||||
	.fallocate	= zpl_fallocate,
 | 
			
		||||
#ifdef HAVE_VFS_COPY_FILE_RANGE
 | 
			
		||||
	.copy_file_range	= zpl_copy_file_range,
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_VFS_CLONE_FILE_RANGE
 | 
			
		||||
	.clone_file_range	= zpl_clone_file_range,
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -83,7 +83,6 @@ zpl_clone_file_range_impl(struct file *src_file, loff_t src_off,
 | 
			
		||||
	return ((ssize_t)len_o);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_VFS_COPY_FILE_RANGE)
 | 
			
		||||
/*
 | 
			
		||||
 * Entry point for copy_file_range(). Copy len bytes from src_off in src_file
 | 
			
		||||
 * to dst_off in dst_file. We are permitted to do this however we like, so we
 | 
			
		||||
@ -133,7 +132,6 @@ zpl_copy_file_range(struct file *src_file, loff_t src_off,
 | 
			
		||||
 | 
			
		||||
	return (ret);
 | 
			
		||||
}
 | 
			
		||||
#endif /* HAVE_VFS_COPY_FILE_RANGE */
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_VFS_REMAP_FILE_RANGE
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user