mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix Xen Virtual Block Device detection
We fail to make partitions on xvd (Xen Virtual Block) devices. This also causes debug builds of zpool create to return an error when given xen virtual block devices. These devices should be given the same treatment as vd (KVM Virtual Block) devices, so we adjust the relevant code paths. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3576
This commit is contained in:
committed by
Brian Behlendorf
parent
98cb3a7655
commit
541da9935d
@@ -204,6 +204,12 @@ efi_get_info(int fd, struct dk_cinfo *dki_info)
|
||||
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
|
||||
dki_info->dki_dname,
|
||||
&dki_info->dki_partition);
|
||||
} else if ((strncmp(dev_path, "/dev/xvd", 8) == 0)) {
|
||||
strcpy(dki_info->dki_cname, "xvd");
|
||||
dki_info->dki_ctype = DKC_MD;
|
||||
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
|
||||
dki_info->dki_dname,
|
||||
&dki_info->dki_partition);
|
||||
} else if ((strncmp(dev_path, "/dev/dm-", 8) == 0)) {
|
||||
strcpy(dki_info->dki_cname, "pseudo");
|
||||
dki_info->dki_ctype = DKC_VBD;
|
||||
|
||||
Reference in New Issue
Block a user