Xen PV backend: Move call to bdrv_new from blk_init to blk_connect
authorAlex Bligh <alex@alex.org.uk>
Fri, 5 Apr 2013 15:45:10 +0000 (15:45 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 5 Apr 2013 15:45:10 +0000 (15:45 +0000)
commit86f425db3b1c4b6c4a2927eaec35627f9ab2e703
tree5c854568e4edb936a6913ac1aeed3e87f33ad35f
parentd05ef160453e98546a4197496dc8a3cb2defac53
Xen PV backend: Move call to bdrv_new from blk_init to blk_connect

This commit delays the point at which bdrv_new (and hence blk_open
on the underlying device) is called from blk_init to blk_connect.
This ensures that in an inbound live migrate, the block device is
not opened until it has been closed at the other end. This is in
preparation for supporting devices with open/close consistency
without using O_DIRECT. This commit does NOT itself change O_DIRECT
semantics.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen_disk.c