block: Do not call BlockDriver.bdrv_make_empty() directly
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 6 repliesIn review
- v14 patches 20 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | block: Add bdrv_make_empty()block.c include/ | +24 | 1 reply | |
| 2/4 | block: Use bdrv_make_empty() where possibleblock/ block/ | +3 | 0 replies | |
| 3/4 | block: Add blk_make_empty()block/ include/ | +12 | 1 reply | |
| 4/4 | block: Use blk_make_empty() after commitsblock/ qemu-img.c | +23 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake | Kevin Wolf |
|---|---|---|
| 1/4 | R-b | |
| 2/4 | R-b | R-b |
| 3/4 | R-b | |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly
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: <[email protected]>
(“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(-)
Signature · 1 line
2.25.4