qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7661a8: block/block-copy: always align copied


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7661a8: block/block-copy: always align copied region to cl...
Date: Thu, 20 Aug 2020 01:45:36 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7661a886a17ccf3aff398b124baad9dd95f64bed
      
https://github.com/qemu/qemu/commit/7661a886a17ccf3aff398b124baad9dd95f64bed
  Author: Stefan Reiter <s.reiter@proxmox.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M block/block-copy.c

  Log Message:
  -----------
  block/block-copy: always align copied region to cluster size

Since commit 42ac214406e0 (block/block-copy: refactor task creation)
block_copy_task_create calculates the area to be copied via
bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte
count if the image's last cluster end is not aligned to the bitmap's
granularity.

Always ALIGN_UP the resulting bytes value to satisfy block_copy_do_copy,
which requires the 'bytes' parameter to be aligned to cluster size.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-1-s.reiter@proxmox.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 1f3765b652930a3b485f1a67542c2410c3774abe
      
https://github.com/qemu/qemu/commit/1f3765b652930a3b485f1a67542c2410c3774abe
  Author: Stefan Reiter <s.reiter@proxmox.com>
  Date:   2020-08-11 (Tue, 11 Aug 2020)

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

  Log Message:
  -----------
  iotests: add test for unaligned granularity bitmap backup

Start a VM with a 4097 byte image attached, add a 4096 byte granularity
dirty bitmap, mark it dirty, and then do a backup.

This used to run into an assert and fail, check that it works as
expected and also check the created image to ensure that misaligned
backups in general work correctly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-2-s.reiter@proxmox.com>
[mreitz: Drop bitmap, and do not write past the image's end]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 1d806cef0e38b5db8347a8e12f214d543204a314
      
https://github.com/qemu/qemu/commit/1d806cef0e38b5db8347a8e12f214d543204a314
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M block/block-copy.c
    A tests/qemu-iotests/304
    A tests/qemu-iotests/304.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' 
into staging

Block patches for 5.1.0-rc4:
- Fix abort when running a backup job on an image whose size is not
  aligned to the backup job's cluster size

# gpg: Signature made Tue 11 Aug 2020 10:29:27 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2020-08-11:
  iotests: add test for unaligned granularity bitmap backup
  block/block-copy: always align copied region to cluster size

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/672b2f269589...1d806cef0e38



reply via email to

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