qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Failing iotests in v2.3.0-rc2 / master
Date: Wed, 15 Apr 2015 00:53:30 -0400	[thread overview]
Message-ID: <20150415045229.GA2952@localhost.localdomain> (raw)
In-Reply-To: <20150414095735.GC4824@noname.redhat.com>

On Tue, Apr 14, 2015 at 11:57:35AM +0200, Kevin Wolf wrote:
> Am 11.04.2015 um 05:41 hat Andreas Färber geschrieben:
> > Hi,
> > 
> > 001 seems to hang for -qcow (or is not reasonably "quick": >5 min).
> > 
> > 033 is failing for -vhdx.
> > 
> > (Note that `make check-block` only tests -qcow2, so didn't uncover
> > either of them.)
> > 
> > Given a failing test, am I seeing correctly that there is no command
> > line option to skip this one failing test? -x seems to be for groups only.
> > 
> > Regards,
> > Andreas
> > 
> > $ ./check -v -T -qcow -g quick
> > [...]
> > 001 6s ...        [05:12:39]
> 
> qcow1 is just really slow. 001 passes for me, after 202 seconds (that's
> on my SSD, YMMV).
> 
> > $ ./check -v -T -vhdx -g quick
> > [...]
> > 033 1s ...        [04:06:09] [04:06:11] - output mismatch (see 033.out.bad)
> 
> This seems to be because blkdebug doesn't implement .bdrv_truncate.
> Currently the test case isn't suitable for VHDX, which uses explicit
> bdrv_truncate() calls to grow the image file. I'll send a patch for
> blkdebug to allow this.
> 
> However, it seems that there is another problem which causes assertion
> failures when using VHDX over blkdebug. Jeff, does the following fix
> make sense to you? (I think it does, but I don't understand yet why the
> assertion failure is only triggered with blkdebug - or in other words:
> "how could this ever work?")
> 
> Kevin

Kevin,

Yes, looking at that fix it makes sense - we are wanting to pad the
back part of the block after the actual data with zeros. That back
length should be (block size - (bytes avail + block offset)), which is
iov2.iov_len.

There are two reasons I think we haven't seen this issue (it has been
hidden):

1.) If bs->file supports zero init, we don't do any of this

2.) This is done for the case when the existing BAT state is
PAYLOAD_BLOCK_ZERO.  Until recently (commit 30af51c), we didn't
create VHDX files with blocks in the PAYLOAD_BLOCK_ZERO state.

So it has been a latent bug in a hitherto rarely (if ever) exercised
path.

Jeff
> 
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -1285,7 +1285,7 @@ static coroutine_fn int vhdx_co_writev(BlockDriverState *bs, int64_t sector_num,
>                          iov2.iov_base = qemu_blockalign(bs, iov2.iov_len);
>                          memset(iov2.iov_base, 0, iov2.iov_len);
>                          qemu_iovec_concat_iov(&hd_qiov, &iov2, 1, 0,
> -                                              sinfo.block_offset);
> +                                              iov2.iov_len);
>                          sectors_to_write += iov2.iov_len >> BDRV_SECTOR_BITS;
>                      }
>                  }

  reply	other threads:[~2015-04-15  6:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11  3:41 [Qemu-devel] Failing iotests in v2.3.0-rc2 / master Andreas Färber
2015-04-11 14:33 ` Andreas Färber
2015-04-13 16:42   ` Paolo Bonzini
2015-04-13 15:29 ` John Snow
2015-04-13 17:03   ` Andreas Färber
2015-04-14  9:57 ` Kevin Wolf
2015-04-15  4:53   ` Jeff Cody [this message]
2015-04-15  9:26     ` Kevin Wolf
2015-04-15  9:34       ` Andreas Färber
2015-04-15  9:47         ` Kevin Wolf
2015-04-15  9:54           ` Andreas Färber
2015-04-15 11:27   ` 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=20150415045229.GA2952@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=afaerber@suse.de \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 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).