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

[Xen-changelog] [xen master] Revert "blktap2: Use RING_COPY_REQUEST"



commit 744fe0347d584f8b80b91ece93ef87e903c41bfa
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu May 12 14:24:39 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu May 12 14:24:39 2016 +0200

    Revert "blktap2: Use RING_COPY_REQUEST"
    
    This reverts commit 19f6c522a6a9599317ee1d8c4a155d1400d04c89. It
    did wrongly get associated with XSA-155, and was (rightfully) never
    backported to any of the stable trees. See also
    http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg00571.html.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/blktap2/drivers/block-log.c   | 3 +--
 tools/blktap2/drivers/tapdisk-vbd.c | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tools/blktap2/drivers/block-log.c 
b/tools/blktap2/drivers/block-log.c
index 5f3bd35..5330cdc 100644
--- a/tools/blktap2/drivers/block-log.c
+++ b/tools/blktap2/drivers/block-log.c
@@ -494,12 +494,11 @@ static int ctl_kick(struct tdlog_state* s, int fd)
   reqstart = s->bring.req_cons;
   reqend = s->sring->req_prod;
 
-  xen_mb();
   BDPRINTF("ctl: ring kicked (start = %u, end = %u)", reqstart, reqend);
 
   while (reqstart != reqend) {
     /* XXX actually submit these! */
-    RING_COPY_REQUEST(&s->bring, reqstart, &req);
+    memcpy(&req, RING_GET_REQUEST(&s->bring, reqstart), sizeof(req));
     BDPRINTF("ctl: read request %"PRIu64":%u", req.sector, req.count);
     s->bring.req_cons = ++reqstart;
 
diff --git a/tools/blktap2/drivers/tapdisk-vbd.c 
b/tools/blktap2/drivers/tapdisk-vbd.c
index e2e9cd5..fd4999a 100644
--- a/tools/blktap2/drivers/tapdisk-vbd.c
+++ b/tools/blktap2/drivers/tapdisk-vbd.c
@@ -1555,7 +1555,7 @@ tapdisk_vbd_pull_ring_requests(td_vbd_t *vbd)
        int idx;
        RING_IDX rp, rc;
        td_ring_t *ring;
-       blkif_request_t req;
+       blkif_request_t *req;
        td_vbd_request_t *vreq;
 
        ring = &vbd->ring;
@@ -1566,16 +1566,16 @@ tapdisk_vbd_pull_ring_requests(td_vbd_t *vbd)
        xen_rmb();
 
        for (rc = ring->fe_ring.req_cons; rc != rp; rc++) {
-               RING_COPY_REQUEST(&ring->fe_ring, rc, &req);
+               req = RING_GET_REQUEST(&ring->fe_ring, rc);
                ++ring->fe_ring.req_cons;
 
-               idx  = req.id;
+               idx  = req->id;
                vreq = &vbd->request_list[idx];
 
                ASSERT(list_empty(&vreq->next));
                ASSERT(vreq->secs_pending == 0);
 
-               memcpy(&vreq->req, &req, sizeof(blkif_request_t));
+               memcpy(&vreq->req, req, sizeof(blkif_request_t));
                vbd->received++;
                vreq->vbd = vbd;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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