mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	vdev_id: Fix PHY sorting
One of our developers noticed a bug in vdev_id where we were incorrectly sorting PHYs using alphabetical sorting (which usually works) instead of natural sorting (-v). For example: [port-0:0]# ls -d phy* phy-0:10 phy-0:11 phy-0:8 phy-0:9 [port-0:0]# ls -vd phy* phy-0:8 phy-0:9 phy-0:10 phy-0:11 This fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #12699
This commit is contained in:
		
							parent
							
								
									dfbc33a0e5
								
							
						
					
					
						commit
						92fcbe04ba
					
				| @ -375,7 +375,7 @@ sas_handler() { | |||||||
| 		i=$((i + 1)) | 		i=$((i + 1)) | ||||||
| 	done | 	done | ||||||
| 
 | 
 | ||||||
| 	PHY=$(ls -d "$port_dir"/phy* 2>/dev/null | head -1 | awk -F: '{print $NF}') | 	PHY=$(ls -vd "$port_dir"/phy* 2>/dev/null | head -1 | awk -F: '{print $NF}') | ||||||
| 	if [ -z "$PHY" ] ; then | 	if [ -z "$PHY" ] ; then | ||||||
| 		PHY=0 | 		PHY=0 | ||||||
| 	fi | 	fi | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Tony Hutter
						Tony Hutter