WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch 3/6] xenblk: Add O_DIRECT and O_SYNC support -- front

[patch 3/6] xenblk: Add O_DIRECT and O_SYNC support -- frontend.

If requests submited with REQ_RW_SYNC flag, pass the flag to backend.

Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
---

diff -r 2fb13b8cbe13 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c   Thu Oct 30 13:34:43 2008 +0000
+++ b/drivers/xen/blkfront/blkfront.c   Mon Nov 03 10:31:41 2008 +0800
@@ -621,6 +621,8 @@
                BLKIF_OP_WRITE : BLKIF_OP_READ;
        if (blk_barrier_rq(req))
                ring_req->operation = BLKIF_OP_WRITE_BARRIER;
+       if (blk_rw_sync_rq(req))
+               set_rw_sync(ring_req);
 
        ring_req->nr_segments = 0;
        rq_for_each_bio (bio, req) {
@@ -745,7 +747,7 @@
                ADD_ID_TO_FREELIST(info, id);
 
                uptodate = (bret->status == BLKIF_RSP_OKAY);
-               switch (bret->operation) {
+               switch (BLKIF_OP(bret->operation)) {
                case BLKIF_OP_WRITE_BARRIER:
                        if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
                                printk("blkfront: %s: write barrier op 
failed\n",





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel