qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-2.9 0/1] Block patches
@ 2017-03-28 10:07 Stefan Hajnoczi
  2017-03-28 10:07 ` [Qemu-devel] [PULL for-2.9 1/1] parallels: wrong call to bdrv_truncate Stefan Hajnoczi
  2017-03-28 10:41 ` [Qemu-devel] [PULL for-2.9 0/1] Block patches Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-03-28 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit eb06c9e2d3c8f026a206e8402b0ffa201060ec8e:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-03-27 17:34:50 +0100)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to dc62da88b5d17477227a3563a6ad466129d416d6:

  parallels: wrong call to bdrv_truncate (2017-03-28 11:06:00 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Denis V. Lunev (1):
  parallels: wrong call to bdrv_truncate

 block/parallels.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL for-2.9 1/1] parallels: wrong call to bdrv_truncate
  2017-03-28 10:07 [Qemu-devel] [PULL for-2.9 0/1] Block patches Stefan Hajnoczi
@ 2017-03-28 10:07 ` Stefan Hajnoczi
  2017-03-28 10:41 ` [Qemu-devel] [PULL for-2.9 0/1] Block patches Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-03-28 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Denis V. Lunev, Stefan Hajnoczi

From: "Denis V. Lunev" <den@openvz.org>

Parallels driver should not call bdrv_truncate if the image was opened
in the read-only mode. Without the patch
    qemu-img check harddisk.hds
asserts with
    bdrv_truncate: Assertion `child->perm & BLK_PERM_RESIZE' failed.

Parameters used on the write path are not needed if the image is opened
in the read-only mode.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reported-by: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
Message-id: 1490625488-7980-1-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 block/parallels.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/parallels.c b/block/parallels.c
index 6bf9375..4173b3f 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -687,7 +687,8 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
     if (local_err != NULL) {
         goto fail_options;
     }
-    if (!bdrv_has_zero_init(bs->file->bs) ||
+
+    if (!(flags & BDRV_O_RESIZE) || !bdrv_has_zero_init(bs->file->bs) ||
             bdrv_truncate(bs->file, bdrv_getlength(bs->file->bs)) != 0) {
         s->prealloc_mode = PRL_PREALLOC_MODE_FALLOCATE;
     }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL for-2.9 0/1] Block patches
  2017-03-28 10:07 [Qemu-devel] [PULL for-2.9 0/1] Block patches Stefan Hajnoczi
  2017-03-28 10:07 ` [Qemu-devel] [PULL for-2.9 1/1] parallels: wrong call to bdrv_truncate Stefan Hajnoczi
@ 2017-03-28 10:41 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-03-28 10:41 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 28 March 2017 at 11:07, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit eb06c9e2d3c8f026a206e8402b0ffa201060ec8e:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-03-27 17:34:50 +0100)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to dc62da88b5d17477227a3563a6ad466129d416d6:
>
>   parallels: wrong call to bdrv_truncate (2017-03-28 11:06:00 +0100)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
>
> Denis V. Lunev (1):
>   parallels: wrong call to bdrv_truncate
>
>  block/parallels.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-28 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 10:07 [Qemu-devel] [PULL for-2.9 0/1] Block patches Stefan Hajnoczi
2017-03-28 10:07 ` [Qemu-devel] [PULL for-2.9 1/1] parallels: wrong call to bdrv_truncate Stefan Hajnoczi
2017-03-28 10:41 ` [Qemu-devel] [PULL for-2.9 0/1] Block patches Peter Maydell

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).