block: Use blk_make_empty() after commits
commit2d97fde43991829f74e1e258bb82031605bf9bca
authorMax Reitz <mreitz@redhat.com>
Wed, 29 Apr 2020 14:11:26 +0000 (29 16:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 May 2020 17:05:25 +0000 (18 19:05 +0200)
tree49987a318be3fbebcdcd0a2726cec8d2c7ac41d1
parent2b7bbdbdefe203cf8468c61b4217e578981d6fce
block: Use blk_make_empty() after commits

bdrv_commit() already has a BlockBackend pointing to the BDS that we
want to empty, it just has the wrong permissions.

qemu-img commit has no BlockBackend pointing to the old backing file
yet, but introducing one is simple.

After this commit, bdrv_make_empty() is the only remaining caller of
BlockDriver.bdrv_make_empty().

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200429141126.85159-5-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[kwolf: Fixed up reference output for 098]
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/commit.c
qemu-img.c
tests/qemu-iotests/098.out