From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-io: Fix discard command
Date: Fri, 28 Jan 2011 09:56:45 +0000 [thread overview]
Message-ID: <20110128095645.GA3082@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1296131772-9880-1-git-send-email-kwolf@redhat.com>
On Thu, Jan 27, 2011 at 01:36:12PM +0100, Kevin Wolf wrote:
> qemu-io passed bytes where it's supposed to pass sectors, so discard requests
> were off.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> qemu-io.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/qemu-io.c b/qemu-io.c
> index 5b24c5e..4470e49 100644
> --- a/qemu-io.c
> +++ b/qemu-io.c
> @@ -1465,7 +1465,7 @@ discard_f(int argc, char **argv)
> }
>
> gettimeofday(&t1, NULL);
> - ret = bdrv_discard(bs, offset, count);
> + ret = bdrv_discard(bs, offset >> BDRV_SECTOR_BITS, count >> BDRV_SECTOR_BITS);
Oops, thanks for the fix.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
prev parent reply other threads:[~2011-01-28 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 12:36 [Qemu-devel] [PATCH] qemu-io: Fix discard command Kevin Wolf
2011-01-28 9:56 ` Stefan Hajnoczi [this message]
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=20110128095645.GA3082@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).