block: Introduce real BdrvChildRole
Status from this message: Thanks, applied to the block branch (and squashed in Eric's English
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest34 patches 19 repliesApplied
- v333 patches 29 repliesSuperseded
- v233 patches 52 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 31 patches | 6 replies | Superseded |
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/34 | block: Mark commit, mirror, blkreplay as filtersblock/ block/ block/ | +5 | 0 replies | |
| 2/34 | block: Add BlockDriver.is_formatblock/ block/ block/ +11 more | +21 | 0 replies | |
| 3/34 | block: Rename BdrvChildRole to BdrvChildClassblock.c block/ block/ +14 more | +141 | 0 replies | |
| 4/34 | block: Add BdrvChildRole and BdrvChildRoleBitsinclude/ | +56 | 1 reply | |
| 5/34 | block: Add BdrvChildRole to BdrvChildblock.c block/ block/ +28 more | +62 | 0 replies | |
| 6/34 | block: Pass BdrvChildRole to bdrv_child_perm()block.c block/ block/ +10 more | +36 | 0 replies | |
| 7/34 | block: Pass BdrvChildRole to .inherit_options()block.c block/ block/ +1 more | +30 | 0 replies | |
| 8/34 | block: Pass parent_is_format to .inherit_options()block.c block/ block/ +1 more | +30 | 0 replies | |
| 9/34 | block: Rename bdrv_inherited_options()block.c | +4 | 0 replies | |
| 10/34 | block: Add generic bdrv_inherited_options()block.c | +81 | 1 reply | |
| 11/34 | block: Use bdrv_inherited_options()block.c | +19 | 1 reply | |
| 12/34 | block: Unify bdrv_child_cb_attach()block.c | +20 | 1 reply | |
| 13/34 | block: Unify bdrv_child_cb_detach()block.c | +20 | 1 reply | |
| 14/34 | block: Add child_of_bdsblock.c include/ | +25 | 1 reply | |
| 15/34 | block: Distinguish paths in *_format_default_permsblock.c | +13 | 1 reply | |
| 16/34 | block: Pull out bdrv_default_perms_for_cow()block.c | +40 | 1 reply | |
| 17/34 | block: Pull out bdrv_default_perms_for_storage()block.c | +46 | 0 replies | |
| 18/34 | block: Relax *perms_for_storage for data childrenblock.c | +48 | 1 reply | |
| 19/34 | block: Add bdrv_default_perms()block.c include/ | +43 | 1 reply | |
| 20/34 | raw-format: Split raw_read_options()block/ | +65 | 0 replies | |
| 21/34 | block: Switch child_format users to child_of_bdsblock/ block/ | +6 | 0 replies | |
| 22/34 | block: Drop child_formatblock.c include/ | +0 | 0 replies | |
| 23/34 | block: Make backing files child_of_bds childrenblock.c block/ block/ +1 more | +30 | 1 reply | |
| 24/34 | block: Drop child_backingblock.c include/ | +3 | 1 reply | |
| 25/34 | block: Make format drivers use child_of_bdsblock/ block/ block/ +9 more | +50 | 0 replies | |
| 26/34 | block: Make filter drivers use child_of_bdsblock/ block/ block/ +5 more | +22 | 1 reply | |
| 27/34 | block: Use child_of_bds in remaining placesblock.c block/ block/ +1 more | +19 | 1 reply | |
| 28/34 | tests: Use child_of_bds instead of child_filetests/ tests/ | +21 | 0 replies | |
| 29/34 | block: Use bdrv_default_perms()block/ block/ block/ +20 more | +43 | 0 replies | |
| 30/34 | block: Make bdrv_filter_default_perms() staticblock.c include/ | +11 | 0 replies | |
| 31/34 | block: Drop bdrv_format_default_perms()block.c include/ | +0 | 0 replies | |
| 32/34 | block: Drop child_fileblock.c include/ tests/ | +5 | 1 reply | |
| 33/34 | block: Pass BdrvChildRole in remaining casesblock/ block/ | +10 | 1 reply | |
| 34/34 | block: Drop @child_class from bdrv_child_perm()block.c block/ block/ +10 more | +22 | 1 reply |
Reviews trailers per patch
33 of 34 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Blake | Alberto Garcia | Kevin Wolf |
|---|---|---|---|
| Series | R-b | ||
| 1/34 | |||
| 2/34 | R-b | R-b | |
| 3/34 | R-b | R-b | |
| 4/34 | R-b | ||
| 5/34 | R-b | ||
| 6/34 | R-b | ||
| 7/34 | R-b | ||
| 8/34 | R-b | ||
| 9/34 | R-b | ||
| 10/34 | R-b | ||
| 11/34 | R-b | ||
| 12/34 | R-b | ||
| 13/34 | R-b | ||
| 14/34 | R-b | ||
| 15/34 | R-b | ||
| 16/34 | R-b | ||
| 17/34 | R-b | ||
| 18/34 | R-b | ||
| 19/34 | R-b | ||
| 20/34 | R-b | ||
| 21/34 | R-b | ||
| 22/34 | R-b | ||
| 23/34 | R-b | ||
| 24/34 | R-b | ||
| 25/34 | R-b | ||
| 26/34 | R-b | ||
| 27/34 | R-b | ||
| 28/34 | R-b | ||
| 29/34 | R-b | ||
| 30/34 | R-b | ||
| 31/34 | R-b | ||
| 32/34 | R-b | ||
| 33/34 | R-b | ||
| 34/34 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 00/34] block: Introduce real BdrvChildRole
Based-on: <[email protected]> (“block: Do not call BlockDriver.bdrv_make_empty() directly”)
Branch: https://github.com/XanClic/qemu.git child-role-v4
Branch: https://git.xanclic.moe/XanClic/qemu.git child-role-v4
v1: https://lists.nongnu.org/archive/html/qemu-block/2019-11/msg00908.html
v2: https://lists.nongnu.org/archive/html/qemu-block/2020-02/msg00108.html
v3: https://lists.nongnu.org/archive/html/qemu-block/2020-02/msg00737.html
Hi,
For the “why” and “what” regarding this series, see the cover letter of v1 (linked above).
In v4, I mostly addressed Kevin’s comments (and one permission bug for pure data children in patch 18):
- Patch 1: Pulled in from the “Deal with filters” series (and added blkreplay to the mix)
- Patch 4: More comments, and added consistent notes on how many children may get a certain role
- Patch 10:
- Move the function down below child_backing, so that we get less forward declarations of static functions, and they’ll all be temporary
- Split the (role & (DATA | METADATA | FILTERED)) == DATA condition
into (role & DATA) && !(role & (METADATA | FILTERED))
- Fixed up the comment on how backing files are opened RO only by default
- Unconditionally let @unmap default to true for children
- Patch 11: Fallout from having moved bdrv_inherited_options() down: We need a forward declaration of bdrv_open_inherit()
- Patch 12: Move bdrv_child_cb_attach() down to bdrv_inherited_options(), and add a (temporary) forward declaration for it
- Patch 13: Same as patch 12, but for bdrv_child_detach() now
- Patch 14: Drop (now unnecessary) forward declaration of bdrv_backing_update_filename()
- Patch 16: Renamed s/for_backing/for_cow/
- Patch 18: Swapped the existing patch that split bdrv_default_perms_for_storage() function into for_data() and for_metadata() for this one, which handles both cases in the existing function, but just relaxes the restrictions for pure data children
- Also, some permissions fixed: When WRITE_UNCHANGED was taken on the parent, it may need WRITE on the the data child; and if it needs WRITE, it may also need RESIZE.
- Patch 19:
- Fallout from bdrv_default_perms_for_storage() still being a single function
- Assertions that FILTERED, COW, and DATA | METADATA are mutually exclusive
- Patch 23: Use bdrv_backing_role() instead of a fixed BDRV_CHILD_COW in bdrv_open_backing_file()
- Patch 24: Fallout from bdrv_default_perms_for_storage() still being a single function
- Patch 26: blkreplay is a filter now, too
- Patch 27: Drop blkreplay (it’s now a filter, so handled in patch 26)
- Patch 31: Fallout from bdrv_default_perms_for_storage() still being a single function
- Patch 32:
- Fallout from bdrv_default_perms_for_storage() still being a single function
- Remove the temporary forward declarations added in patches 11 through 13
- Patch 33: Pass DATA | METADATA instead of just DATA for vvfat’s qcow child
- Patch 34:
- Fallout from bdrv_default_perms_for_backing() being named bdrv_default_perms_for_cow() now
- Fallout from bdrv_default_perms_for_storage() still being a single function
git-backport-diff against v3:
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/34:[down] 'block: Mark commit, mirror, blkreplay as filters' 002/34:[----] [--] 'block: Add BlockDriver.is_format' 003/34:[----] [-C] 'block: Rename BdrvChildRole to BdrvChildClass' 004/34:[0030] [FC] 'block: Add BdrvChildRole and BdrvChildRoleBits' 005/34:[----] [-C] 'block: Add BdrvChildRole to BdrvChild' 006/34:[----] [--] 'block: Pass BdrvChildRole to bdrv_child_perm()' 007/34:[----] [-C] 'block: Pass BdrvChildRole to .inherit_options()' 008/34:[----] [--] 'block: Pass parent_is_format to .inherit_options()' 009/34:[----] [--] 'block: Rename bdrv_inherited_options()' 010/34:[0021] [FC] 'block: Add generic bdrv_inherited_options()' 011/34:[0015] [FC] 'block: Use bdrv_inherited_options()' 012/34:[0025] [FC] 'block: Unify bdrv_child_cb_attach()' 013/34:[0024] [FC] 'block: Unify bdrv_child_cb_detach()' 014/34:[0003] [FC] 'block: Add child_of_bds'
015/34:[----] [--] 'block: Distinguish paths in *_format_default_perms' 016/34:[0016] [FC] 'block: Pull out bdrv_default_perms_for_cow()' 017/34:[----] [-C] 'block: Pull out bdrv_default_perms_for_storage()' 018/34:[down] 'block: Relax *perms_for_storage for data children' 019/34:[0028] [FC] 'block: Add bdrv_default_perms()' 020/34:[----] [--] 'raw-format: Split raw_read_options()' 021/34:[----] [--] 'block: Switch child_format users to child_of_bds' 022/34:[----] [--] 'block: Drop child_format'
023/34:[0002] [FC] 'block: Make backing files child_of_bds children' 024/34:[0010] [FC] 'block: Drop child_backing'
025/34:[----] [--] 'block: Make format drivers use child_of_bds' 026/34:[0005] [FC] 'block: Make filter drivers use child_of_bds' 027/34:[0005] [FC] 'block: Use child_of_bds in remaining places' 028/34:[----] [--] 'tests: Use child_of_bds instead of child_file' 029/34:[----] [-C] 'block: Use bdrv_default_perms()' 030/34:[----] [--] 'block: Make bdrv_filter_default_perms() static' 031/34:[0004] [FC] 'block: Drop bdrv_format_default_perms()' 032/34:[0013] [FC] 'block: Drop child_file'
033/34:[0004] [FC] 'block: Pass BdrvChildRole in remaining cases' 034/34:[0024] [FC] 'block: Drop @child_class from bdrv_child_perm()'
Max Reitz (34):
block: Mark commit, mirror, blkreplay as filters
block: Add BlockDriver.is_format
block: Rename BdrvChildRole to BdrvChildClass
block: Add BdrvChildRole and BdrvChildRoleBits
block: Add BdrvChildRole to BdrvChild
block: Pass BdrvChildRole to bdrv_child_perm()
block: Pass BdrvChildRole to .inherit_options()
block: Pass parent_is_format to .inherit_options()
block: Rename bdrv_inherited_options()
block: Add generic bdrv_inherited_options()
block: Use bdrv_inherited_options()
block: Unify bdrv_child_cb_attach()
block: Unify bdrv_child_cb_detach()
block: Add child_of_bds
block: Distinguish paths in *_format_default_perms
block: Pull out bdrv_default_perms_for_cow()
block: Pull out bdrv_default_perms_for_storage()
block: Relax *perms_for_storage for data children
block: Add bdrv_default_perms()
raw-format: Split raw_read_options()
block: Switch child_format users to child_of_bds
block: Drop child_format
block: Make backing files child_of_bds children
block: Drop child_backing
block: Make format drivers use child_of_bds
block: Make filter drivers use child_of_bds
block: Use child_of_bds in remaining places
tests: Use child_of_bds instead of child_file
block: Use bdrv_default_perms()
block: Make bdrv_filter_default_perms() static
block: Drop bdrv_format_default_perms()
block: Drop child_file
block: Pass BdrvChildRole in remaining cases
block: Drop @child_class from bdrv_child_perm()
include/block/block.h | 64 +++- include/block/block_int.h | 57 ++-- block.c | 578 ++++++++++++++++++++++-------------- block/backup-top.c | 11 +- block/blkdebug.c | 10 +- block/blklogwrites.c | 16 +- block/blkreplay.c | 8 +- block/blkverify.c | 10 +- block/block-backend.c | 20 +- block/bochs.c | 7 +- block/cloop.c | 7 +- block/commit.c | 4 +- block/copy-on-read.c | 7 +- block/crypto.c | 8 +- block/dmg.c | 7 +- block/filter-compress.c | 7 +- block/io.c | 22 +- block/mirror.c | 4 +- block/parallels.c | 7 +- block/qcow.c | 7 +- block/qcow2.c | 20 +- block/qed.c | 7 +- block/quorum.c | 8 +- block/raw-format.c | 128 +++++--- block/replication.c | 5 +- block/throttle.c | 7 +- block/vdi.c | 7 +- block/vhdx.c | 7 +- block/vmdk.c | 23 +- block/vpc.c | 7 +- block/vvfat.c | 13 +- blockjob.c | 7 +- tests/test-bdrv-drain.c | 72 ++--- tests/test-bdrv-graph-mod.c | 10 +- tests/test-block-iothread.c | 17 +- 35 files changed, 738 insertions(+), 461 deletions(-)
Signature · 1 line
2.26.2