From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly
Date: Wed, 29 Apr 2020 16:11:22 +0200 [thread overview]
Message-ID: <20200429141126.85159-1-mreitz@redhat.com> (raw)
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
next reply other threads:[~2020-04-29 14:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 14:11 Max Reitz [this message]
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
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=20200429141126.85159-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 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).