summaryrefslogtreecommitdiff
path: root/usr/src/cmd/devfsadm
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-02-05 12:52:20 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-02-05 12:52:20 +0000
commit798215342b98076fa2a26da2dba1176b2ce84532 (patch)
tree9d3ddf75e626af66698aa232e6014acd173cb270 /usr/src/cmd/devfsadm
parentc2b3384ab980f79434b1d242b258a21f91416126 (diff)
parentc73799dd86c25c27f5183e83584212d06d1ecebc (diff)
downloadillumos-joyent-798215342b98076fa2a26da2dba1176b2ce84532.tar.gz
[illumos-gate merge]
commit c73799dd86c25c27f5183e83584212d06d1ecebc 9024 rework PV-HVM disk device handling commit fcebcf2bde9c499fa119ba1d185c1d9dd8db8c31 9023 port Delphix Xen-related fixes commit ff074caab09347cf7a3028cad320325b14d826ce 9006 parallel loader builds fail sporadically commit 0f554fe53a6056402dbaf025d945afa8659af0c7 9001 cdm is useless, remove it 9002 webrev should know how to get the git user name commit a96858a0ffbb0a37a4c126a6889a50342c8e0ac5 9013 cmd/vi: don't use obsolete REG_WORDS commit 925beec7a40f23f8a7663cf5e8289a88f9688e87 9012 cmd/grep: don't use obsolete REG_ANCHOR commit 16b8cff5614360cedee81496774b4933d65c2a62 9007 import AT&T regex test suite commit b4509b050d50104aa22638bf66c219627cf301af 6690 set_nfsv4_ephemeral_mount_to() tries to read AUTOMOUNT_TIMEOUT from defunct /etc/default/autofs commit 8baf4f951af3e9e291859c8e5cb2ea4a83c6a531 9015 krb5-config emits unnecessary -R flags 1295 krb5-config only understands krb5 Conflicts: usr/src/tools/scripts/webrev.sh usr/src/tools/onbld/hgext/__init__.py (deleted)
Diffstat (limited to 'usr/src/cmd/devfsadm')
-rw-r--r--usr/src/cmd/devfsadm/disk_link.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/src/cmd/devfsadm/disk_link.c b/usr/src/cmd/devfsadm/disk_link.c
index c68cba8bea..ade81417c6 100644
--- a/usr/src/cmd/devfsadm/disk_link.c
+++ b/usr/src/cmd/devfsadm/disk_link.c
@@ -18,9 +18,10 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2016 Toomas Soome <tsoome@me.com>
- * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2017 Nexenta Systems, Inc.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -391,7 +392,7 @@ disk_callback_sas(di_minor_t minor, di_node_t node)
/*
* xVM virtual block device
*
- * Xen passes device number in next format:
+ * Xen passes device number in the following format:
*
* 1 << 28 | disk << 8 | partition xvd, disks or partitions 16 onwards
* 202 << 8 | disk << 4 | partition xvd, disks and partitions up to 15
@@ -401,14 +402,14 @@ disk_callback_sas(di_minor_t minor, di_node_t node)
* 2 << 28 onwards reserved for future use
* other values less than 1 << 28 deprecated / reserved
*
- * The corresponding Solaris /dev/dsk name can be:
+ * The corresponding /dev/dsk name can be:
*
- * c0tYdXsN
+ * c0tYdX
*
* where Y,X >= 0.
*
* For PV guests using the legacy naming (0, 1, 2, ...)
- * the Solaris disk names created will be c0d[0..767]sN
+ * the disk names created will be c0d[0..767].
*/
#define HD_BASE (3 << 8)
@@ -450,11 +451,11 @@ decode_xen_device(uint_t device, uint_t *disk, uint_t *plun)
lun = device & 0xf;
break;
case 3: /* hd, disk 0..1 */
- dsk = device & (~0x3f);
+ dsk = (device >> 6) & 0x1;
lun = device & 0x3f;
break;
case 22: /* hd, disk 2..3 */
- dsk = device & (~0x3f);
+ dsk = ((device >> 6) & 0x1) + 2;
lun = device & 0x3f;
break;
default:
@@ -493,7 +494,6 @@ disk_callback_xvmd(di_minor_t minor, di_node_t node)
}
disk_common(minor, node, disk, 0);
return (DEVFSADM_CONTINUE);
-
}
/*