mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	tunables: don't assert initialisation in impl getters
It actually doesn't matter if it's not initialised when we first query the current value; it just returns empty-string. A crash is quite obnoxious even if it is a rare case. 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
							
								
									8317244270
								
							
						
					
					
						commit
						cc5724f38d
					
				| @ -420,8 +420,6 @@ icp_aes_impl_get(char *buffer, zfs_kernel_param_t *kp) | |||||||
| 	char *fmt; | 	char *fmt; | ||||||
| 	const uint32_t impl = AES_IMPL_READ(icp_aes_impl); | 	const uint32_t impl = AES_IMPL_READ(icp_aes_impl); | ||||||
| 
 | 
 | ||||||
| 	ASSERT(aes_impl_initialized); |  | ||||||
| 
 |  | ||||||
| 	/* list mandatory options */ | 	/* list mandatory options */ | ||||||
| 	for (i = 0; i < ARRAY_SIZE(aes_impl_opts); i++) { | 	for (i = 0; i < ARRAY_SIZE(aes_impl_opts); i++) { | ||||||
| 		fmt = (impl == aes_impl_opts[i].sel) ? "[%s] " : "%s "; | 		fmt = (impl == aes_impl_opts[i].sel) ? "[%s] " : "%s "; | ||||||
|  | |||||||
| @ -948,8 +948,6 @@ icp_gcm_impl_get(char *buffer, zfs_kernel_param_t *kp) | |||||||
| 	char *fmt; | 	char *fmt; | ||||||
| 	const uint32_t impl = GCM_IMPL_READ(icp_gcm_impl); | 	const uint32_t impl = GCM_IMPL_READ(icp_gcm_impl); | ||||||
| 
 | 
 | ||||||
| 	ASSERT(gcm_impl_initialized); |  | ||||||
| 
 |  | ||||||
| 	/* list mandatory options */ | 	/* list mandatory options */ | ||||||
| 	for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) { | 	for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) { | ||||||
| #ifdef CAN_USE_GCM_ASM | #ifdef CAN_USE_GCM_ASM | ||||||
|  | |||||||
| @ -643,8 +643,6 @@ vdev_raidz_impl_get(char *buffer, size_t size) | |||||||
| 	char *fmt; | 	char *fmt; | ||||||
| 	const uint32_t impl = RAIDZ_IMPL_READ(zfs_vdev_raidz_impl); | 	const uint32_t impl = RAIDZ_IMPL_READ(zfs_vdev_raidz_impl); | ||||||
| 
 | 
 | ||||||
| 	ASSERT(raidz_math_initialized); |  | ||||||
| 
 |  | ||||||
| 	/* list mandatory options */ | 	/* list mandatory options */ | ||||||
| 	for (i = 0; i < ARRAY_SIZE(math_impl_opts) - 2; i++) { | 	for (i = 0; i < ARRAY_SIZE(math_impl_opts) - 2; i++) { | ||||||
| 		fmt = (impl == math_impl_opts[i].sel) ? "[%s] " : "%s "; | 		fmt = (impl == math_impl_opts[i].sel) ? "[%s] " : "%s "; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rob Norris
						Rob Norris