qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9c8362: block/mirror: Revive dead yielding co


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 9c8362: block/mirror: Revive dead yielding code
Date: Wed, 20 Apr 2016 09:30:34 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9c83625bdd3c1900d304058ece152040ef5d1ead
      
https://github.com/qemu/qemu/commit/9c83625bdd3c1900d304058ece152040ef5d1ead
  Author: Max Reitz <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Revive dead yielding code

mirror_iteration() is supposed to wait if the current chunk is subject
to a still in-flight mirroring operation. However, it mixed checking
this conflict situation with checking the dirty status of a chunk. A
simplification for the latter condition (the first chunk encountered is
always dirty) led to neglecting the former: We just skip the first chunk
and thus never test whether it conflicts with an in-flight operation.

To fix this, pull out the code which waits for in-flight operations on
the first chunk of the range to be mirrored to settle.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f27a27425901bacc69fb579e1dd8a5878eadd6e9
      
https://github.com/qemu/qemu/commit/f27a27425901bacc69fb579e1dd8a5878eadd6e9
  Author: Max Reitz <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Refresh stale bitmap iterator cache

If the drive's dirty bitmap is dirtied while the mirror operation is
running, the cache of the iterator used by the mirror code may become
stale and not contain all dirty bits.

This only becomes an issue if we are looking for contiguously dirty
chunks on the drive. In that case, we can easily detect the discrepancy
and just refresh the iterator if one occurs.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4150ae60ebf9445d853186c72cf33383710f7360
      
https://github.com/qemu/qemu/commit/4150ae60ebf9445d853186c72cf33383710f7360
  Author: Fam Zheng <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    M block/mirror.c
    M tests/qemu-iotests/109.out

  Log Message:
  -----------
  mirror: Don't extend the last sub-chunk

The last sub-chunk is rounded up to the copy granularity in the target
image, resulting in a larger size than the source.

Add a function to clip the copied sectors to the end.

This undoes the "wrong" changes to tests/qemu-iotests/109.out in
e5b43573e28. The remaining two offset changes are okay.

[ kwolf: Use DIV_ROUND_UP to calculate nb_chunks now ]

Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: 74f69050fe9950c0fa083da0f7a836d9721194cf
      
https://github.com/qemu/qemu/commit/74f69050fe9950c0fa083da0f7a836d9721194cf
  Author: Fam Zheng <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Add iotests.image_size

This retrieves the virtual size of the image out of qemu-img info.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8ca92f3c069558897269e609e4f47bd6255d6339
      
https://github.com/qemu/qemu/commit/8ca92f3c069558897269e609e4f47bd6255d6339
  Author: Fam Zheng <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    A tests/qemu-iotests/152
    A tests/qemu-iotests/152.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: Test case for drive-mirror with unaligned image size

This is the regression test for the virtual size mismatch issue between
target and source images.

[ kwolf: Added test_unaligned_with_update ]

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: befbaf51ced6702170d568b07e2551399223ca3b
      
https://github.com/qemu/qemu/commit/befbaf51ced6702170d568b07e2551399223ca3b
  Author: Peter Maydell <address@hidden>
  Date:   2016-04-20 (Wed, 20 Apr 2016)

  Changed paths:
    M block/mirror.c
    M tests/qemu-iotests/109.out
    A tests/qemu-iotests/152
    A tests/qemu-iotests/152.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Mirror block job fixes for 2.6.0-rc3

# gpg: Signature made Wed 20 Apr 2016 15:56:43 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream:
  iotests: Test case for drive-mirror with unaligned image size
  iotests: Add iotests.image_size
  mirror: Don't extend the last sub-chunk
  block/mirror: Refresh stale bitmap iterator cache
  block/mirror: Revive dead yielding code

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


Compare: https://github.com/qemu/qemu/compare/fa59dd95829b...befbaf51ced6

reply via email to

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