nvme-rdma: use nr_phys_segments when map rq to sgl
Use blk_rq_nr_phys_segments() instead of blk_rq_payload_bytes() to check if a command contains data to be mapped. This fixes the case where a struct request contains LBAs, but it has no payload, such as Write Zeroes support. Fixes: 6e02318e ("nvme: add support for the Write Zeroes command") Reported-by: NMing Lei <tom.leiming@gmail.com> Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Tested-by: NMing Lei <tom.leiming@gmail.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
Showing
想要评论请 注册 或 登录