mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add support for devid and phys_path keys in vdev disk labels
This is foundational work for ZED.
Updates a leaf vdev's persistent device strings on Linux platform
* only applies for a dedicated leaf vdev (aka whole disk)
* updated during pool create|add|attach|import
* used for matching device matching during auto-{online,expand,replace}
* stored in a leaf disk config label (i.e. alongside 'path' NVP)
* can opt-out using env var ZFS_VDEV_DEVID_OPT_OUT=YES
Some examples:
path: '/dev/sdb1'
devid: 'scsi-350000394a8ca4fbc-part1'
phys_path: 'pci-0000:04:00.0-sas-0x50000394a8ca4fbf-lun-0'
path: '/dev/mapper/mpatha'
devid: 'dm-uuid-mpath-35000c5006304de3f'
Signed-off-by: Don Brady <don.brady@intel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2856
Closes #3978
Closes #4416
This commit is contained in:
committed by
Brian Behlendorf
parent
bebd73f2c3
commit
39fc0cb557
@@ -28,82 +28,5 @@
|
||||
#define _LIBSPL_DEVID_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef int ddi_devid_t;
|
||||
|
||||
typedef struct devid_nmlist {
|
||||
char *devname;
|
||||
dev_t dev;
|
||||
} devid_nmlist_t;
|
||||
|
||||
static inline
|
||||
int
|
||||
devid_str_decode(
|
||||
char *devidstr,
|
||||
ddi_devid_t *retdevid,
|
||||
char **retminor_name)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
int
|
||||
devid_deviceid_to_nmlist(
|
||||
char *search_path,
|
||||
ddi_devid_t devid,
|
||||
char *minor_name,
|
||||
devid_nmlist_t **retlist)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
void
|
||||
devid_str_free(char *str)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
void
|
||||
devid_free(ddi_devid_t devid)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
void
|
||||
devid_free_nmlist(devid_nmlist_t *list)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
int
|
||||
devid_get(
|
||||
int fd,
|
||||
ddi_devid_t *retdevid)
|
||||
{
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static inline
|
||||
int
|
||||
devid_get_minor_name(
|
||||
int fd,
|
||||
char **retminor_name)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline
|
||||
char *
|
||||
devid_str_encode(
|
||||
ddi_devid_t devid,
|
||||
char *minor_name)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user