Searched hist:"02 db9954" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/nvme/target/ |
H A D | io-cmd-file.c | 02db9954 Wed Mar 27 04:07:22 CDT 2019 Ming Lei <ming.lei@redhat.com> nvmet: fix building bvec from sg list
There are two mistakes for building bvec from sg list for file backed ns:
- use request data length to compute number of io vector, this way doesn't consider sg->offset, and the result may be smaller than required io vectors
- bvec->bv_len isn't capped by sg->length
This patch fixes this issue by building bvec from sg directly, given the whole IO stack is ready for multi-page bvec.
Reported-by: Yi Zhang <yi.zhang@redhat.com> Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> 02db9954 Wed Mar 27 04:07:22 CDT 2019 Ming Lei <ming.lei@redhat.com> nvmet: fix building bvec from sg list There are two mistakes for building bvec from sg list for file backed ns: - use request data length to compute number of io vector, this way doesn't consider sg->offset, and the result may be smaller than required io vectors - bvec->bv_len isn't capped by sg->length This patch fixes this issue by building bvec from sg directly, given the whole IO stack is ready for multi-page bvec. Reported-by: Yi Zhang <yi.zhang@redhat.com> Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver") Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
|