]> git.proxmox.com Git - mirror_qemu.git/commit - block/io.c
block: Use bdrv_filter_(bs|child) where obvious
authorMax Reitz <mreitz@redhat.com>
Wed, 12 Jun 2019 15:03:38 +0000 (17:03 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 10:31:31 +0000 (12:31 +0200)
commit93393e698c76c9b95b1fcf9649eef41f9cdbbb07
tree4efe6b10f5caf6cfe4b75a15812aff8703e4df95
parent4935e8be22745ff2b23bc87a5015176d991ce233
block: Use bdrv_filter_(bs|child) where obvious

Places that use patterns like

    if (bs->drv->is_filter && bs->file) {
        ... something about bs->file->bs ...
    }

should be

    BlockDriverState *filtered = bdrv_filter_bs(bs);
    if (filtered) {
        ... something about @filtered ...
    }

instead.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/io.c
migration/block-dirty-bitmap.c