WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen: warn if block device major is not xvd's major

To: jeremy@xxxxxxxx
Subject: [Xen-devel] [PATCH] xen: warn if block device major is not xvd's major
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 24 Mar 2009 17:44:15 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 24 Mar 2009 10:45:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/block/xen-blkfront.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 8f90508..6c2a79f 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -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 {
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen: warn if block device major is not xvd's major, Ian Campbell <=