[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/51] block: Use bdrv_make_empty() where possible
From: |
Kevin Wolf |
Subject: |
[PULL 12/51] block: Use bdrv_make_empty() where possible |
Date: |
Fri, 15 May 2020 14:44:42 +0200 |
From: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/replication.c | 3 +--
block/vvfat.c | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/replication.c b/block/replication.c
index eb480a8e08..9a9f36e524 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -331,9 +331,8 @@ static void secondary_do_checkpoint(BDRVReplicationState
*s, Error **errp)
return;
}
- ret = s->active_disk->bs->drv->bdrv_make_empty(s->active_disk->bs);
+ ret = bdrv_make_empty(s->active_disk, errp);
if (ret < 0) {
- error_setg(errp, "Cannot make active disk empty");
return;
}
diff --git a/block/vvfat.c b/block/vvfat.c
index 6d5c090dec..34c121c07a 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2960,9 +2960,7 @@ static int do_commit(BDRVVVFATState* s)
return ret;
}
- if (s->qcow->bs->drv && s->qcow->bs->drv->bdrv_make_empty) {
- s->qcow->bs->drv->bdrv_make_empty(s->qcow->bs);
- }
+ bdrv_make_empty(s->qcow, NULL);
memset(s->used_clusters, 0, sector2cluster(s, s->sector_count));
--
2.25.4
- [PULL 00/51] Block layer patches, Kevin Wolf, 2020/05/15
- [PULL 01/51] iotests/109: Don't mirror with mismatched size, Kevin Wolf, 2020/05/15
- [PULL 02/51] iotests/229: Use blkdebug to inject an error, Kevin Wolf, 2020/05/15
- [PULL 03/51] mirror: Make sure that source and target size match, Kevin Wolf, 2020/05/15
- [PULL 05/51] block/replication.c: Avoid cancelling the job twice, Kevin Wolf, 2020/05/15
- [PULL 04/51] iotests: Mirror with different source/target size, Kevin Wolf, 2020/05/15
- [PULL 06/51] iotests: Fix incomplete type declarations, Kevin Wolf, 2020/05/15
- [PULL 08/51] block: Add bdrv_make_empty(), Kevin Wolf, 2020/05/15
- [PULL 09/51] block: Add blk_make_empty(), Kevin Wolf, 2020/05/15
- [PULL 10/51] block: Use blk_make_empty() after commits, Kevin Wolf, 2020/05/15
- [PULL 12/51] block: Use bdrv_make_empty() where possible,
Kevin Wolf <=
- [PULL 07/51] iotests: Run pylint and mypy in a testcase, Kevin Wolf, 2020/05/15
- [PULL 11/51] replication: Avoid blk_make_empty() on read-only child, Kevin Wolf, 2020/05/15
- [PULL 13/51] block: Mark commit, mirror, blkreplay as filters, Kevin Wolf, 2020/05/15
- [PULL 15/51] block: Rename BdrvChildRole to BdrvChildClass, Kevin Wolf, 2020/05/15
- [PULL 16/51] block: Add BdrvChildRole and BdrvChildRoleBits, Kevin Wolf, 2020/05/15
- [PULL 17/51] block: Add BdrvChildRole to BdrvChild, Kevin Wolf, 2020/05/15
- [PULL 19/51] block: Pass BdrvChildRole to .inherit_options(), Kevin Wolf, 2020/05/15
- [PULL 14/51] block: Add BlockDriver.is_format, Kevin Wolf, 2020/05/15
- [PULL 22/51] block: Add generic bdrv_inherited_options(), Kevin Wolf, 2020/05/15
- [PULL 23/51] block: Use bdrv_inherited_options(), Kevin Wolf, 2020/05/15