qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a50c1f: qcow2: Add incompatibility note betwe


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a50c1f: qcow2: Add incompatibility note between backing fi...
Date: Fri, 01 May 2020 02:30:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a50c1f57e491ba17c0fcb7d285dfe04770be0a70
      
https://github.com/qemu/qemu/commit/a50c1f57e491ba17c0fcb7d285dfe04770be0a70
  Author: Alberto Garcia <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M docs/interop/qcow2.txt

  Log Message:
  -----------
  qcow2: Add incompatibility note between backing files and raw external data 
files

Backing files and raw external data files are mutually exclusive.
The documentation of the raw external data bit (in autoclear_features)
already indicates that, but we should also mention it on the other
side.

Suggested-by: Eric Blake <address@hidden>
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: 3fb61087074474b088fee23bb81ffd258cb9cb2a
      
https://github.com/qemu/qemu/commit/3fb61087074474b088fee23bb81ffd258cb9cb2a
  Author: Paolo Bonzini <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  qemu-iotests: allow qcow2 external discarded clusters to contain stale data

Test 244 checks the expected behavior of qcow2 external data files
with respect to zero and discarded clusters.  Filesystems however
are free to ignore discard requests, and this seems to be the
case for overlayfs.  Relax the tests to skip checks on the
external data file for discarded areas, which implies not using
qemu-img compare in the data_file_raw=on case.

This fixes docker tests on RHEL8.

Cc: Kevin Wolf <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 92b92799dc8662b6f71809100a4aabc1ae408ebb
      
https://github.com/qemu/qemu/commit/92b92799dc8662b6f71809100a4aabc1ae408ebb
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/crypto.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/io.c
    M block/iscsi.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_int.h
    M tests/test-block-iothread.c

  Log Message:
  -----------
  block: Add flags to BlockDriver.bdrv_co_truncate()

This adds a new BdrvRequestFlags parameter to the .bdrv_co_truncate()
driver callbacks, and a supported_truncate_flags field in
BlockDriverState that allows drivers to advertise support for request
flags in the context of truncate.

For now, we always pass 0 and no drivers declare support for any flag.

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


  Commit: 7b8e4857426f2e2de2441749996c6161b550bada
      
https://github.com/qemu/qemu/commit/7b8e4857426f2e2de2441749996c6161b550bada
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/block-backend.c
    M block/crypto.c
    M block/io.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/raw-format.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M include/block/block.h
    M tests/test-block-iothread.c

  Log Message:
  -----------
  block: Add flags to bdrv(_co)_truncate()

Now that block drivers can support flags for .bdrv_co_truncate, expose
the parameter in the node level interfaces bdrv_co_truncate() and
bdrv_truncate().

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


  Commit: 8c6242b6f383e43fd11d2c50f8bcdd2bba1100fc
      
https://github.com/qemu/qemu/commit/8c6242b6f383e43fd11d2c50f8bcdd2bba1100fc
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/commit.c
    M block/crypto.c
    M block/mirror.c
    M block/qcow2.c
    M block/qed.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io-cmds.c

  Log Message:
  -----------
  block-backend: Add flags to blk_truncate()

Now that node level interface bdrv_truncate() supports passing request
flags to the block driver, expose this on the BlockBackend level, too.

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


  Commit: f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de
      
https://github.com/qemu/qemu/commit/f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2.c

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

If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling
qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't
undo any previous preallocation, but just adds the zero flag to all
relevant L2 entries. If an external data file is in use, a write_zeroes
request to the data file is made instead.

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


  Commit: 1ddaabaecb7eaeb6d8948a32340af95db44c54a1
      
https://github.com/qemu/qemu/commit/1ddaabaecb7eaeb6d8948a32340af95db44c54a1
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/raw-format.c

  Log Message:
  -----------
  raw-format: Support BDRV_REQ_ZERO_WRITE for truncate

The raw format driver can simply forward the flag and let its bs->file
child take care of actually providing the zeros.

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


  Commit: 2f0c6e7a650de133eccd94e9bb6cf7b2070f07f1
      
https://github.com/qemu/qemu/commit/2f0c6e7a650de133eccd94e9bb6cf7b2070f07f1
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/file-posix.c

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

For regular files, we always get BDRV_REQ_ZERO_WRITE behaviour from the
OS, so we can advertise the flag and just ignore it.

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


  Commit: 955c7d6687fefcd903900a1e597fcbc896c661cd
      
https://github.com/qemu/qemu/commit/955c7d6687fefcd903900a1e597fcbc896c661cd
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: truncate: Don't make backing file data visible

When extending the size of an image that has a backing file larger than
its old size, make sure that the backing file data doesn't become
visible in the guest, but the added area is properly zeroed out.

Consider the following scenario where the overlay is shorter than its
backing file:

    base.qcow2:     AAAAAAAA
    overlay.qcow2:  BBBB

When resizing (extending) overlay.qcow2, the new blocks should not stay
unallocated and make the additional As from base.qcow2 visible like
before this patch, but zeros should be read.

A similar case happens with the various variants of a commit job when an
intermediate file is short (- for unallocated):

    base.qcow2:     A-A-AAAA
    mid.qcow2:      BB-B
    top.qcow2:      C--C--C-

After commit top.qcow2 to mid.qcow2, the following happens:

    mid.qcow2:      CB-C00C0 (correct result)
    mid.qcow2:      CB-C--C- (before this fix)

Without the fix, blocks that previously read as zeros on top.qcow2
suddenly turn into A.

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


  Commit: fd586ce8bee50d98773436214dc9e644ddda54aa
      
https://github.com/qemu/qemu/commit/fd586ce8bee50d98773436214dc9e644ddda54aa
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  iotests: Filter testfiles out in filter_img_info()

We want to keep TEST_IMG for the full path of the main test image, but
filter_testfiles() must be called for other test images before replacing
other things like the image format because the test directory path could
contain the format as a substring.

Insert a filter_testfiles() call between both.

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


  Commit: bf03dede475e29a16f9188ea85a4d77cd3dcf2b7
      
https://github.com/qemu/qemu/commit/bf03dede475e29a16f9188ea85a4d77cd3dcf2b7
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  iotests: Test committing to short backing file

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


  Commit: eb8a0cf3ba26611f3981f8f45ac6a868975a68cc
      
https://github.com/qemu/qemu/commit/eb8a0cf3ba26611f3981f8f45ac6a868975a68cc
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block/qcow2.c
    M tests/qemu-iotests/274.out

  Log Message:
  -----------
  qcow2: Forward ZERO_WRITE flag for full preallocation

The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the
image is possibly preallocated and then the zero flag is added to all
clusters. This means that a copy-on-write operation may be needed when
writing to these clusters, despite having used preallocation, negating
one of the major benefits of preallocation.

Instead, try to forward the BDRV_REQ_ZERO_WRITE to the protocol driver,
and if the protocol driver can ensure that the new area reads as zeros,
we can skip setting the zero flag in the qcow2 layer.

Unfortunately, the same approach doesn't work for metadata
preallocation, so we'll still set the zero flag there.

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


  Commit: 6cf94132293adb5c76d336ab7ff5924afe2cb147
      
https://github.com/qemu/qemu/commit/6cf94132293adb5c76d336ab7ff5924afe2cb147
  Author: Andrzej Jakowski <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M hw/block/Makefile.objs
    M hw/block/nvme.c
    M hw/block/nvme.h
    M hw/block/trace-events
    M include/block/nvme.h

  Log Message:
  -----------
  nvme: introduce PMR support from NVMe 1.4 spec

This patch introduces support for PMR that has been defined as part of NVMe 1.4
spec. User can now specify a pmrdev option that should point to 
HostMemoryBackend.
pmrdev memory region will subsequently be exposed as PCI BAR 2 in emulated NVMe
device. Guest OS can perform mmio read and writes to the PMR region that will 
stay
persistent across system reboot.

Signed-off-by: Andrzej Jakowski <address@hidden>
Reviewed-by: Klaus Jensen <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Keith Busch <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d6a5beeb2bbf4f5ce6e6396051fb4c5fcced56a4
      
https://github.com/qemu/qemu/commit/d6a5beeb2bbf4f5ce6e6396051fb4c5fcced56a4
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M include/qom/object_interfaces.h
    M qom/object_interfaces.c
    M qom/qom-qmp-cmds.c

  Log Message:
  -----------
  qom: Factor out user_creatable_add_dict()

The QMP handler qmp_object_add() and the implementation of --object in
qemu-storage-daemon can share most of the code. Currently,
qemu-storage-daemon calls qmp_object_add(), but this is not correct
because different visitors need to be used.

As a first step towards a fix, make qmp_object_add() a wrapper around a
new function user_creatable_add_dict() that can get an additional
parameter. The handling of "props" is only required for compatibility
and not required for the qemu-storage-daemon command line, so it stays
in qmp_object_add().

Signed-off-by: Kevin Wolf <address@hidden>


  Commit: eaae29ef89d498d0eac553c77b554f310a47f809
      
https://github.com/qemu/qemu/commit/eaae29ef89d498d0eac553c77b554f310a47f809
  Author: Kevin Wolf <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M include/qom/object_interfaces.h
    M qemu-storage-daemon.c
    M qom/object_interfaces.c
    M qom/qom-qmp-cmds.c

  Log Message:
  -----------
  qemu-storage-daemon: Fix non-string --object properties

After processing the option string with the keyval parser, we get a
QDict that contains only strings. This QDict must be fed to a keyval
visitor which converts the strings into the right data types.

qmp_object_add(), however, uses the normal QObject input visitor, which
expects a QDict where all properties already have the QType that matches
the data type required by the QOM object type.

Change the --object implementation in qemu-storage-daemon so that it
doesn't call qmp_object_add(), but calls user_creatable_add_dict()
directly instead and pass it a new keyval boolean that decides which
visitor must be used.

Reported-by: Coiby Xu <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1c47613588ccff44422d4bdeea0dc36a0a308ec7
      
https://github.com/qemu/qemu/commit/1c47613588ccff44422d4bdeea0dc36a0a308ec7
  Author: Peter Maydell <address@hidden>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/commit.c
    M block/crypto.c
    M block/file-posix.c
    M block/file-win32.c
    M block/gluster.c
    M block/io.c
    M block/iscsi.c
    M block/mirror.c
    M block/nfs.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.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/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M docs/interop/qcow2.txt
    M hw/block/Makefile.objs
    M hw/block/nvme.c
    M hw/block/nvme.h
    M hw/block/trace-events
    M include/block/block.h
    M include/block/block_int.h
    M include/block/nvme.h
    M include/qom/object_interfaces.h
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io-cmds.c
    M qemu-storage-daemon.c
    M qom/object_interfaces.c
    M qom/qom-qmp-cmds.c
    M tests/qemu-iotests/244
    M tests/qemu-iotests/244.out
    A tests/qemu-iotests/274
    A tests/qemu-iotests/274.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py
    M tests/test-block-iothread.c

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

Block layer patches:

- Fix resize (extending) of short overlays
- nvme: introduce PMR support from NVMe 1.4 spec
- qemu-storage-daemon: Fix non-string --object properties

# gpg: Signature made Thu 30 Apr 2020 16:51:45 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:
  qemu-storage-daemon: Fix non-string --object properties
  qom: Factor out user_creatable_add_dict()
  nvme: introduce PMR support from NVMe 1.4 spec
  qcow2: Forward ZERO_WRITE flag for full preallocation
  iotests: Test committing to short backing file
  iotests: Filter testfiles out in filter_img_info()
  block: truncate: Don't make backing file data visible
  file-posix: Support BDRV_REQ_ZERO_WRITE for truncate
  raw-format: Support BDRV_REQ_ZERO_WRITE for truncate
  qcow2: Support BDRV_REQ_ZERO_WRITE for truncate
  block-backend: Add flags to blk_truncate()
  block: Add flags to bdrv(_co)_truncate()
  block: Add flags to BlockDriver.bdrv_co_truncate()
  qemu-iotests: allow qcow2 external discarded clusters to contain stale data
  qcow2: Add incompatibility note between backing files and raw external data 
files

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


Compare: https://github.com/qemu/qemu/compare/27c945663790...1c47613588cc



reply via email to

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