mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
block-backend: Remember if attached device is non-qdev
Almost all block devices are qdevified by now. This allows us to go back from the BlockBackend to the DeviceState. xen_disk is the last device that is missing. We'll remember in the BlockBackend if a xen_disk is attached and can then disable any features that require going from a BB to the DeviceState. While at it, clearly mark the function used by xen_disk as legacy even in its name, not just in TODO comments. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
2bf7e10f78
commit
bbc8ea98bc
3 changed files with 23 additions and 11 deletions
|
@ -1079,7 +1079,7 @@ static int blk_connect(struct XenDevice *xendev)
|
|||
* so we can blk_unref() unconditionally */
|
||||
blk_ref(blkdev->blk);
|
||||
}
|
||||
blk_attach_dev_nofail(blkdev->blk, blkdev);
|
||||
blk_attach_dev_legacy(blkdev->blk, blkdev);
|
||||
blkdev->file_size = blk_getlength(blkdev->blk);
|
||||
if (blkdev->file_size < 0) {
|
||||
BlockDriverState *bs = blk_bs(blkdev->blk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue