aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2015-02-02 06:28:21 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2015-02-10 11:04:45 -0500
commit3bb8c98e5612f069010ad04e5f463389e2eb6563 (patch)
treee667fb9a9001c954bc2f5aa3d1083c58eeae4d51 /drivers/block/xen-blkfront.c
parentbcadb699b05b828fb43c54abb75607db7e8c3e29 (diff)
xen-blkfront: fix accounting of reqs when migrating
Current migration code uses blk_put_request in order to finish a request before requeuing it. This function doesn't update the statistics of the queue, which completely screws accounting. Use blk_end_request_all instead which properly updates the statistics of the queue. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reported-and-Tested-by: Ouyang Zhaowei (Charles) <ouyangzhaowei@huawei.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: David Vrabel <david.vrabel@citrix.com> Cc: xen-devel@lists.xenproject.org
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2236c6f31608..7f66d2e08f19 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1511,7 +1511,7 @@ static int blkif_recover(struct blkfront_info *info)
1511 merge_bio.tail = copy[i].request->biotail; 1511 merge_bio.tail = copy[i].request->biotail;
1512 bio_list_merge(&bio_list, &merge_bio); 1512 bio_list_merge(&bio_list, &merge_bio);
1513 copy[i].request->bio = NULL; 1513 copy[i].request->bio = NULL;
1514 blk_put_request(copy[i].request); 1514 blk_end_request_all(copy[i].request, 0);
1515 } 1515 }
1516 1516
1517 kfree(copy); 1517 kfree(copy);
@@ -1534,7 +1534,7 @@ static int blkif_recover(struct blkfront_info *info)
1534 req->bio = NULL; 1534 req->bio = NULL;
1535 if (req->cmd_flags & (REQ_FLUSH | REQ_FUA)) 1535 if (req->cmd_flags & (REQ_FLUSH | REQ_FUA))
1536 pr_alert("diskcache flush request found!\n"); 1536 pr_alert("diskcache flush request found!\n");
1537 __blk_put_request(info->rq, req); 1537 __blk_end_request_all(req, 0);
1538 } 1538 }
1539 spin_unlock_irq(&info->io_lock); 1539 spin_unlock_irq(&info->io_lock);
1540 1540