mirror of
				https://git.proxmox.com/git/mirror_zfs
				synced 2025-11-04 03:24:44 +00:00 
			
		
		
		
	In Linux 5.12, the filesystem API was modified to support ipmapped mounts by adding a "struct user_namespace *" parameter to a number functions and VFS handlers. This change adds the needed autoconf macros to detect the new interfaces and updates the code appropriately. This change does not add support for idmapped mounts, instead it preserves the existing behavior by passing the initial user namespace where needed. A subsequent commit will be required to add support for idmapped mounted. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #11712
		
			
				
	
	
		
			29 lines
		
	
	
		
			771 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			771 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
dnl #
 | 
						|
dnl # 5.12 API
 | 
						|
dnl #
 | 
						|
dnl # generic_fillattr in linux/fs.h now requires a struct user_namespace*
 | 
						|
dnl # as the first arg, to support idmapped mounts.
 | 
						|
dnl #
 | 
						|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR_USERNS], [
 | 
						|
	ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
 | 
						|
		#include <linux/fs.h>
 | 
						|
	],[
 | 
						|
		struct user_namespace *userns = NULL;
 | 
						|
		struct inode *in = NULL;
 | 
						|
		struct kstat *k = NULL;
 | 
						|
		generic_fillattr(userns, in, k);
 | 
						|
	])
 | 
						|
])
 | 
						|
 | 
						|
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR_USERNS], [
 | 
						|
	AC_MSG_CHECKING([whether generic_fillattr requres struct user_namespace*])
 | 
						|
	ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
 | 
						|
		AC_MSG_RESULT([yes])
 | 
						|
		AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
 | 
						|
		    [generic_fillattr requires struct user_namespace*])
 | 
						|
	],[
 | 
						|
		AC_MSG_RESULT([no])
 | 
						|
	])
 | 
						|
])
 | 
						|
 |