Fix efi_get_info() zvol detection
Partition detection for zvol devices was not working correctly resulting inconsistent partitioning behavior when layering pools on top of zvols. This isn't a supported configuration but we'd still like it to work properly. Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7624
This commit is contained in:
parent
ab24877bd3
commit
232dd8b956
|
@ -278,8 +278,9 @@ efi_get_info(int fd, struct dk_cinfo *dki_info)
|
||||||
} else if ((strncmp(dev_path, "/dev/zd", 7) == 0)) {
|
} else if ((strncmp(dev_path, "/dev/zd", 7) == 0)) {
|
||||||
strcpy(dki_info->dki_cname, "zd");
|
strcpy(dki_info->dki_cname, "zd");
|
||||||
dki_info->dki_ctype = DKC_MD;
|
dki_info->dki_ctype = DKC_MD;
|
||||||
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
|
strcpy(dki_info->dki_dname, "zd");
|
||||||
dki_info->dki_dname,
|
rval = sscanf(dev_path, "/dev/zd%[0-9]p%hu",
|
||||||
|
dki_info->dki_dname + 2,
|
||||||
&dki_info->dki_partition);
|
&dki_info->dki_partition);
|
||||||
} else if ((strncmp(dev_path, "/dev/dm-", 8) == 0)) {
|
} else if ((strncmp(dev_path, "/dev/dm-", 8) == 0)) {
|
||||||
strcpy(dki_info->dki_cname, "pseudo");
|
strcpy(dki_info->dki_cname, "pseudo");
|
||||||
|
|
Loading…
Reference in New Issue