qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly
@ 2020-04-29 14:11 Max Reitz
  2020-04-29 14:11 ` [PATCH v2 1/4] block: Add bdrv_make_empty() Max Reitz
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Max Reitz @ 2020-04-29 14:11 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, qemu-devel, Max Reitz

v1: https://lists.nongnu.org/archive/html/qemu-block/2020-04/msg01245.html

Branch: https://github.com/XanClic/qemu.git fix-bdrv_make_empty-v2
Branch: https://git.xanclic.moe/XanClic/qemu.git fix-bdrv_make_empty-v2

Based-on: <20200428192648.749066-1-eblake@redhat.com>
          (“qcow2: Allow resize of images with internal snapshots”)

Hi,

As described in v1’s cover letter (linked above), this series ensures
that all calls to BlockDriver.bdrv_make_empty() go through a wrapper
bdrv_make_empty() function that ensures the caller does have the
necessary permissions.


Changes in v2 (thanks for the quick reviews, I didn’t expect this series
to get attention so quickly :)):
- Added Based-on here in the cover letter [Eric]
- Patch 1: WRITE_UNCHANGED is sufficient [Kevin]
- Patch 3: Check whether blk->root is actually present with
           blk_is_available() [Kevin]
- Patch 4: Let bdrv_commit() only take the WRITE_UNCHANGED permission,
           and take it from the moment the @src BB is created and @bs is
           inserted [Kevin];
           then drop the drv->bdrv_make_empty check, just call
           blk_make_empty() and ignore -ENOTSUP [Eric]


git-backport-diff against v1:

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/4:[0002] [FC] 'block: Add bdrv_make_empty()'
002/4:[----] [--] 'block: Use bdrv_make_empty() where possible'
003/4:[0005] [FC] 'block: Add blk_make_empty()'
004/4:[0020] [FC] 'block: Use blk_make_empty() after commits'


Max Reitz (4):
  block: Add bdrv_make_empty()
  block: Use bdrv_make_empty() where possible
  block: Add blk_make_empty()
  block: Use blk_make_empty() after commits

 include/block/block.h          |  1 +
 include/sysemu/block-backend.h |  2 ++
 block.c                        | 23 +++++++++++++++++++++++
 block/block-backend.c          | 10 ++++++++++
 block/commit.c                 | 16 +++++++++-------
 block/replication.c            |  6 ++----
 block/vvfat.c                  |  4 +---
 qemu-img.c                     | 19 ++++++++++++++-----
 8 files changed, 62 insertions(+), 19 deletions(-)

-- 
2.25.4



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

end of thread, other threads:[~2020-05-15 10:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-29 14:11 [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly Max Reitz
2020-04-29 14:11 ` [PATCH v2 1/4] block: Add bdrv_make_empty() Max Reitz
2020-04-29 14:51   ` Eric Blake
2020-04-29 14:11 ` [PATCH v2 2/4] block: Use bdrv_make_empty() where possible Max Reitz
2020-04-29 14:11 ` [PATCH v2 3/4] block: Add blk_make_empty() Max Reitz
2020-04-29 14:52   ` Eric Blake
2020-04-29 14:11 ` [PATCH v2 4/4] block: Use blk_make_empty() after commits Max Reitz
2020-04-29 14:17   ` Max Reitz
2020-04-29 14:55   ` Eric Blake
2020-04-29 19:07 ` [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly no-reply
2020-04-29 19:11 ` no-reply
2020-04-29 19:15 ` no-reply
2020-04-29 23:37 ` no-reply
2020-04-29 23:41 ` no-reply
2020-05-14 13:08 ` Kevin Wolf
2020-05-15 10:36   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).