All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/34] block: Introduce real BdrvChildRole
@ 2020-05-13 11:05 Max Reitz
  2020-05-13 11:05 ` [PATCH v4 01/34] block: Mark commit, mirror, blkreplay as filters Max Reitz
                   ` (35 more replies)
  0 siblings, 36 replies; 54+ messages in thread
From: Max Reitz @ 2020-05-13 11:05 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, qemu-devel, Max Reitz

Based-on: <20200429141126.85159-1-mreitz@redhat.com>
(“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(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2020-05-14 13:46 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 11:05 [PATCH v4 00/34] block: Introduce real BdrvChildRole Max Reitz
2020-05-13 11:05 ` [PATCH v4 01/34] block: Mark commit, mirror, blkreplay as filters Max Reitz
2020-05-13 11:05 ` [PATCH v4 02/34] block: Add BlockDriver.is_format Max Reitz
2020-05-13 11:05 ` [PATCH v4 03/34] block: Rename BdrvChildRole to BdrvChildClass Max Reitz
2020-05-13 11:05 ` [PATCH v4 04/34] block: Add BdrvChildRole and BdrvChildRoleBits Max Reitz
2020-05-13 17:36   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 05/34] block: Add BdrvChildRole to BdrvChild Max Reitz
2020-05-13 11:05 ` [PATCH v4 06/34] block: Pass BdrvChildRole to bdrv_child_perm() Max Reitz
2020-05-13 11:05 ` [PATCH v4 07/34] block: Pass BdrvChildRole to .inherit_options() Max Reitz
2020-05-13 11:05 ` [PATCH v4 08/34] block: Pass parent_is_format " Max Reitz
2020-05-13 11:05 ` [PATCH v4 09/34] block: Rename bdrv_inherited_options() Max Reitz
2020-05-13 11:05 ` [PATCH v4 10/34] block: Add generic bdrv_inherited_options() Max Reitz
2020-05-13 20:13   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 11/34] block: Use bdrv_inherited_options() Max Reitz
2020-05-13 20:18   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 12/34] block: Unify bdrv_child_cb_attach() Max Reitz
2020-05-13 20:26   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 13/34] block: Unify bdrv_child_cb_detach() Max Reitz
2020-05-13 20:27   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 14/34] block: Add child_of_bds Max Reitz
2020-05-13 20:29   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 15/34] block: Distinguish paths in *_format_default_perms Max Reitz
2020-05-13 20:30   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 16/34] block: Pull out bdrv_default_perms_for_cow() Max Reitz
2020-05-13 20:33   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 17/34] block: Pull out bdrv_default_perms_for_storage() Max Reitz
2020-05-13 11:05 ` [PATCH v4 18/34] block: Relax *perms_for_storage for data children Max Reitz
2020-05-13 20:38   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 19/34] block: Add bdrv_default_perms() Max Reitz
2020-05-13 20:43   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 20/34] raw-format: Split raw_read_options() Max Reitz
2020-05-13 11:05 ` [PATCH v4 21/34] block: Switch child_format users to child_of_bds Max Reitz
2020-05-13 11:05 ` [PATCH v4 22/34] block: Drop child_format Max Reitz
2020-05-13 11:05 ` [PATCH v4 23/34] block: Make backing files child_of_bds children Max Reitz
2020-05-13 20:46   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 24/34] block: Drop child_backing Max Reitz
2020-05-13 20:47   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 25/34] block: Make format drivers use child_of_bds Max Reitz
2020-05-13 11:05 ` [PATCH v4 26/34] block: Make filter " Max Reitz
2020-05-13 21:02   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 27/34] block: Use child_of_bds in remaining places Max Reitz
2020-05-13 21:08   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 28/34] tests: Use child_of_bds instead of child_file Max Reitz
2020-05-13 11:05 ` [PATCH v4 29/34] block: Use bdrv_default_perms() Max Reitz
2020-05-13 11:05 ` [PATCH v4 30/34] block: Make bdrv_filter_default_perms() static Max Reitz
2020-05-13 11:05 ` [PATCH v4 31/34] block: Drop bdrv_format_default_perms() Max Reitz
2020-05-13 11:05 ` [PATCH v4 32/34] block: Drop child_file Max Reitz
2020-05-13 21:11   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 33/34] block: Pass BdrvChildRole in remaining cases Max Reitz
2020-05-13 21:12   ` Eric Blake
2020-05-13 11:05 ` [PATCH v4 34/34] block: Drop @child_class from bdrv_child_perm() Max Reitz
2020-05-13 21:15   ` Eric Blake
2020-05-13 16:36 ` [PATCH v4 00/34] block: Introduce real BdrvChildRole Kevin Wolf
2020-05-14 13:44 ` Kevin Wolf

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.