* [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE
@ 2012-03-27 15:48 Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO Stefano Stabellini
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-03-27 15:48 UTC (permalink / raw)
To: Anthony Liguori; +Cc: aliguori, Stefano Stabellini, qemu-stable, qemu-devel
Anthony,
please pull this small patch series that allows xen_disk to be used
correctly with NATIVE_AIO and O_DIRECT.
This series should be backported to the stable branch too.
Stefano Stabellini (2):
xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
xen_disk: when using AIO flush after the operation is completed
hw/xen_disk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
git://xenbits.xen.org/people/sstabellini/qemu-dm.git disk_io
Cheers,
Stefano
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
2012-03-27 15:48 [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Stefano Stabellini
@ 2012-03-27 15:50 ` Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 2/2] xen_disk: when using AIO flush after the operation is completed Stefano Stabellini
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-03-27 15:50 UTC (permalink / raw)
To: anthony; +Cc: aliguori, Stefano Stabellini, qemu-stable, qemu-devel
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
hw/xen_disk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 68fa36a..0f265a4 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -584,10 +584,10 @@ static int blk_init(struct XenDevice *xendev)
}
/* read-only ? */
+ qflags = BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO;
if (strcmp(blkdev->mode, "w") == 0) {
- qflags = BDRV_O_RDWR;
+ qflags |= BDRV_O_RDWR;
} else {
- qflags = 0;
info |= VDISK_READONLY;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/2] xen_disk: when using AIO flush after the operation is completed
2012-03-27 15:48 [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO Stefano Stabellini
@ 2012-03-27 15:50 ` Stefano Stabellini
2012-03-27 16:11 ` [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Christoph Hellwig
2012-03-30 13:12 ` Anthony Liguori
3 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-03-27 15:50 UTC (permalink / raw)
To: anthony; +Cc: aliguori, Stefano Stabellini, qemu-stable, qemu-devel
If ioreq->postsync call bdrv_flush when the AIO operation is actually
completed.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
hw/xen_disk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 0f265a4..9cb0253 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -330,6 +330,9 @@ static void qemu_aio_complete(void *opaque, int ret)
if (ioreq->aio_inflight > 0) {
return;
}
+ if (ioreq->postsync) {
+ bdrv_flush(ioreq->blkdev->bs);
+ }
ioreq->status = ioreq->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY;
ioreq_unmap(ioreq);
@@ -376,9 +379,6 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
goto err;
}
- if (ioreq->postsync) {
- bdrv_flush(blkdev->bs); /* FIXME: aio_flush() ??? */
- }
qemu_aio_complete(ioreq, 0);
return 0;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE
2012-03-27 15:48 [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 2/2] xen_disk: when using AIO flush after the operation is completed Stefano Stabellini
@ 2012-03-27 16:11 ` Christoph Hellwig
2012-03-27 16:20 ` Stefano Stabellini
2012-03-30 13:12 ` Anthony Liguori
3 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2012-03-27 16:11 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: aliguori, qemu-stable, Anthony Liguori, qemu-devel
On Tue, Mar 27, 2012 at 04:48:19PM +0100, Stefano Stabellini wrote:
> Anthony,
> please pull this small patch series that allows xen_disk to be used
> correctly with NATIVE_AIO and O_DIRECT.
>
> This series should be backported to the stable branch too.
Any plans to add BLKIF_OP_FLUSH_DISKCACHE support to xen_disk? Unlike
the old bnroken Xen barrier scheme this actually implements pure flushes
for fdatasync or blockdevice O_SYNC I/O corectly, and for modern Linux
kernels it actually will be quite a bit faster, too.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE
2012-03-27 16:11 ` [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Christoph Hellwig
@ 2012-03-27 16:20 ` Stefano Stabellini
0 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-03-27 16:20 UTC (permalink / raw)
To: Christoph Hellwig
Cc: qemu-devel@nongnu.org, aliguori@us.ibm.com,
qemu-stable@nongnu.org, Anthony Liguori, Stefano Stabellini
On Tue, 27 Mar 2012, Christoph Hellwig wrote:
> On Tue, Mar 27, 2012 at 04:48:19PM +0100, Stefano Stabellini wrote:
> > Anthony,
> > please pull this small patch series that allows xen_disk to be used
> > correctly with NATIVE_AIO and O_DIRECT.
> >
> > This series should be backported to the stable branch too.
>
> Any plans to add BLKIF_OP_FLUSH_DISKCACHE support to xen_disk? Unlike
> the old bnroken Xen barrier scheme this actually implements pure flushes
> for fdatasync or blockdevice O_SYNC I/O corectly, and for modern Linux
> kernels it actually will be quite a bit faster, too.
Yeah, that's a good suggestion, it shouldn't be hard either.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE
2012-03-27 15:48 [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Stefano Stabellini
` (2 preceding siblings ...)
2012-03-27 16:11 ` [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Christoph Hellwig
@ 2012-03-30 13:12 ` Anthony Liguori
3 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2012-03-30 13:12 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: aliguori, qemu-stable, qemu-devel
On 03/27/2012 10:48 AM, Stefano Stabellini wrote:
> Anthony,
> please pull this small patch series that allows xen_disk to be used
> correctly with NATIVE_AIO and O_DIRECT.
>
> This series should be backported to the stable branch too.
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Stefano Stabellini (2):
> xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
> xen_disk: when using AIO flush after the operation is completed
>
> hw/xen_disk.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> git://xenbits.xen.org/people/sstabellini/qemu-dm.git disk_io
>
> Cheers,
>
> Stefano
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-30 13:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 15:48 [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO Stefano Stabellini
2012-03-27 15:50 ` [Qemu-devel] [PATCH 2/2] xen_disk: when using AIO flush after the operation is completed Stefano Stabellini
2012-03-27 16:11 ` [Qemu-devel] [PULL 0/2] xen_disk: use NATIVE_AIO and NOCACHE Christoph Hellwig
2012-03-27 16:20 ` Stefano Stabellini
2012-03-30 13:12 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).