From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] blkdebug: Add bdrv_truncate()
Date: Wed, 15 Apr 2015 07:35:55 -0400 [thread overview]
Message-ID: <20150415113555.GD2952@localhost.localdomain> (raw)
In-Reply-To: <1429090046-6359-2-git-send-email-kwolf@redhat.com>
On Wed, Apr 15, 2015 at 11:27:25AM +0200, Kevin Wolf wrote:
> This is, amongst others, required for qemu-iotests 033 to run as
> intended on VHDX, which uses explicit bdrv_truncate() calls to bs->file
> when allocating new blocks.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/blkdebug.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/block/blkdebug.c b/block/blkdebug.c
> index 63611e0..3c30edb 100644
> --- a/block/blkdebug.c
> +++ b/block/blkdebug.c
> @@ -721,6 +721,11 @@ static int64_t blkdebug_getlength(BlockDriverState *bs)
> return bdrv_getlength(bs->file);
> }
>
> +static int blkdebug_truncate(BlockDriverState *bs, int64_t offset)
> +{
> + return bdrv_truncate(bs->file, offset);
> +}
> +
> static void blkdebug_refresh_filename(BlockDriverState *bs)
> {
> QDict *opts;
> @@ -779,6 +784,7 @@ static BlockDriver bdrv_blkdebug = {
> .bdrv_file_open = blkdebug_open,
> .bdrv_close = blkdebug_close,
> .bdrv_getlength = blkdebug_getlength,
> + .bdrv_truncate = blkdebug_truncate,
> .bdrv_refresh_filename = blkdebug_refresh_filename,
>
> .bdrv_aio_readv = blkdebug_aio_readv,
> --
> 1.8.3.1
>
Reviewed-by: Jeff Cody <jcody@redhat.com>
next prev parent reply other threads:[~2015-04-15 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 9:27 [Qemu-devel] [PATCH 0/2] Fix VHDX qemu-iotests 033 failure Kevin Wolf
2015-04-15 9:27 ` [Qemu-devel] [PATCH 1/2] blkdebug: Add bdrv_truncate() Kevin Wolf
2015-04-15 11:35 ` Jeff Cody [this message]
2015-04-15 9:27 ` [Qemu-devel] [PATCH 2/2] vhdx: Fix zero-fill iov length Kevin Wolf
2015-04-15 11:32 ` Jeff Cody
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=20150415113555.GD2952@localhost.localdomain \
--to=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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.