qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] cfdca2: iotests: handle tmpfs


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] cfdca2: iotests: handle tmpfs
Date: Fri, 08 May 2020 08:15:33 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cfdca2b9f9d4ca26bb2b2dfe8de3149092e39170
      
https://github.com/qemu/qemu/commit/cfdca2b9f9d4ca26bb2b2dfe8de3149092e39170
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/091
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  iotests: handle tmpfs

Some tests requires O_DIRECT, or want it by default. Introduce smarter
O_DIRECT handling:

- Check O_DIRECT in common.rc, if it is requested by selected
cache-mode.

- Support second fall-through argument in _default_cache_mode

Inspired-by: Max's 23e1d054112cec1e
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f03a8c73354f9f52364c528c3bdb4c42f08082e4
      
https://github.com/qemu/qemu/commit/f03a8c73354f9f52364c528c3bdb4c42f08082e4
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/082

  Log Message:
  -----------
  iotests/082: require bochs

Test fails if bochs not whitelisted, so, skip it in this case.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 50bb041a3d0c611de38e1afbd8a6ac58e096da55
      
https://github.com/qemu/qemu/commit/50bb041a3d0c611de38e1afbd8a6ac58e096da55
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/148

  Log Message:
  -----------
  iotests/148: use skip_if_unsupported

Skip test-case with quorum if quorum is not whitelisted.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4b4083d53f7b6da14a96eee2636fff2d1b197649
      
https://github.com/qemu/qemu/commit/4b4083d53f7b6da14a96eee2636fff2d1b197649
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  iotests/041: drop self.assert_no_active_block_jobs()

Drop check for no block-jobs: it's obvious that there no jobs
immediately after vm.launch().

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8e8372944e5e097e98844b4db10f867689065e16
      
https://github.com/qemu/qemu/commit/8e8372944e5e097e98844b4db10f867689065e16
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/055
    M tests/qemu-iotests/055.out

  Log Message:
  -----------
  iotests/055: refactor compressed backup to vmdk

Instead of looping in each test, let's better refactor vmdk target case
as a subclass.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 761cd2e791eae38c3d08ea5f83309ce58bb85ff7
      
https://github.com/qemu/qemu/commit/761cd2e791eae38c3d08ea5f83309ce58bb85ff7
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/055

  Log Message:
  -----------
  iotests/055: skip vmdk target tests if vmdk is not whitelisted

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 503034efc8c443c9eee7d6c0d3850f9086d1dde4
      
https://github.com/qemu/qemu/commit/503034efc8c443c9eee7d6c0d3850f9086d1dde4
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/109

  Log Message:
  -----------
  iotests/109: mark required formats as required to support whitelisting

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5fc2b4f21811668c7cbbe907bdddab839fb50fe9
      
https://github.com/qemu/qemu/commit/5fc2b4f21811668c7cbbe907bdddab839fb50fe9
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/113

  Log Message:
  -----------
  iotests/113: mark bochs as required to support whitelisting

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e4d7019e1a81c61de6a925c3ac5bb6e62ea21b29
      
https://github.com/qemu/qemu/commit/e4d7019e1a81c61de6a925c3ac5bb6e62ea21b29
  Author: Alberto Garcia <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/qcow2.c
    A tests/qemu-iotests/292
    A tests/qemu-iotests/292.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  qcow2: Avoid integer wraparound in qcow2_co_truncate()

After commit f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de when an image is
extended and BDRV_REQ_ZERO_WRITE is set then the new clusters are
zeroized.

The code however does not detect correctly situations when the old and
the new end of the image are within the same cluster. The problem can
be reproduced with these steps:

   qemu-img create -f qcow2 backing.qcow2 1M
   qemu-img create -f qcow2 -F qcow2 -b backing.qcow2 top.qcow2
   qemu-img resize --shrink top.qcow2 520k
   qemu-img resize top.qcow2 567k

In the last step offset - zero_start causes an integer wraparound.

Signed-off-by: Alberto Garcia <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4dc20e6465eccd2466a449d3fb49539f5d9f53dd
      
https://github.com/qemu/qemu/commit/4dc20e6465eccd2466a449d3fb49539f5d9f53dd
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Rename VmdkMetaData.valid to new_allocation

m_data is used for zero clusters even though valid == 0. It really only
means that a new cluster was allocated in the image file. Rename it to
reflect this.

While at it, change it from int to bool, too.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2821c1cc0f8cbfcc332387e83be746af6f27cb4f
      
https://github.com/qemu/qemu/commit/2821c1cc0f8cbfcc332387e83be746af6f27cb4f
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Fix zero cluster allocation

m_data must contain valid data even for zero clusters when no cluster
was allocated in the image file. Without this, zero writes segfault with
images that have zeroed_grain=on.

For zero writes, we don't want to allocate a cluster in the image file
even in compressed files.

Fixes: 524089bce43fd1cd3daaca979872451efa2cf7c6
Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4823cde58eb507fcdcc0225b087343439a6cb43c
      
https://github.com/qemu/qemu/commit/4823cde58eb507fcdcc0225b087343439a6cb43c
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Fix partial overwrite of zero cluster

When overwriting a zero cluster, we must not perform copy-on-write from
the backing file, but from a zeroed buffer.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 78cae78dbcf94a151203ab5c6e418d9d9094a59e
      
https://github.com/qemu/qemu/commit/78cae78dbcf94a151203ab5c6e418d9d9094a59e
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Don't update L2 table for zero write on zero cluster

If a cluster is already zeroed, we don't have to call vmdk_L2update(),
which is rather slow because it flushes the image file.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2758be056ba814cd5a878b71c231af79a863b058
      
https://github.com/qemu/qemu/commit/2758be056ba814cd5a878b71c231af79a863b058
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Flush only once in vmdk_L2update()

If we have a backup L2 table, we currently flush once after writing to
the active L2 table and again after writing to the backup table. A
single flush is enough and makes things a little less slow.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c1eafd27b136b6717f8271e842372565d9b8c178
      
https://github.com/qemu/qemu/commit/c1eafd27b136b6717f8271e842372565d9b8c178
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/059
    M tests/qemu-iotests/check

  Log Message:
  -----------
  iotests: vmdk: Enable zeroed_grained=on by default

In order to avoid bitrot in the zero cluster code in VMDK, enable
zeroed_grain=on by default for the tests.

059 now unsets the default options because zeroed_grain=on works only
with some subformats and the test case tests many different subformats,
including those for which it doesn't work.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 813cc2545b82409fd504509f0ba2e96fab6edb9e
      
https://github.com/qemu/qemu/commit/813cc2545b82409fd504509f0ba2e96fab6edb9e
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/283
    M tests/qemu-iotests/283.out

  Log Message:
  -----------
  iotests/283: Use consistent size for source and target

The test case forgot to specify the null-co size for the target node.
When adding a check to backup that both sizes match, this would fail
because of the size mismatch and not the behaviour that the test really
wanted to test.

Fixes: a541fcc27c98b96da187c7d4573f3270f3ddd283
Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 58226634c4b02af7b10862f7fbd3610a344bfb7f
      
https://github.com/qemu/qemu/commit/58226634c4b02af7b10862f7fbd3610a344bfb7f
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  backup: Improve error for bdrv_getlength() failure

bdrv_get_device_name() will be an empty string with modern management
tools that don't use -drive. Use bdrv_get_device_or_node_name() instead
so that the node name is used if the BlockBackend is anonymous.

While at it, start with upper case to make the message consistent with
the rest of the function.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 958a04bd32af18d9a207bcc78046e56a202aebc2
      
https://github.com/qemu/qemu/commit/958a04bd32af18d9a207bcc78046e56a202aebc2
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/backup-top.c
    M block/backup.c

  Log Message:
  -----------
  backup: Make sure that source and target size match

Since the introduction of a backup filter node in commit 00e30f05d, the
backup block job crashes when the target image is smaller than the
source image because it will try to write after the end of the target
node without having BLK_PERM_RESIZE. (Previously, the BlockBackend layer
would have caught this and errored out gracefully.)

We can fix this and even do better than the old behaviour: Check that
source and target have the same image size at the start of the block job
and unshare BLK_PERM_RESIZE. (This permission was already unshared
before the same commit 00e30f05d, but the BlockBackend that was used to
make the restriction was removed without a replacement.) This will
immediately error out when starting the job instead of only when writing
to a block that doesn't exist in the target.

Longer target than source would technically work because we would never
write to blocks that don't exist, but semantically these are invalid,
too, because a backup is supposed to create a copy, not just an image
that starts with a copy.

Fixes: 00e30f05de1d19586345ec373970ef4c192c6270
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1778593
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0a82a9273062d05764e3df3637b3aa95ad8291c6
      
https://github.com/qemu/qemu/commit/0a82a9273062d05764e3df3637b3aa95ad8291c6
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/055
    M tests/qemu-iotests/055.out

  Log Message:
  -----------
  iotests: Backup with different source/target size

This tests that the backup job catches situations where the target node
has a different size than the source node. It must also forbid resize
operations when the job is already running.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6a9d73bdd061d9eb7001d38147f73f4b6987f00b
      
https://github.com/qemu/qemu/commit/6a9d73bdd061d9eb7001d38147f73f4b6987f00b
  Author: Kevin Wolf <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M tests/qemu-iotests/055

  Log Message:
  -----------
  iotests/055: Use cache.no-flush for vmdk target

055 uses the backup block job to create a compressed backup of an
$IMGFMT image with both qcow2 and vmdk targets. However, cluster
allocation in vmdk is very slow because it flushes the image file after
each L2 update.

There is no reason why we need this level of safety in this test, so
let's disable flushes for vmdk. For the blockdev-backup tests this is
achieved by simply adding the cache.no-flush=on to the drive_add() for
the target. For drive-backup, the caching flags are copied from the
source node, so we'll also add the flag to the source node, even though
it is not vmdk.

This can make the test run significantly faster (though it doesn't make
a difference on tmpfs). In my usual setup it goes from ~45s to ~15s.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4b96fa3846f001981ef6f33673cdb65f619b2997
      
https://github.com/qemu/qemu/commit/4b96fa3846f001981ef6f33673cdb65f619b2997
  Author: Max Reitz <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Fix preallocation on block devices

Calling bdrv_getlength() to get the pre-truncate file size will not
really work on block devices, because they have always the same length,
and trying to write beyond it will fail with a rather cryptic error
message.

Instead, we should use qcow2_get_last_cluster() and bdrv_getlength()
only as a fallback.

Before this patch:
$ truncate -s 1G test.img
$ sudo losetup -f --show test.img
/dev/loop0
$ sudo qemu-img create -f qcow2 -o preallocation=full /dev/loop0 64M
Formatting '/dev/loop0', fmt=qcow2 size=67108864 cluster_size=65536
preallocation=full lazy_refcounts=off refcount_bits=16
qemu-img: /dev/loop0: Could not resize image: Failed to resize refcount
structures: No space left on device

With this patch:
$ sudo qemu-img create -f qcow2 -o preallocation=full /dev/loop0 64M
Formatting '/dev/loop0', fmt=qcow2 size=67108864 cluster_size=65536
preallocation=full lazy_refcounts=off refcount_bits=16
qemu-img: /dev/loop0: Could not resize image: Failed to resize
underlying file: Preallocation mode 'full' unsupported for this
non-regular file

So as you can see, it still fails, but now the problem is missing
support on the block device level, so we at least get a better error
message.

Note that we cannot preallocate block devices on truncate by design,
because we do not know what area to preallocate.  Their length is always
the same, the truncate operation does not change it.

Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5e09bcee5ba2c69f79d59513436fc92db49ec302
      
https://github.com/qemu/qemu/commit/5e09bcee5ba2c69f79d59513436fc92db49ec302
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/gluster.c

  Log Message:
  -----------
  gluster: Drop useless has_zero_init callback

block.c already defaults to 0 if we don't provide a callback; there's
no need to write a callback that always fails.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8e519795041e3293ab6b4e67f5416fa80dc0efc4
      
https://github.com/qemu/qemu/commit/8e519795041e3293ab6b4e67f5416fa80dc0efc4
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/file-win32.c

  Log Message:
  -----------
  file-win32: Support BDRV_REQ_ZERO_WRITE for truncate

When using bdrv_file, .bdrv_has_zero_init_truncate always returns 1;
therefore, we can behave just like file-posix, and always implement
BDRV_REQ_ZERO_WRITE by ignoring it since the OS gives it to us for
free (note that file-posix.c had to use an 'if' because it shared code
between regular files and block devices, but in file-win32.c,
bdrv_host_device uses a separate .bdrv_file_open).

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8f23aaf5d6a5458e251c5d5d0555d9e515355e35
      
https://github.com/qemu/qemu/commit/8f23aaf5d6a5458e251c5d5d0555d9e515355e35
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/nfs.c

  Log Message:
  -----------
  nfs: Support BDRV_REQ_ZERO_WRITE for truncate

Our .bdrv_has_zero_init_truncate returns 1 if we detect that the OS
always 0-fills; we can use that same knowledge to implement
BDRV_REQ_ZERO_WRITE by ignoring it when the OS gives it to us for
free.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2f98910d5b89733b1a5df06c6d2a7056da32a7b7
      
https://github.com/qemu/qemu/commit/2f98910d5b89733b1a5df06c6d2a7056da32a7b7
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  rbd: Support BDRV_REQ_ZERO_WRITE for truncate

Our .bdrv_has_zero_init_truncate always returns 1 because rbd always
0-fills; we can use that same knowledge to implement
BDRV_REQ_ZERO_WRITE by ignoring it.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: fec00559e71c94749deac176f6c4bebf81fbe7b8
      
https://github.com/qemu/qemu/commit/fec00559e71c94749deac176f6c4bebf81fbe7b8
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate

Our .bdrv_has_zero_init_truncate always returns 1 because sheepdog
always 0-fills; we can use that same knowledge to implement
BDRV_REQ_ZERO_WRITE by ignoring it.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: be9c9404db7e6992946fa55c75ca61dfb20926eb
      
https://github.com/qemu/qemu/commit/be9c9404db7e6992946fa55c75ca61dfb20926eb
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/ssh.c

  Log Message:
  -----------
  ssh: Support BDRV_REQ_ZERO_WRITE for truncate

Our .bdrv_has_zero_init_truncate can detect when the remote side
always zero fills; we can reuse that same knowledge to implement
BDRV_REQ_ZERO_WRITE by ignoring it when the server gives it to us for
free.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bda4cdcbb997d34762e2af27e1f475357a9b4453
      
https://github.com/qemu/qemu/commit/bda4cdcbb997d34762e2af27e1f475357a9b4453
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/parallels.c

  Log Message:
  -----------
  parallels: Rework truncation logic

The parallels driver tries to use truncation for image growth, but can
only do so when reads are guaranteed as zero.  Now that we have a way
to request zero contents from truncation, we can defer the decision to
actual allocation attempts rather than up front, reducing the number
of places that still use bdrv_has_zero_init_truncate.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Denis V. Lunev <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dbc636e791ad04b6bcdec982d2b9c45d7182e037
      
https://github.com/qemu/qemu/commit/dbc636e791ad04b6bcdec982d2b9c45d7182e037
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  vhdx: Rework truncation logic

The vhdx driver uses truncation for image growth, with a special case
for blocks that already read as zero but which are only being
partially written.  But with a bit of rearranging, it's just as easy
to defer the decision on whether truncation resulted in zeroes to the
actual allocation attempt, reducing the number of places that still
use bdrv_has_zero_init_truncate.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 47e0b38a13935cb666f88964c3096654092f42d6
      
https://github.com/qemu/qemu/commit/47e0b38a13935cb666f88964c3096654092f42d6
  Author: Eric Blake <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block.c
    M block/file-posix.c
    M block/file-win32.c
    M block/nfs.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/rbd.c
    M block/sheepdog.c
    M block/ssh.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Drop unused .bdrv_has_zero_init_truncate

Now that there are no clients of bdrv_has_zero_init_truncate, none of
the drivers need to worry about providing it.

What's more, this eliminates a source of some confusion: a literal
reading of the documentation as written in ceaca56f and implemented in
commit 1dcaf527 claims that a driver which returns 0 for
bdrv_has_zero_init_truncate() must not return 1 for
bdrv_has_zero_init(); this condition was violated for parallels, qcow,
and sometimes for vdi, although in practice it did not matter since
those drivers also lacked .bdrv_co_truncate.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Acked-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c88f1ffc19e38008a1c33ae039482a860aa7418c
      
https://github.com/qemu/qemu/commit/c88f1ffc19e38008a1c33ae039482a860aa7418c
  Author: Peter Maydell <address@hidden>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M block.c
    M block/backup-top.c
    M block/backup.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/nfs.c
    M block/parallels.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-format.c
    M block/rbd.c
    M block/sheepdog.c
    M block/ssh.c
    M block/vhdx.c
    M block/vmdk.c
    M include/block/block.h
    M include/block/block_int.h
    M tests/qemu-iotests/041
    M tests/qemu-iotests/055
    M tests/qemu-iotests/055.out
    M tests/qemu-iotests/059
    M tests/qemu-iotests/082
    M tests/qemu-iotests/091
    M tests/qemu-iotests/109
    M tests/qemu-iotests/113
    M tests/qemu-iotests/148
    M tests/qemu-iotests/283
    M tests/qemu-iotests/283.out
    A tests/qemu-iotests/292
    A tests/qemu-iotests/292.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group

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

Block layer patches:

- qcow2: Fix preallocation on block devices
- backup: Make sure that source and target size match
- vmdk: Fix zero cluster handling
- Follow-up cleanups and fixes for the truncate changes
- iotests: Skip more tests if required drivers are missing

# gpg: Signature made Fri 08 May 2020 13:39:55 BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Kevin Wolf <address@hidden>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream: (30 commits)
  block: Drop unused .bdrv_has_zero_init_truncate
  vhdx: Rework truncation logic
  parallels: Rework truncation logic
  ssh: Support BDRV_REQ_ZERO_WRITE for truncate
  sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate
  rbd: Support BDRV_REQ_ZERO_WRITE for truncate
  nfs: Support BDRV_REQ_ZERO_WRITE for truncate
  file-win32: Support BDRV_REQ_ZERO_WRITE for truncate
  gluster: Drop useless has_zero_init callback
  qcow2: Fix preallocation on block devices
  iotests/055: Use cache.no-flush for vmdk target
  iotests: Backup with different source/target size
  backup: Make sure that source and target size match
  backup: Improve error for bdrv_getlength() failure
  iotests/283: Use consistent size for source and target
  iotests: vmdk: Enable zeroed_grained=on by default
  vmdk: Flush only once in vmdk_L2update()
  vmdk: Don't update L2 table for zero write on zero cluster
  vmdk: Fix partial overwrite of zero cluster
  vmdk: Fix zero cluster allocation
  ...

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


Compare: https://github.com/qemu/qemu/compare/1b8c45899715...c88f1ffc19e3



reply via email to

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