[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, r
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER |
Date: |
Wed, 25 Apr 2012 10:45:24 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
> - case BLKIF_OP_WRITE_BARRIER:
> + case BLKIF_OP_FLUSH_DISKCACHE:
> if (!ioreq->req.nr_segments) {
> ioreq->presync = 1;
> return 0;
> }
> - ioreq->presync = ioreq->postsync = 1;
> + ioreq->postsync = 1;
> /* fall through */
It might be worth documenting the semantics of BLKIF_OP_FLUSH_DISKCACHE
in a comment here. I haven't found any spec for the xen_disk protocol,
but from looking at the Linux frontend it seems like the semantics
of REQ_FLUSH and REQ_FUA in the Linux block driver are overloaded into
BLKIF_OP_FLUSH_DISKCACHE, which is fairly confusing given that REQ_FLUSH
already overload functionality.
Even worse REQ_FLUSH with a payload implies a preflush, while REQ_FUA
implies a post flush, and it seems like Xen has no way to distinguish
the two, making thing like log writes very inefficient.
Independent of that the implementation should really use a state machine
around bdrv_aio_flush instead of doing guest-sychronous bdrv_flush calls.
- [Qemu-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Stefano Stabellini, 2012/04/16
- Re: [Qemu-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Konrad Rzeszutek Wilk, 2012/04/16
- Re: [Qemu-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER,
Christoph Hellwig <=
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Ian Campbell, 2012/04/25
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Christoph Hellwig, 2012/04/25
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Stefano Stabellini, 2012/04/25
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Ian Campbell, 2012/04/25
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Christoph Hellwig, 2012/04/25
- Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER, Konrad Rzeszutek Wilk, 2012/04/26