All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@suse.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tapdisk: Fix qcow2 for images > 2 GB
Date: Fri, 27 Jun 2008 14:07:13 +0200	[thread overview]
Message-ID: <4864D7F1.4050708@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 80 bytes --]

tapdisk: Fix qcow2 for images > 2 GB

Signed-off-by: Kevin Wolf <kwolf@suse.de>

[-- Attachment #2: 1xxxx-qcow2-2gb-bug.patch --]
[-- Type: text/x-patch, Size: 591 bytes --]

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;
 	}

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2008-06-27 12:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4864D7F1.4050708@suse.de \
    --to=kwolf@suse.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.