mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	zvol_wait logic may terminate prematurely
Setups that have a lot of zvols may see zvol_wait terminate prematurely even though the script is still making progress. For example, we have a customer that called zvol_wait for ~7100 zvols and by the last iteration of that script it was still waiting on ~2900. Similarly another one called zvol_wait for 2200 and by the time the script terminated there were only 50 left. This patch adjusts the logic to stay within the outer loop of the script if we are making any progress whatsoever. Reviewed-by: George Wilson <gwilson@delphix.com> Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Don Brady <don.brady@delphix.com> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #13998
This commit is contained in:
		
							parent
							
								
									820edcbf91
								
							
						
					
					
						commit
						25096e1180
					
				| @ -109,6 +109,13 @@ while [ "$outer_loop" -lt 20 ]; do | |||||||
| 			exit 0 | 			exit 0 | ||||||
| 		fi | 		fi | ||||||
| 	fi | 	fi | ||||||
|  | 
 | ||||||
|  | 	# | ||||||
|  | 	# zvol_count made some progress - let's stay in this loop. | ||||||
|  | 	# | ||||||
|  | 	if [ "$old_zvols_count" -gt "$zvols_count" ]; then | ||||||
|  | 		outer_loop=$((outer_loop - 1)) | ||||||
|  | 	fi | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| echo "Timed out waiting on zvol links" | echo "Timed out waiting on zvol links" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Serapheim Dimitropoulos
						Serapheim Dimitropoulos