From: Matthew Wilcox Date: Thu, 24 Feb 2011 13:46:00 +0000 (-0500) Subject: NVMe: Fix discontiguous accesses X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d8ee9d69f275769aaad40ef7c944565ff8d2d24f;p=~shefty%2Frdma-dev.git NVMe: Fix discontiguous accesses When we submit subsequent portions of the I/O, we need to access the updated block, not start reading again from the original position. This was showing up as miscompares in the XFS randholes testcase. Signed-off-by: Matthew Wilcox --- diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 240922706a9..562d75a0fc5 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c @@ -529,6 +529,8 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns, cmnd->rw.control = cpu_to_le16(control); cmnd->rw.dsmgmt = cpu_to_le32(dsmgmt); + bio->bi_sector += length >> 9; + if (++nvmeq->sq_tail == nvmeq->q_depth) nvmeq->sq_tail = 0; writel(nvmeq->sq_tail, nvmeq->q_db);