From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [PATCH v8 00/43] block: Deal with filters
Date: Tue, 1 Sep 2020 16:33:41 +0200 [thread overview]
Message-ID: <20200901143424.884735-1-mreitz@redhat.com> (raw)
v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html
v7: https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg01357.html
Branch: https://github.com/XanClic/qemu.git child-access-functions-v8
Branch: https://git.xanclic.moe/XanClic/qemu.git child-access-functions-v8
Hi,
In v8, there is not too much that has changed in respect to v7. I tried
to address all of your comments and hope I got it right. I also hope I
got the R-bs right.
Changes from v7:
- Patch 1: Let bdrv_primary_child() assert that there’s only a single
primary child
- Patch 2: Assert that bdrv_do_skip_filters() will not return a filter
node
- Patch 3: Drop bdrv_unallocated_blocks_are_zero() hunk (that function
no longer exists)
- Old patch 10: Dropped, it isn’t really important to let mirror-top
support compressed writes, and
bdrv_supports_compressed_writes() doesn’t really work
with this patch
- Old patch 11: Dropped, it isn’t really important to let backup-top
support compressed writes
- Patch 10: Rebase conflict in init_dirty_bitmap_migration()
(The modified block is now nested one level deeper)
- Patch 11: Rebase conflict in bdrv_co_block_status()
(bdrv_unallocated_blocks_are_zero() is no longer used)
- Patch 12:
- Fix documentation on what the backing node after streaming is going
to be
- bdrv_change_backing_file() rebase conflict
- Patch 13: Try to clarify what bdrv_find_overlay() returns in its doc
comment
- Patch 15: Optimize the overlay_bs finding loop
- Old patch 25: Rolled into the next patch (now patch 23)
- Patch 23:
- Inline two of the three functions introduced in the old patch 25
- The other one (bdrv_sum_allocated_file_size()) stays, but is static
now
(Turns out we don’t need to let block drivers use any of these
functions for their BlockDriver.bdrv_get_allocated_File_size().)
- Old patch 27: Dropped, just let blkverify be handled like any other
filter, because it doesn’t matter, really
(and this allows us squashing the previous to patches)
- Patch 24: Remove _filter_actual_image_size from iotest 184
- Patch 27: Reference output change due to 184 no longer invoking
_filter_actual_image_size
- Patch 29:
- Let the commit message explain why base_overlay is introduced
- Drop @replaces_node_name from qmp_drive_mirror(), because it isn’t
needed
- Patch 31:
- Let blk_commit_all() only commit those nodes that have a backing
file; and ignore all filters on top of them (instead of just
implicit filters)
- In commit_start: %s/\<perms\>/base_perms/
- Under commit_start.ro_cleanup: Restore the original backing file
only if necessary, so we do not run into an abort because the
backing chain is frozen
- Patch 33: Let img_rebase() refer to the unfiltered_bs in three more
places
- Patch 35:
- Documentation modifications:
- Move a chunk of it up where it belongs (from below @backing-file
to the general area of @block-commit)
- Explain that you now need to issue block-job-complete whenever
there’s a writer on @top
- Also, @backing-file is no longer allowed whenever there’s a writer
on @top
- In the code, this should cause a different error message than
when @top is in the active layer, though
- Comment note: If @top is a root node without any writers on it, we
still need to do an active commit, because everything else would be
an incompatible change
- Patch 36: Trivial rebase conflict in block_int.h (necessary because
the old patch 25 was dropped)
- Patch 37: Don’t try to fetch ImageInfo.backing-filename-format from
the backing file open at runtime. If the image header does
not specify a format, just leave it empty.
- Patch 40: Use format string instead of ''.format()
- Patch 42: Add -F $IMGFMT to _make_test_img -b
git-backport-diff against v7:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/43:[0007] [FC] 'block: Add child access functions'
002/43:[0007] [FC] 'block: Add chain helper functions'
003/43:[0002] [FC] 'block: bdrv_cow_child() for bdrv_has_zero_init()'
004/43:[----] [--] 'block: bdrv_set_backing_hd() is about bs->backing'
005/43:[----] [--] 'block: Include filters when freezing backing chain'
006/43:[----] [--] 'block: Drop bdrv_is_encrypted()'
007/43:[----] [--] 'block: Add bdrv_supports_compressed_writes()'
008/43:[----] [--] 'throttle: Support compressed writes'
009/43:[----] [--] 'copy-on-read: Support compressed writes'
010/43:[0016] [FC] 'block: Use bdrv_filter_(bs|child) where obvious'
011/43:[0008] [FC] 'block: Use CAFs in block status functions'
012/43:[0017] [FC] 'stream: Deal with filters'
013/43:[0007] [FC] 'block: Use CAFs when working with backing chains'
014/43:[----] [--] 'block: Use bdrv_cow_child() in bdrv_co_truncate()'
015/43:[0009] [FC] 'block: Re-evaluate backing file handling in reopen'
016/43:[----] [--] 'block: Flush all children in generic code'
017/43:[----] [--] 'vmdk: Drop vmdk_co_flush()'
018/43:[----] [--] 'block: Iterate over children in refresh_limits'
019/43:[----] [--] 'block: Use CAFs in bdrv_refresh_filename()'
020/43:[----] [--] 'block: Use CAF in bdrv_co_rw_vmstate()'
021/43:[----] [--] 'block/snapshot: Fix fallback'
022/43:[----] [--] 'block: Use CAFs for debug breakpoints'
023/43:[0031] [FC] 'block: Improve get_allocated_file_size's default'
024/43:[0007] [FC] 'block/null: Implement bdrv_get_allocated_file_size'
025/43:[----] [--] 'blockdev: Use CAF in external_snapshot_prepare()'
026/43:[----] [--] 'block: Report data child for query-blockstats'
027/43:[0002] [FC] 'block: Use child access functions for QAPI queries'
028/43:[----] [--] 'block-copy: Use CAF to find sync=top base'
029/43:[0004] [FC] 'mirror: Deal with filters'
030/43:[----] [--] 'backup: Deal with filters'
031/43:[0020] [FC] 'commit: Deal with filters'
032/43:[----] [--] 'nbd: Use CAF when looking for dirty bitmap'
033/43:[0007] [FC] 'qemu-img: Use child access functions'
034/43:[----] [--] 'block: Drop backing_bs()'
035/43:[0052] [FC] 'blockdev: Fix active commit choice'
036/43:[0001] [FC] 'block: Inline bdrv_co_block_status_from_*()'
037/43:[0013] [FC] 'block: Leave BDS.backing_file constant'
038/43:[----] [--] 'iotests: Test that qcow2's data-file is flushed'
039/43:[----] [--] 'iotests: Let complete_and_wait() work with commit'
040/43:[0004] [FC] 'iotests: Add filter commit test cases'
041/43:[----] [--] 'iotests: Add filter mirror test cases'
042/43:[0008] [FC] 'iotests: Add test for commit in sub directory'
043/43:[----] [--] 'iotests: Test committing to overridden backing'
Max Reitz (43):
block: Add child access functions
block: Add chain helper functions
block: bdrv_cow_child() for bdrv_has_zero_init()
block: bdrv_set_backing_hd() is about bs->backing
block: Include filters when freezing backing chain
block: Drop bdrv_is_encrypted()
block: Add bdrv_supports_compressed_writes()
throttle: Support compressed writes
copy-on-read: Support compressed writes
block: Use bdrv_filter_(bs|child) where obvious
block: Use CAFs in block status functions
stream: Deal with filters
block: Use CAFs when working with backing chains
block: Use bdrv_cow_child() in bdrv_co_truncate()
block: Re-evaluate backing file handling in reopen
block: Flush all children in generic code
vmdk: Drop vmdk_co_flush()
block: Iterate over children in refresh_limits
block: Use CAFs in bdrv_refresh_filename()
block: Use CAF in bdrv_co_rw_vmstate()
block/snapshot: Fix fallback
block: Use CAFs for debug breakpoints
block: Improve get_allocated_file_size's default
block/null: Implement bdrv_get_allocated_file_size
blockdev: Use CAF in external_snapshot_prepare()
block: Report data child for query-blockstats
block: Use child access functions for QAPI queries
block-copy: Use CAF to find sync=top base
mirror: Deal with filters
backup: Deal with filters
commit: Deal with filters
nbd: Use CAF when looking for dirty bitmap
qemu-img: Use child access functions
block: Drop backing_bs()
blockdev: Fix active commit choice
block: Inline bdrv_co_block_status_from_*()
block: Leave BDS.backing_{file,format} constant
iotests: Test that qcow2's data-file is flushed
iotests: Let complete_and_wait() work with commit
iotests: Add filter commit test cases
iotests: Add filter mirror test cases
iotests: Add test for commit in sub directory
iotests: Test committing to overridden backing
qapi/block-core.json | 58 ++--
include/block/block.h | 2 +-
include/block/block_int.h | 95 ++++---
block.c | 488 ++++++++++++++++++++++++++-------
block/backup-top.c | 4 +-
block/backup.c | 9 +-
block/blkdebug.c | 7 +-
block/blklogwrites.c | 1 -
block/block-backend.c | 7 +-
block/block-copy.c | 4 +-
block/commit.c | 95 +++++--
block/copy-on-read.c | 13 +-
block/filter-compress.c | 2 -
block/io.c | 142 +++++-----
block/mirror.c | 119 ++++++--
block/monitor/block-hmp-cmds.c | 2 +-
block/null.c | 7 +
block/qapi.c | 74 +++--
block/snapshot.c | 104 +++++--
block/stream.c | 63 +++--
block/throttle.c | 11 +-
block/vmdk.c | 16 --
blockdev.c | 101 +++++--
migration/block-dirty-bitmap.c | 8 +-
nbd/server.c | 6 +-
qemu-img.c | 43 +--
tests/qemu-iotests/020 | 44 +++
tests/qemu-iotests/020.out | 10 +
tests/qemu-iotests/040 | 238 ++++++++++++++++
tests/qemu-iotests/040.out | 4 +-
tests/qemu-iotests/041 | 146 +++++++++-
tests/qemu-iotests/041.out | 4 +-
tests/qemu-iotests/153.out | 2 +-
tests/qemu-iotests/184 | 3 +-
tests/qemu-iotests/184.out | 14 +-
tests/qemu-iotests/204.out | 1 +
tests/qemu-iotests/228 | 6 +-
tests/qemu-iotests/228.out | 6 +-
tests/qemu-iotests/244 | 49 ++++
tests/qemu-iotests/244.out | 7 +
tests/qemu-iotests/245 | 4 +-
tests/qemu-iotests/273.out | 4 +-
tests/qemu-iotests/iotests.py | 10 +-
43 files changed, 1591 insertions(+), 442 deletions(-)
--
2.26.2
next reply other threads:[~2020-09-01 14:40 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 14:33 Max Reitz [this message]
2020-09-01 14:33 ` [PATCH v8 01/43] block: Add child access functions Max Reitz
2020-09-01 14:33 ` [PATCH v8 02/43] block: Add chain helper functions Max Reitz
2020-09-01 14:33 ` [PATCH v8 03/43] block: bdrv_cow_child() for bdrv_has_zero_init() Max Reitz
2020-09-01 14:33 ` [PATCH v8 04/43] block: bdrv_set_backing_hd() is about bs->backing Max Reitz
2020-09-01 14:33 ` [PATCH v8 05/43] block: Include filters when freezing backing chain Max Reitz
2020-09-01 14:33 ` [PATCH v8 06/43] block: Drop bdrv_is_encrypted() Max Reitz
2020-09-01 14:33 ` [PATCH v8 07/43] block: Add bdrv_supports_compressed_writes() Max Reitz
2020-09-01 14:33 ` [PATCH v8 08/43] throttle: Support compressed writes Max Reitz
2020-09-01 14:33 ` [PATCH v8 09/43] copy-on-read: " Max Reitz
2020-09-01 14:33 ` [PATCH v8 10/43] block: Use bdrv_filter_(bs|child) where obvious Max Reitz
2020-09-01 14:33 ` [PATCH v8 11/43] block: Use CAFs in block status functions Max Reitz
2020-09-01 14:33 ` [PATCH v8 12/43] stream: Deal with filters Max Reitz
2020-09-01 14:33 ` [PATCH v8 13/43] block: Use CAFs when working with backing chains Max Reitz
2020-09-01 14:33 ` [PATCH v8 14/43] block: Use bdrv_cow_child() in bdrv_co_truncate() Max Reitz
2020-09-01 14:33 ` [PATCH v8 15/43] block: Re-evaluate backing file handling in reopen Max Reitz
2020-09-01 14:33 ` [PATCH v8 16/43] block: Flush all children in generic code Max Reitz
2020-09-01 14:33 ` [PATCH v8 17/43] vmdk: Drop vmdk_co_flush() Max Reitz
2020-09-01 14:33 ` [PATCH v8 18/43] block: Iterate over children in refresh_limits Max Reitz
2020-09-01 14:34 ` [PATCH v8 19/43] block: Use CAFs in bdrv_refresh_filename() Max Reitz
2020-09-01 14:34 ` [PATCH v8 20/43] block: Use CAF in bdrv_co_rw_vmstate() Max Reitz
2020-09-01 14:34 ` [PATCH v8 21/43] block/snapshot: Fix fallback Max Reitz
2020-09-01 14:34 ` [PATCH v8 22/43] block: Use CAFs for debug breakpoints Max Reitz
2020-09-01 14:34 ` [PATCH v8 23/43] block: Improve get_allocated_file_size's default Max Reitz
2020-09-01 14:34 ` [PATCH v8 24/43] block/null: Implement bdrv_get_allocated_file_size Max Reitz
2020-09-01 14:34 ` [PATCH v8 25/43] blockdev: Use CAF in external_snapshot_prepare() Max Reitz
2020-09-01 14:34 ` [PATCH v8 26/43] block: Report data child for query-blockstats Max Reitz
2020-09-01 14:34 ` [PATCH v8 27/43] block: Use child access functions for QAPI queries Max Reitz
2020-09-01 14:34 ` [PATCH v8 28/43] block-copy: Use CAF to find sync=top base Max Reitz
2020-09-01 14:34 ` [PATCH v8 29/43] mirror: Deal with filters Max Reitz
2020-09-02 8:53 ` Kevin Wolf
2020-09-02 10:19 ` Max Reitz
2020-09-01 14:34 ` [PATCH v8 30/43] backup: " Max Reitz
2020-09-01 14:34 ` [PATCH v8 31/43] commit: " Max Reitz
2020-09-01 14:34 ` [PATCH v8 32/43] nbd: Use CAF when looking for dirty bitmap Max Reitz
2020-09-01 14:34 ` [PATCH v8 33/43] qemu-img: Use child access functions Max Reitz
2020-09-01 14:34 ` [PATCH v8 34/43] block: Drop backing_bs() Max Reitz
2020-09-01 14:34 ` [PATCH v8 35/43] blockdev: Fix active commit choice Max Reitz
2020-09-02 9:10 ` Kevin Wolf
2020-09-01 14:34 ` [PATCH v8 36/43] block: Inline bdrv_co_block_status_from_*() Max Reitz
2020-09-01 14:34 ` [PATCH v8 37/43] block: Leave BDS.backing_{file,format} constant Max Reitz
2020-09-01 14:34 ` [PATCH v8 38/43] iotests: Test that qcow2's data-file is flushed Max Reitz
2020-09-01 14:34 ` [PATCH v8 39/43] iotests: Let complete_and_wait() work with commit Max Reitz
2020-09-01 14:34 ` [PATCH v8 40/43] iotests: Add filter commit test cases Max Reitz
2020-09-01 14:34 ` [PATCH v8 41/43] iotests: Add filter mirror " Max Reitz
2020-09-01 14:34 ` [PATCH v8 42/43] iotests: Add test for commit in sub directory Max Reitz
2020-09-01 14:34 ` [PATCH v8 43/43] iotests: Test committing to overridden backing Max Reitz
2020-09-02 10:23 ` [PATCH v8 00/43] block: Deal with filters Kevin Wolf
2020-09-02 12:26 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200901143424.884735-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.