[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.
- To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Wed, 20 Mar 2013 08:33:02 +0000
- Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx, xen-devel <xen-devel@xxxxxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>, Alex Bligh <alex@xxxxxxxxxxx>
- Delivery-date: Wed, 20 Mar 2013 08:33:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Stefano,
--On 19 March 2013 15:13:29 +0000 Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
Therefore I think that the current change is not safe, but it is pretty
easy to make it safe.
You just need to move the call to blk_open from blk_init to blk_connect.
Actually you can move most of blk_init to blk_connect, you just need to
keep the 4 xenstore_write_be_int at the end of the function.
The final of these 4 writes in blk_init is:
xenstore_write_be_int(&blkdev->xendev, "sectors",
blkdev->file_size / blkdev->file_blk);
and blkdev->filesize comes from bdrv_getlength(blkdev->bs), and that
requires (I think) bdrv_open to have been called. Can these
4 writes move safely to blk_connect? Or can we write the sectors
count as (say) 0 here and fix it later in blk_connect? The remainder
look ok.
--
Alex Bligh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|