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] tapdisk: Fix qcow2 for images > 2 GB

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tapdisk: Fix qcow2 for images > 2 GB
From: Kevin Wolf <kwolf@xxxxxxx>
Date: Fri, 27 Jun 2008 14:07:13 +0200
Delivery-date: Fri, 27 Jun 2008 05:10:28 -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
User-agent: Thunderbird 2.0.0.12 (X11/20071114)
tapdisk: Fix qcow2 for images > 2 GB

Signed-off-by: Kevin Wolf <kwolf@xxxxxxx>
Index: xen-3.3.0-testing/tools/blktap/drivers/block-qcow2.c
===================================================================
--- xen-3.3.0-testing.orig/tools/blktap/drivers/block-qcow2.c
+++ xen-3.3.0-testing/tools/blktap/drivers/block-qcow2.c
@@ -254,10 +254,7 @@ static int bdrv_pread(int fd, int64_t of
  */
 static int bdrv_pwrite(int fd, int64_t offset, const void *buf, int count)
 {
-       int ret;
-       
-       ret = lseek(fd, offset, SEEK_SET);
-       if (ret != offset) {
+       if (lseek(fd, offset, SEEK_SET) == -1) {
                DPRINTF("bdrv_pwrite failed seek (%#"PRIx64").\n", offset);
                return -1;
        }
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] tapdisk: Fix qcow2 for images > 2 GB, Kevin Wolf <=