mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Add support for nvme based devids
Adds a devid for nvme devices. This is very similar to how the other 'bus' (scsi|sata|usb) devids are generated. The devid resides in a name/value pair in the leaf vdevs in a zpool config. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #7356
This commit is contained in:
		
							parent
							
								
									ebe443c8ff
								
							
						
					
					
						commit
						3b118f0a34
					
				| @ -21,7 +21,7 @@ | |||||||
| /*
 | /*
 | ||||||
|  * Copyright 2015 Nexenta Systems, Inc. All rights reserved. |  * Copyright 2015 Nexenta Systems, Inc. All rights reserved. | ||||||
|  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | ||||||
|  * Copyright (c) 2012, 2016 by Delphix. All rights reserved. |  * Copyright (c) 2012, 2018 by Delphix. All rights reserved. | ||||||
|  * Copyright 2015 RackTop Systems. |  * Copyright 2015 RackTop Systems. | ||||||
|  * Copyright (c) 2016, Intel Corporation. |  * Copyright (c) 2016, Intel Corporation. | ||||||
|  */ |  */ | ||||||
| @ -142,7 +142,18 @@ zfs_device_get_devid(struct udev_device *dev, char *bufptr, size_t buflen) | |||||||
| 			(void) snprintf(bufptr, buflen, "dm-uuid-%s", dm_uuid); | 			(void) snprintf(bufptr, buflen, "dm-uuid-%s", dm_uuid); | ||||||
| 			return (0); | 			return (0); | ||||||
| 		} | 		} | ||||||
| 		return (ENODATA); | 
 | ||||||
|  | 		/*
 | ||||||
|  | 		 * NVME 'by-id' symlinks are similar to bus case | ||||||
|  | 		 */ | ||||||
|  | 		struct udev_device *parent; | ||||||
|  | 
 | ||||||
|  | 		parent = udev_device_get_parent_with_subsystem_devtype(dev, | ||||||
|  | 		    "nvme", NULL); | ||||||
|  | 		if (parent != NULL) | ||||||
|  | 			bus = "nvme";	/* continue with bus symlink search */ | ||||||
|  | 		else | ||||||
|  | 			return (ENODATA); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Don Brady
						Don Brady