mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	On the first vdev open ignore impossible ashift hints
If on the first open device's logical ashift is bigger than set by pool's ashift property, ignore the last as unusable instead of creating vdev that will fail most of I/Os due to misalignment. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16690
This commit is contained in:
		
							parent
							
								
									2bf1520211
								
							
						
					
					
						commit
						6187b19434
					
				@ -2205,10 +2205,11 @@ vdev_open(vdev_t *vd)
 | 
			
		||||
		vd->vdev_max_asize = max_asize;
 | 
			
		||||
 | 
			
		||||
		/*
 | 
			
		||||
		 * If the vdev_ashift was not overridden at creation time,
 | 
			
		||||
		 * If the vdev_ashift was not overridden at creation time
 | 
			
		||||
		 * (0) or the override value is impossible for the device,
 | 
			
		||||
		 * then set it the logical ashift and optimize the ashift.
 | 
			
		||||
		 */
 | 
			
		||||
		if (vd->vdev_ashift == 0) {
 | 
			
		||||
		if (vd->vdev_ashift < vd->vdev_logical_ashift) {
 | 
			
		||||
			vd->vdev_ashift = vd->vdev_logical_ashift;
 | 
			
		||||
 | 
			
		||||
			if (vd->vdev_logical_ashift > ASHIFT_MAX) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user