aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-01-14 18:30:30 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-01-14 18:30:30 +0000
commit7e7b7cba16faa7b721b822fa9ed8bebafa35700f (patch)
treea179e9a1d551c1264991a7777c50581d0ea5f179
parent9e496d7458bb01b717afe22db10a724db57d53fd (diff)
xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
-rw-r--r--hw/xen_disk.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 9ee72a0ded..7fea87156d 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -243,12 +243,11 @@ static int ioreq_parse(struct ioreq *ioreq)
case BLKIF_OP_READ:
ioreq->prot = PROT_WRITE; /* to memory */
break;
- case BLKIF_OP_WRITE_BARRIER:
+ case BLKIF_OP_FLUSH_DISKCACHE:
+ ioreq->presync = 1;
if (!ioreq->req.nr_segments) {
- ioreq->presync = 1;
return 0;
}
- ioreq->presync = ioreq->postsync = 1;
/* fall through */
case BLKIF_OP_WRITE:
ioreq->prot = PROT_READ; /* from memory */
@@ -509,7 +508,7 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
qemu_aio_complete, ioreq);
break;
case BLKIF_OP_WRITE:
- case BLKIF_OP_WRITE_BARRIER:
+ case BLKIF_OP_FLUSH_DISKCACHE:
if (!ioreq->req.nr_segments) {
break;
}
@@ -794,7 +793,7 @@ static int blk_init(struct XenDevice *xendev)
blkdev->file_size, blkdev->file_size >> 20);
/* fill info */
- xenstore_write_be_int(&blkdev->xendev, "feature-barrier", 1);
+ 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", blkdev->file_blk);