mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	vdev: skip faulting disks pending removal
This patch fixes a race where vdev_remove_wanted may be set after probe initiation, which could otherwise trigger redundant fault and removal. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #17400
This commit is contained in:
		
							parent
							
								
									bda0bc6304
								
							
						
					
					
						commit
						f292b0f146
					
				@ -1760,8 +1760,11 @@ vdev_probe_done(zio_t *zio)
 | 
				
			|||||||
			 * change the state in a spa_async_request. Probes that
 | 
								 * change the state in a spa_async_request. Probes that
 | 
				
			||||||
			 * were initiated from a vdev_open can change the state
 | 
								 * were initiated from a vdev_open can change the state
 | 
				
			||||||
			 * as part of the open call.
 | 
								 * as part of the open call.
 | 
				
			||||||
 | 
								 * Skip fault injection if this vdev is already removed
 | 
				
			||||||
 | 
								 * or a removal is pending.
 | 
				
			||||||
			 */
 | 
								 */
 | 
				
			||||||
			if (vps->vps_zio_done_probe) {
 | 
								if (vps->vps_zio_done_probe &&
 | 
				
			||||||
 | 
								    !vd->vdev_remove_wanted && !vd->vdev_removed) {
 | 
				
			||||||
				vd->vdev_fault_wanted = B_TRUE;
 | 
									vd->vdev_fault_wanted = B_TRUE;
 | 
				
			||||||
				spa_async_request(spa, SPA_ASYNC_FAULT_VDEV);
 | 
									spa_async_request(spa, SPA_ASYNC_FAULT_VDEV);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user