[PATCH] nvmet-loop: use nr_phys_segments when map rq to sgl

Christoph Hellwig hch at infradead.org
Mon May 14 01:32:45 PDT 2018


On Fri, May 11, 2018 at 02:38:15AM -0400, Chaitanya Kulkarni wrote:
> This patch replaces blk_rq_payload_bytes() with
> blk_rq_nr_phys_segments(). For the payloadless requests like
> write-zeroes it will trigger BUD_ON() at
> sg_alloc_table_chained() since blk_rq_nr_phys_segments()
> will evaluate to 0 due to nature of the request.

Can you explain the exact setup?  If blk_rq_payload_bytes is non-zero
we should always have at least one segment at this point, either
because we got one passed down, or because we did set up the
special_vec magic.



More information about the Linux-nvme mailing list