Skip to contentSkip to conversation

xen: warn if block device major is not xvd's major

PATCH New Ian Campbell 1 participant 1 message Mar 24, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: warn if block device major is not xvd's major

Old style -xen kernels support taking over the hd and sd major numbers so warn users who reuse old configurations since the minor number mapping of the majors differs, so hdd->xvde which is at least a bit more confusing than xvdd.

---
 drivers/block/xen-blkfront.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/block/xen-blkfront.c +2 -0
index 8f90508..6c2a79f 100644
@@ -406,6 +406,8 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
 	}
 
 	if (!VDEV_IS_EXTENDED(info->vdevice)) {
+		if (BLKIF_MAJOR(info->vdevice) != XENVBD_MAJOR)
+			printk(KERN_INFO "major device != xvd* (202) not supported\n");
 		minor = BLKIF_MINOR(info->vdevice);
 		nr_parts = PARTS_PER_DISK;
 	} else {
Signature · 1 line
1.5.6.5