Commit b21ffd2
alinux: nvme: pci: Fix the incorrect ways to calculate the request size
fix #29375191
For NVMe discard request, it will use special_vec to describe the size
of the request, thus it will get an incorrect request size with
blk_rq_bytes() when handling the NVMe discard request.
Thus we should use blk_rq_payload_bytes() to calculate the data transfer
size which can fix this issue.
Fixes: 220741e8c12d ("alios: nvme-pci: Improve mapping single segment requests using SGLs")
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Reviewed-by: Jiufei Xue <jiufei.xue@linux.alibaba.com>1 parent ffae4b1 commit b21ffd2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| |||
0 commit comments