mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	tunables: use Linux ullong param ops for u64
Since 3.17 Linux has provided param ops for 64-bit ints, so we don't need to use our own anymore. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Pavel Snajdr <snajpa@snajpa.net> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #17377
This commit is contained in:
		
							parent
							
								
									6e7e7ea7ef
								
							
						
					
					
						commit
						589d99171f
					
				| @ -107,16 +107,16 @@ enum scope_prefix_types { | ||||
| #define	spl_param_ops_ulong param_ops_ulong | ||||
| #define	spl_param_ops_ULONG param_ops_ulong | ||||
| 
 | ||||
| #define	spl_param_set_u64 param_set_ullong | ||||
| #define	spl_param_get_u64 param_get_ullong | ||||
| #define	spl_param_ops_u64 param_ops_ullong | ||||
| #define	spl_param_ops_U64 param_ops_ullong | ||||
| 
 | ||||
| #define	spl_param_set_charp param_set_charp | ||||
| #define	spl_param_get_charp param_get_charp | ||||
| #define	spl_param_ops_charp param_ops_charp | ||||
| #define	spl_param_ops_STRING param_ops_charp | ||||
| 
 | ||||
| extern int spl_param_set_u64(const char *val, zfs_kernel_param_t *kp); | ||||
| extern int spl_param_get_u64(char *buffer, zfs_kernel_param_t *kp); | ||||
| extern const struct kernel_param_ops spl_param_ops_u64; | ||||
| #define	spl_param_ops_U64 spl_param_ops_u64 | ||||
| 
 | ||||
| /*
 | ||||
|  * Declare a module parameter / sysctl node | ||||
|  * | ||||
|  | ||||
| @ -555,28 +555,6 @@ ddi_copyin(const void *from, void *to, size_t len, int flags) | ||||
| } | ||||
| EXPORT_SYMBOL(ddi_copyin); | ||||
| 
 | ||||
| #define	define_spl_param(type, fmt)					\ | ||||
| int									\ | ||||
| spl_param_get_##type(char *buf, zfs_kernel_param_t *kp)			\ | ||||
| {									\ | ||||
| 	return (scnprintf(buf, PAGE_SIZE, fmt "\n",			\ | ||||
| 	    *(type *)kp->arg));						\ | ||||
| }									\ | ||||
| int									\ | ||||
| spl_param_set_##type(const char *buf, zfs_kernel_param_t *kp)		\ | ||||
| {									\ | ||||
| 	return (kstrto##type(buf, 0, (type *)kp->arg));			\ | ||||
| }									\ | ||||
| const struct kernel_param_ops spl_param_ops_##type = {			\ | ||||
| 	.set = spl_param_set_##type,					\ | ||||
| 	.get = spl_param_get_##type,					\ | ||||
| };									\ | ||||
| EXPORT_SYMBOL(spl_param_get_##type);					\ | ||||
| EXPORT_SYMBOL(spl_param_set_##type);					\ | ||||
| EXPORT_SYMBOL(spl_param_ops_##type); | ||||
| 
 | ||||
| define_spl_param(u64, "%llu") | ||||
| 
 | ||||
| /*
 | ||||
|  * Post a uevent to userspace whenever a new vdev adds to the pool. It is | ||||
|  * necessary to sync blkid information with udev, which zed daemon uses | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rob Norris
						Rob Norris