[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new fro
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect |
Date: |
Tue, 2 Apr 2013 12:08:25 +0100 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Mon, 1 Apr 2013, Alex Bligh wrote:
> Stefano,
>
> --On 1 April 2013 16:44:05 +0100 Stefano Stabellini
> <address@hidden> wrote:
>
> >> Note this patch is compile-tested only.
> >
> > I think the patch looks good, just a minor comment.
>
> Thanks. I guess I ought to actually test it works then :-)
>
> >> + /* fill info
> >> + * Temporarily write zero sectors as we won't know file size until
> >> + * bdrv_new has been called. blk_connect corrects this.
> >> + */
> >> + xenstore_write_be_int(&blkdev->xendev, "feature-flush-cache", 1);
> >> + xenstore_write_be_int(&blkdev->xendev, "feature-persistent", 1);
> >> + xenstore_write_be_int(&blkdev->xendev, "info", info);
> >> + xenstore_write_be_int(&blkdev->xendev, "sector-size", BLOCK_SIZE);
> >> + xenstore_write_be_int(&blkdev->xendev, "sectors", 0);
> >> + return 0;
> >
> > There is no need to fill the sector-size and sectors info here, you can
> > do it later in blk_connect.
>
> My concern (not knowing how xenstore works) was the possibility of leaving
> them as uninitialized values. I'm taking it that if I don't initialise
> them, the key is just absent - correct?
Right
> I'll redo and move setting sector-size and sectors into blk_connect, and
> then add a second commit which removes BDRV_O_NOCACHE. Oh, and test it ...
Good :)
- [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/01
- Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Stefano Stabellini, 2013/04/01
- Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/01
- Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect,
Stefano Stabellini <=
- [Qemu-devel] [PATCHv2 1/2] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/05
- [Qemu-devel] [PATCHv2 2/2] Xen PV backend: Disable use of O_DIRECT by default as it results in crashes., Alex Bligh, 2013/04/05
- Re: [Qemu-devel] [PATCHv2 1/2] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Stefano Stabellini, 2013/04/05
- [Qemu-devel] [PATCHv3 1/2] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/05
- [Qemu-devel] [PATCHv3 2/2] Xen PV backend: Disable use of O_DIRECT by default as it results in crashes., Alex Bligh, 2013/04/05
- Re: [Qemu-devel] [PATCHv2 1/2] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/05
- [Qemu-devel] [PATCHv2 1/2] Xen PV backend (for qemu-upstream-4.2-testing): Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/05
- [Qemu-devel] [PATCHv2 2/2] Xen PV backend (for qemu-upstream-4.2-testing): Disable use of O_DIRECT by default as it results in crashes., Alex Bligh, 2013/04/05
- Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect, Alex Bligh, 2013/04/05