|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-upstream-unstable] Allow xen guests to plug disks of 1 TiB or more
commit e2155ddd22fe4378030cbbdbbb089a6fa2f3ad44
Author: Felipe Franciosi <felipe.franciosi@xxxxxxxxxx>
AuthorDate: Fri Apr 5 15:47:59 2013 +0000
Commit: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
CommitDate: Fri Apr 5 23:31:53 2013 +0000
Allow xen guests to plug disks of 1 TiB or more
The current xen backend driver implementation uses int64_t variables
to store the size of the corresponding backend disk/file. It also uses
an int64_t variable to store the block size of that image. When writing
the number of sectors (file_size/block_size) to xenstore, however, it
passes these values as 32 bit signed integers. This will cause an
overflow for any disk of 1 TiB or more.
This patch changes the xen backend driver to use a 64 bit integer write
xenstore function.
upstream-commit-id: 9246ce881128df2a69178779c1ef33c83df3c70d
Signed-off-by: Felipe Franciosi <felipe@xxxxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
hw/xen_disk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 668cb54..f484404 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -826,8 +826,8 @@ static int blk_connect(struct XenDevice *xendev)
/* Fill in number of sector size and number of sectors */
xenstore_write_be_int(&blkdev->xendev, "sector-size", blkdev->file_blk);
- xenstore_write_be_int(&blkdev->xendev, "sectors",
- blkdev->file_size / blkdev->file_blk);
+ xenstore_write_be_int64(&blkdev->xendev, "sectors",
+ blkdev->file_size / blkdev->file_blk);
if (xenstore_read_fe_int(&blkdev->xendev, "ring-ref", &blkdev->ring_ref)
== -1) {
return -1;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |