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-changelog

[Xen-changelog] [xen-unstable] [BLK] Handle block devices with more than

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BLK] Handle block devices with more than 2^32 sectors.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Nov 2006 12:00:59 +0000
Delivery-date: Tue, 21 Nov 2006 04:00:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 0c0ef61de06b523fa44f67d97de01def87306e1d
# Parent  82ba3c086e6ca02b4c24f0a0171bd34e1bcc612a
[BLK] Handle block devices with more than 2^32 sectors.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/blkback/common.h    |    2 +-
 linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c       |    2 +-
 linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c    |    2 +-
 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c |    5 +++--
 4 files changed, 6 insertions(+), 5 deletions(-)

diff -r 82ba3c086e6c -r 0c0ef61de06b 
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Tue Nov 21 09:26:43 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Tue Nov 21 10:16:58 
2006 +0000
@@ -113,7 +113,7 @@ int vbd_create(blkif_t *blkif, blkif_vde
               unsigned minor, int readonly);
 void vbd_free(struct vbd *vbd);
 
-unsigned long vbd_size(struct vbd *vbd);
+unsigned long long vbd_size(struct vbd *vbd);
 unsigned int vbd_info(struct vbd *vbd);
 unsigned long vbd_secsize(struct vbd *vbd);
 
diff -r 82ba3c086e6c -r 0c0ef61de06b 
linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c    Tue Nov 21 09:26:43 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c    Tue Nov 21 10:16:58 
2006 +0000
@@ -35,7 +35,7 @@
 #define vbd_sz(_v)   ((_v)->bdev->bd_part ?                            \
        (_v)->bdev->bd_part->nr_sects : (_v)->bdev->bd_disk->capacity)
 
-unsigned long vbd_size(struct vbd *vbd)
+unsigned long long vbd_size(struct vbd *vbd)
 {
        return vbd_sz(vbd);
 }
diff -r 82ba3c086e6c -r 0c0ef61de06b 
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Tue Nov 21 09:26:43 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Tue Nov 21 10:16:58 
2006 +0000
@@ -389,7 +389,7 @@ again:
        if (err)
                goto abort;
 
-       err = xenbus_printf(xbt, dev->nodename, "sectors", "%lu",
+       err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
                            vbd_size(&be->blkif->vbd));
        if (err) {
                xenbus_dev_fatal(dev, err, "writing %s/sectors",
diff -r 82ba3c086e6c -r 0c0ef61de06b 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Tue Nov 21 
09:26:43 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Tue Nov 21 
10:16:58 2006 +0000
@@ -298,7 +298,8 @@ static void backend_changed(struct xenbu
  */
 static void connect(struct blkfront_info *info)
 {
-       unsigned long sectors, sector_size;
+       unsigned long long sectors;
+       unsigned long sector_size;
        unsigned int binfo;
        int err;
 
@@ -309,7 +310,7 @@ static void connect(struct blkfront_info
        DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 
        err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
-                           "sectors", "%lu", &sectors,
+                           "sectors", "%llu", &sectors,
                            "info", "%u", &binfo,
                            "sector-size", "%lu", &sector_size,
                            NULL);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [BLK] Handle block devices with more than 2^32 sectors., Xen patchbot-unstable <=