[bug report] nvme sends invalid command capsule over rdma transport for 5KiB write when target supports MSDBD > 1

Max Gurtovoy mgurtovoy at nvidia.com
Wed May 26 14:57:28 PDT 2021


On 5/26/2021 7:00 PM, Christoph Hellwig wrote:
> On Wed, May 26, 2021 at 05:49:41PM +0300, Max Gurtovoy wrote:
>>> We do need for_each_sg here indeed, but you also need to keep
>>> incrementing sge for each loop iteration.  I think we can also
>>> drop the scat local variable with just a single users and all the
>>> renaming while we're at it.
>> Is the above fixing the issue ?
>>
>> Seems like code refactoring to me, right ?
> It fixes support for chained SGLs when using inline segments.  Not sure
> if it fixes the original bug report, but the current code is broken.

ohh, I see the usage of sg_next is missing.

Well the original bug is for sure using inline chained SGLs but I 
thought it's using 2 sg_nents and NVME_INLINE_SG_CNT == 2.

maybe there is a split and the IO is using sg_nents == 3 ? and then we 
chain.

Let's wait for Ben's test report (Ben please make sure to fix Sagi's 
suggestion with Christoph's comment in your test).




More information about the Linux-nvme mailing list