diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-02-24 08:46:00 -0500 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:52:59 -0400 |
commit | d8ee9d69f275769aaad40ef7c944565ff8d2d24f (patch) | |
tree | e76aeab439b5f302042b3cd0d64cbe781cff456a /drivers/block | |
parent | 1ad2f8932a72bf375361727949ced2cb4e8cfcef (diff) | |
download | blackbird-op-linux-d8ee9d69f275769aaad40ef7c944565ff8d2d24f.tar.gz blackbird-op-linux-d8ee9d69f275769aaad40ef7c944565ff8d2d24f.zip |
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 <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 240922706a93..562d75a0fc50 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); |