qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9353db: qcow2.h: add missing include


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9353db: qcow2.h: add missing include
Date: Thu, 30 May 2019 04:09:39 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9353db47c5e2f849bc1130e5ed6b40ce97798289
      
https://github.com/qemu/qemu/commit/9353db47c5e2f849bc1130e5ed6b40ce97798289
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-bitmap.c
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2.h: add missing include

qcow2.h depends on block_int.h. Compilation isn't broken currently only
due to block_int.h always included before qcow2.h. Though, it seems
better to directly include block_int.h in qcow2.h.

Signed-off-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: Max Reitz <address@hidden>


  Commit: 56e2f1d898849784c25928d49b5143e5e9b71d08
      
https://github.com/qemu/qemu/commit/56e2f1d898849784c25928d49b5143e5e9b71d08
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/Makefile.objs
    A block/qcow2-threads.c
    M block/qcow2.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: add separate file for threaded data processing functions

Move compression-on-threads to separate file. Encryption will be in it
too.

Signed-off-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: Max Reitz <address@hidden>


  Commit: 269062efc8c665707ef88d425d383f4223ce1b11
      
https://github.com/qemu/qemu/commit/269062efc8c665707ef88d425d383f4223ce1b11
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-threads.c

  Log Message:
  -----------
  qcow2-threads: use thread_pool_submit_co

Use thread_pool_submit_co, instead of reinventing it here. Note, that
thread_pool_submit_aio() never returns NULL, so checking it was an
extra thing.

Signed-off-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: Max Reitz <address@hidden>


  Commit: 0f5636c51c76fed01e2ed02fbb7a46da869f0489
      
https://github.com/qemu/qemu/commit/0f5636c51c76fed01e2ed02fbb7a46da869f0489
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-threads.c

  Log Message:
  -----------
  qcow2-threads: qcow2_co_do_compress: protect queuing by mutex

Drop dependence on AioContext lock.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 6f13a316dd3a6916de4733e56585127445b19458
      
https://github.com/qemu/qemu/commit/6f13a316dd3a6916de4733e56585127445b19458
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-threads.c
    M block/qcow2.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2-threads: split out generic path

Move generic part out of qcow2_co_do_compress, to reuse it for
encryption and rename things that would be shared with encryption path.

Signed-off-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: Max Reitz <address@hidden>


  Commit: f24196d388ec781ce3ae99c1fb78ba9755785f91
      
https://github.com/qemu/qemu/commit/f24196d388ec781ce3ae99c1fb78ba9755785f91
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: qcow2_co_preadv: improve locking

Background: decryption will be done in threads, to take benefit of it,
we should move it out of the lock first.

But let's go further: it turns out, that only
qcow2_get_cluster_offset() needs locking, so reduce locking to it.

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


  Commit: 5447c3a03f6775a99da6e36cc7eda09f293d7521
      
https://github.com/qemu/qemu/commit/5447c3a03f6775a99da6e36cc7eda09f293d7521
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: bdrv_co_pwritev: move encryption code out of the lock

Encryption will be done in threads, to take benefit of it, we should
move it out of the lock first.

Signed-off-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: Max Reitz <address@hidden>


  Commit: 8ac0f15f335b8b58e974fb7a9d193ba56ea18542
      
https://github.com/qemu/qemu/commit/8ac0f15f335b8b58e974fb7a9d193ba56ea18542
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

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

  Log Message:
  -----------
  qcow2: do encryption in threads

Do encryption/decryption in threads, like it is already done for
compression. This improves asynchronous encrypted io.

Signed-off-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: Max Reitz <address@hidden>


  Commit: c2da3413c021398152e98022261bb1643276a2fe
      
https://github.com/qemu/qemu/commit/c2da3413c021398152e98022261bb1643276a2fe
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: simplify backup_incremental_init_copy_bitmap

Simplify backup_incremental_init_copy_bitmap using the function
bdrv_dirty_bitmap_next_dirty_area.

Note: move to job->len instead of bitmap size: it should not matter but
less code.

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


  Commit: a8389e315ef71913ae99cf8f3b1f89e84631f599
      
https://github.com/qemu/qemu/commit/a8389e315ef71913ae99cf8f3b1f89e84631f599
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: move to copy_bitmap with granularity

We are going to share this bitmap between backup and backup-top filter
driver, so let's share something more meaningful. It also simplifies
some calculations.

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


  Commit: 9eb5a248f3e50c1f034bc6ff4b2f25c8c56515a5
      
https://github.com/qemu/qemu/commit/9eb5a248f3e50c1f034bc6ff4b2f25c8c56515a5
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: refactor and tolerate unallocated cluster skipping

Split allocation checking to separate function and reduce nesting.
Consider bdrv_is_allocated() fail as allocated area, as copying more
than needed is not wrong (and we do it anyway) and seems better than
fail the whole job. And, most probably we will fail on the next read,
if there are real problem with source.

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


  Commit: c334e897d08eea1f5a3a95f6a2208afe6757c103
      
https://github.com/qemu/qemu/commit/c334e897d08eea1f5a3a95f6a2208afe6757c103
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: unify different modes code path

Do full, top and incremental mode copying all in one place. This
unifies the code path and helps further improvements.

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


  Commit: ae6b12fa4cf7d54add35531c790aaf2bd6d833f3
      
https://github.com/qemu/qemu/commit/ae6b12fa4cf7d54add35531c790aaf2bd6d833f3
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: refactor: split out backup_calculate_cluster_size

Split out cluster_size calculation. Move copy-bitmap creation above
block-job creation, as we are going to share it with upcoming
backup-top filter, which also should be created before actual block job
creation.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-id: address@hidden
[mreitz: Dropped a paragraph from the commit message that was left over
         from a previous version]
Signed-off-by: Max Reitz <address@hidden>


  Commit: dd4118c792a8c2a104fe90274e8a41e0db1ebc56
      
https://github.com/qemu/qemu/commit/dd4118c792a8c2a104fe90274e8a41e0db1ebc56
  Author: Alberto Garcia <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block.c
    M tests/test-bdrv-drain.c
    M tests/test-bdrv-graph-mod.c

  Log Message:
  -----------
  block: Use bdrv_unref_child() for all children in bdrv_close()

bdrv_unref_child() does the following things:

  - Updates the child->bs->inherits_from pointer.
  - Calls bdrv_detach_child() to remove the BdrvChild from bs->children.
  - Calls bdrv_unref() to unref the child BlockDriverState.

When bdrv_unref_child() was introduced in commit 33a604075c it was not
used in bdrv_close() because the drivers that had additional children
(like quorum or blkverify) had already called bdrv_unref() on their
children during their own close functions.

This was changed later (in 0bd6e91a7e for quorum, in 3e586be0b2 for
blkverify) so there's no reason not to use bdrv_unref_child() in
bdrv_close() anymore.

After this there's also no need to remove bs->backing and bs->file
separately from the rest of the children, so bdrv_close() can be
simplified.

Now bdrv_close() unrefs all children (before this patch it was only
bs->file and bs->backing). As a result, none of the callers of
brvd_attach_child() should remove their reference to child_bs (because
this function effectively steals that reference). This patch updates a
couple of tests that were doing their own bdrv_unref().

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
[mreitz: s/where/were/]
Signed-off-by: Max Reitz <address@hidden>


  Commit: b441dc71c0b7e8f488a6ebc2aa781b08a3a05038
      
https://github.com/qemu/qemu/commit/b441dc71c0b7e8f488a6ebc2aa781b08a3a05038
  Author: Alberto Garcia <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/quorum.c
    M blockjob.c

  Log Message:
  -----------
  block: Make bdrv_root_attach_child() unref child_bs on failure

A consequence of the previous patch is that bdrv_attach_child()
transfers the reference to child_bs from the caller to parent_bs,
which will drop it on bdrv_close() or when someone calls
bdrv_unref_child().

But this only happens when bdrv_attach_child() succeeds. If it fails
then the caller is responsible for dropping the reference to child_bs.

This patch makes bdrv_attach_child() take the reference also when
there is an error, freeing the caller for having to do it.

A similar situation happens with bdrv_root_attach_child(), so the
changes on this patch affect both functions.

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
[mreitz: Removed now superfluous BdrvChild * variable in
         bdrv_open_child()]
Signed-off-by: Max Reitz <address@hidden>


  Commit: 4ebe0617269113ec52a74d3dbb574a62ef6a0c83
      
https://github.com/qemu/qemu/commit/4ebe0617269113ec52a74d3dbb574a62ef6a0c83
  Author: Sam Eiderman <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: rebase: Reuse parent BlockDriverState

In safe mode we open the entire chain, including the parent backing
file of the rebased file.
Do not open a new BlockBackend for the parent backing file, which
saves opening the rest of the chain twice, which for long chains
saves many "pricy" bdrv_open() calls.

Permissions for blk_new() were copied from blk_new_open() when
flags = 0.

Reviewed-by: Karl Heubaum <address@hidden>
Reviewed-by: Eyal Moscovici <address@hidden>
Signed-off-by: Sagi Amit <address@hidden>
Co-developed-by: Sagi Amit <address@hidden>
Signed-off-by: Sam Eiderman <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 863cc78f1b38e926a1ac71348aaba0f6777660ff
      
https://github.com/qemu/qemu/commit/863cc78f1b38e926a1ac71348aaba0f6777660ff
  Author: Sam Eiderman <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: rebase: Reduce reads on in-chain rebase

In the following case:

(base) A <- B <- C (tip)

when running:

    qemu-img rebase -b A C

QEMU would read all sectors not allocated in the file being rebased (C)
and compare them to the new base image (A), regardless of whether they
were changed or even allocated anywhere along the chain between the new
base and the top image (B). This causes many unneeded reads when
rebasing an image which represents a small diff of a large disk, as it
would read most of the disk's sectors.

Instead, use bdrv_is_allocated_above() to reduce the number of
unnecessary reads.

Reviewed-by: Karl Heubaum <address@hidden>
Signed-off-by: Sam Eiderman <address@hidden>
Signed-off-by: Eyal Moscovici <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 330c72957196e0ae382abcaa97ebf4eb9bc8574f
      
https://github.com/qemu/qemu/commit/330c72957196e0ae382abcaa97ebf4eb9bc8574f
  Author: Sam Eiderman <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: rebase: Reuse in-chain BlockDriverState

If a chain was detected, don't open a new BlockBackend from the target
backing file which will create a new BlockDriverState. Instead, create
an empty BlockBackend and attach the already open BlockDriverState.

Permissions for blk_new() were copied from blk_new_open() when
flags = 0.

Reviewed-by: Karl Heubaum <address@hidden>
Reviewed-by: Eyal Moscovici <address@hidden>
Signed-off-by: Sagi Amit <address@hidden>
Co-developed-by: Sagi Amit <address@hidden>
Signed-off-by: Sam Eiderman <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a
      
https://github.com/qemu/qemu/commit/c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a
  Author: Anton Nefedov <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/qcow2.h
    M block/trace-events
    M qapi/block-core.json
    M tests/qemu-iotests/060
    M tests/qemu-iotests/060.out

  Log Message:
  -----------
  qcow2: skip writing zero buffers to empty COW areas

If COW areas of the newly allocated clusters are zeroes on the backing
image, efficient bdrv_write_zeroes(flags=BDRV_REQ_NO_FALLBACK) can be
used on the whole cluster instead of writing explicit zero buffers later
in perform_cow().

iotest 060:
write to the discarded cluster does not trigger COW anymore.
Use a backing image instead.

Signed-off-by: Anton Nefedov <address@hidden>
Message-id: address@hidden
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 6388903e7cc9b6528934a083e81f086322c24c86
      
https://github.com/qemu/qemu/commit/6388903e7cc9b6528934a083e81f086322c24c86
  Author: Andrey Shinkevich <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M block/qcow2-bitmap.c

  Log Message:
  -----------
  qcow2-bitmap: initialize bitmap directory alignment

Valgrind detects multiple issues in QEMU iotests when the memory is
used without being initialized. Valgrind may dump lots of unnecessary
reports what makes the memory issue analysis harder. Particularly,
that is true for the aligned bitmap directory and can be seen while
running the iotest #169. Padding the aligned space with zeros eases
the pain.

Signed-off-by: Andrey Shinkevich <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: a2d665c1bc3624a8375e2f9a7d569f7565cc1358
      
https://github.com/qemu/qemu/commit/a2d665c1bc3624a8375e2f9a7d569f7565cc1358
  Author: John Snow <address@hidden>
  Date:   2019-05-28 (Tue, 28 May 2019)

  Changed paths:
    M blockdev.c
    M tests/qemu-iotests/056

  Log Message:
  -----------
  blockdev: loosen restrictions on drive-backup source node

We mandate that the source node must be a root node; but there's no reason
I am aware of that it needs to be restricted to such. In some cases, we need
to make sure that there's a medium present, but in the general case we can
allow the backup job itself to do the graph checking.

This patch helps improve the error message when you try to backup from
the same node more than once, which is reflected in the change to test
056.

For backups with bitmaps, it will also show a better error message that
the bitmap is in use instead of giving you something cryptic like "need
a root node."

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1707303
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: e5714b5be3d63d880844f004bd3c76170a280069
      
https://github.com/qemu/qemu/commit/e5714b5be3d63d880844f004bd3c76170a280069
  Author: Peter Maydell <address@hidden>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M block.c
    M block/Makefile.objs
    M block/backup.c
    M block/block-backend.c
    M block/qcow2-bitmap.c
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    A block/qcow2-threads.c
    M block/qcow2.c
    M block/qcow2.h
    M block/quorum.c
    M block/trace-events
    M blockdev.c
    M blockjob.c
    M qapi/block-core.json
    M qemu-img.c
    M tests/qemu-iotests/056
    M tests/qemu-iotests/060
    M tests/qemu-iotests/060.out
    M tests/test-bdrv-drain.c
    M tests/test-bdrv-graph-mod.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-28' 
into staging

Block patches:
- qcow2: Use threads for encrypted I/O
- qemu-img rebase: Optimizations
- backup job: Allow any source node, and some refactoring
- Some general simplifications in the block layer

# gpg: Signature made Tue 28 May 2019 20:26:56 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Max Reitz <address@hidden>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2019-05-28: (21 commits)
  blockdev: loosen restrictions on drive-backup source node
  qcow2-bitmap: initialize bitmap directory alignment
  qcow2: skip writing zero buffers to empty COW areas
  qemu-img: rebase: Reuse in-chain BlockDriverState
  qemu-img: rebase: Reduce reads on in-chain rebase
  qemu-img: rebase: Reuse parent BlockDriverState
  block: Make bdrv_root_attach_child() unref child_bs on failure
  block: Use bdrv_unref_child() for all children in bdrv_close()
  block/backup: refactor: split out backup_calculate_cluster_size
  block/backup: unify different modes code path
  block/backup: refactor and tolerate unallocated cluster skipping
  block/backup: move to copy_bitmap with granularity
  block/backup: simplify backup_incremental_init_copy_bitmap
  qcow2: do encryption in threads
  qcow2: bdrv_co_pwritev: move encryption code out of the lock
  qcow2: qcow2_co_preadv: improve locking
  qcow2-threads: split out generic path
  qcow2-threads: qcow2_co_do_compress: protect queuing by mutex
  qcow2-threads: use thread_pool_submit_co
  qcow2: add separate file for threaded data processing functions
  ...

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


Compare: https://github.com/qemu/qemu/compare/8c1ecb590497...e5714b5be3d6



reply via email to

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