qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4c0cbd: block/mirror: Sleep periodically duri


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4c0cbd: block/mirror: Sleep periodically during bitmap sca...
Date: Wed, 15 Jul 2015 07:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4c0cbd6fec7db182a6deb52d5a8a8e7b0c5cbe64
      
https://github.com/qemu/qemu/commit/4c0cbd6fec7db182a6deb52d5a8a8e7b0c5cbe64
  Author: Fam Zheng <address@hidden>
  Date:   2015-07-14 (Tue, 14 Jul 2015)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Sleep periodically during bitmap scanning

Before, we only yield after initializing dirty bitmap, where the QMP
command would return. That may take very long, and guest IO will be
blocked.

Add sleep points like the later mirror iterations.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Wen Congyang <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 299bf097375f9d148cda579ad85477304e38856b
      
https://github.com/qemu/qemu/commit/299bf097375f9d148cda579ad85477304e38856b
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-07-14 (Tue, 14 Jul 2015)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: no need to drain in qmp_block_commit

Draining is not necessary, I/O can happen as soon as the
commit coroutine yields.  Draining can be necessary before
reopening the file for read/write, or while modifying the
backing file chain, but that is done separately in
bdrv_reopen_multiple or bdrv_close; this particular
bdrv_drain_all does nothing for that.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 17d9716d7b5381c4b6566bb1a06267d2bfcd1821
      
https://github.com/qemu/qemu/commit/17d9716d7b5381c4b6566bb1a06267d2bfcd1821
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-07-14 (Tue, 14 Jul 2015)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block: keep bitmap if incremental backup job is cancelled

Reclaim the dirty bitmap if an incremental backup block job is
cancelled.  The ret variable may be 0 when the job is cancelled so it's
not enough to check ret < 0.

Reviewed-by: John Snow <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 48ac0a4df84662f23da25262443e1810b70c2228
      
https://github.com/qemu/qemu/commit/48ac0a4df84662f23da25262443e1810b70c2228
  Author: Wen Congyang <address@hidden>
  Date:   2015-07-14 (Tue, 14 Jul 2015)

  Changed paths:
    M block/mirror.c
    M blockdev.c

  Log Message:
  -----------
  mirror: correct buf_size

If bus_size is less than 0, the command fails.
If buf_size is 0, use DEFAULT_MIRROR_BUF_SIZE.
If buf_size % granularity is not 0, mirror_free_init() will
do dangerous things.

Signed-off-by: Wen Congyang <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 796a060bc0fab40953997976a2e30d9d6235bc7b
      
https://github.com/qemu/qemu/commit/796a060bc0fab40953997976a2e30d9d6235bc7b
  Author: Richard W.M. Jones <address@hidden>
  Date:   2015-07-14 (Tue, 14 Jul 2015)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  block/curl: Don't lose original error when a connection fails.

Currently if qemu is connected to a curl source (eg. web server), and
the web server fails / times out / dies, you always see a bogus EIO
"Input/output error".

For example, choose a large file located on any local webserver which
you control:

  $ qemu-img convert -p http://example.com/large.iso /tmp/test

Once it starts copying the file, stop the webserver and you will see
qemu-img fail with:

  qemu-img: error while reading sector 61440: Input/output error

This patch does two things: Firstly print the actual error from curl
so it doesn't get lost.  Secondly, change EIO to EPROTO.  EPROTO is a
POSIX.1 compatible errno which more accurately reflects that there was
a protocol error, rather than some kind of hardware failure.

After this patch is applied, the error changes to:

  $ qemu-img convert -p http://example.com/large.iso /tmp/test
  qemu-img: curl: transfer closed with 469989 bytes remaining to read
  qemu-img: error while reading sector 16384: Protocol error

Signed-off-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 711dc6f36b74fe65a6e5a1847f1152717d887f8a
      
https://github.com/qemu/qemu/commit/711dc6f36b74fe65a6e5a1847f1152717d887f8a
  Author: Peter Maydell <address@hidden>
  Date:   2015-07-15 (Wed, 15 Jul 2015)

  Changed paths:
    M block/backup.c
    M block/curl.c
    M block/mirror.c
    M blockdev.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/cody/tags/jtc-for-upstream-pull-request' into staging

# gpg: Signature made Wed Jul 15 03:25:16 2015 BST using RSA key ID C0DE3057
# gpg: Good signature from "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/jtc-for-upstream-pull-request:
  block/curl: Don't lose original error when a connection fails.
  mirror: correct buf_size
  block: keep bitmap if incremental backup job is cancelled
  blockdev: no need to drain in qmp_block_commit
  block/mirror: Sleep periodically during bitmap scanning

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/f5dec79ee880...711dc6f36b74

reply via email to

[Prev in Thread] Current Thread [Next in Thread]