[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/3] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER



Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 hw/xen_disk.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 900f456..8181af9 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -181,13 +181,13 @@ 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:
         if (!ioreq->req.nr_segments) {
             ioreq->presync = 1;
             return 0;
         }
        if (!syncwrite)
-           ioreq->presync = ioreq->postsync = 1;
+        ioreq->postsync = 1;
        /* fall through */
     case BLKIF_OP_WRITE:
        ioreq->prot = PROT_READ; /* from memory */
@@ -333,7 +333,7 @@ static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
        }
        break;
     case BLKIF_OP_WRITE:
-    case BLKIF_OP_WRITE_BARRIER:
+    case BLKIF_OP_FLUSH_DISKCACHE:
         if (!ioreq->req.nr_segments)
             break;
        pos = ioreq->start;
@@ -669,7 +669,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", have_barriers);
+    xenstore_write_be_int(&blkdev->xendev, "feature-flush-cache", 1);
     xenstore_write_be_int(&blkdev->xendev, "info",            info);
     xenstore_write_be_int(&blkdev->xendev, "sector-size",     
blkdev->file_blk);
     xenstore_write_be_int(&blkdev->xendev, "sectors",
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.