mirror of
				https://git.proxmox.com/git/mirror_zfs
				synced 2025-11-04 14:26:57 +00:00 
			
		
		
		
	As of the 4.13 kernel filemap_range_has_page() can be used to check if there is a page mapped in a given file range. When available this interface should be used which eliminates the need for the zp->z_is_mapped boolean. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #14493
		
			
				
	
	
		
			27 lines
		
	
	
		
			660 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			660 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
dnl #
 | 
						|
dnl # filemap_range_has_page was not available till 4.13
 | 
						|
dnl #
 | 
						|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILEMAP], [
 | 
						|
	ZFS_LINUX_TEST_SRC([filemap_range_has_page], [
 | 
						|
		#include <linux/fs.h>
 | 
						|
	],[
 | 
						|
		struct address_space *mapping = NULL;
 | 
						|
		loff_t lstart = 0;
 | 
						|
		loff_t lend = 0;
 | 
						|
		bool ret __attribute__ ((unused));
 | 
						|
 | 
						|
		ret = filemap_range_has_page(mapping, lstart, lend);
 | 
						|
	])
 | 
						|
])
 | 
						|
 | 
						|
AC_DEFUN([ZFS_AC_KERNEL_FILEMAP], [
 | 
						|
	AC_MSG_CHECKING([whether filemap_range_has_page() is available])
 | 
						|
	ZFS_LINUX_TEST_RESULT([filemap_range_has_page], [
 | 
						|
		AC_MSG_RESULT(yes)
 | 
						|
		AC_DEFINE(HAVE_FILEMAP_RANGE_HAS_PAGE, 1,
 | 
						|
		[filemap_range_has_page() is available])
 | 
						|
	],[
 | 
						|
		AC_MSG_RESULT(no)
 | 
						|
	])
 | 
						|
])
 |