]> git.proxmox.com Git - mirror_qemu.git/commit
block: bdrv_append(): don't consume reference
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 28 Apr 2021 15:17:32 +0000 (18:17 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 Apr 2021 10:27:47 +0000 (12:27 +0200)
commitae9d441706d7b7d624a342b464136804b3b7bc3a
tree77826e48fadf6d93e679b04e533970a96694627c
parent397f7cc0c217cfe45f42ee21e2ad5b84f3333b67
block: bdrv_append(): don't consume reference

We have too much comments for this feature. It seems better just don't
do it. Most of real users (tests don't count) have to create additional
reference.

Drop also comment in external_snapshot_prepare:
 - bdrv_append doesn't "remove" old bs in common sense, it sounds
   strange
 - the fact that bdrv_append can fail is obvious from the context
 - the fact that we must rollback all changes in transaction abort is
   known (it's the direct role of abort)

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210428151804.439460-5-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/backup-top.c
block/commit.c
block/mirror.c
blockdev.c
tests/unit/test-bdrv-drain.c
tests/unit/test-bdrv-graph-mod.c