summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch2013-04-09 19:59:32 +0200
committerMatthew Wilcox2013-05-02 20:38:59 +0200
commit427e97080196548557b288517537ab7eb48c309f (patch)
tree0c7456201d9315980182b9fc1d2d5bcd83a20a72 /include/linux/nvme.h
parentNVMe: Remove dead code in nvme_dev_add (diff)
downloadkernel-qcow2-linux-427e97080196548557b288517537ab7eb48c309f.tar.gz
kernel-qcow2-linux-427e97080196548557b288517537ab7eb48c309f.tar.xz
kernel-qcow2-linux-427e97080196548557b288517537ab7eb48c309f.zip
NVMe: Split non-mergeable bio requests
It is possible a bio request can not be submitted as a single NVMe IO command if the bio_vec is not mergeable with the NVMe PRP alignement constraints. This condition was handled by submitting an IO for the mergeable portion then submitting a follow on IO for the remaining data after the previous IO completes. The remainder to be sent was tracked by manipulating the bio->bi_idx and bio->bi_sector. This patch splits the request as many times as necessary and submits the bios together. Since submitting the bio may cause it to be requeued on split, nvme_resubmit_bios had to be modified to remove the wait queue when the bio list is empty prior to submitting the bio since a split would have added the wait queue a second time, corrupting the wait queue head task list. There are a few other benefits from doing this: it fixes a potential issue with the previous handling of a non-mergeable bio as the requeuing method could would use an unlocked nvme_queue if the callback isn't invoked on the queue's associated cpu; it will be possible to retry a failed bio if desired at some later time since it does not manipulate the original bio; the bio integrity extensions require the bio to be in its original condition for the checks to work correctly if we implement the end-to-end data protection in the future. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux/nvme.h')
0 files changed, 0 insertions, 0 deletions