Re: [PATCH 2/4] nvmet-rdma: Use new SGL alloc/free helper for requests
From: Logan Gunthorpe
Date: Wed Apr 04 2018 - 12:47:43 EST
On 4/4/2018 6:43 AM, Sagi Grimberg wrote:
IIRC, this might result in nvmet-rdma executing data-transfer even
for failed requests in some error cases. I'm not sure this is the
only case, but have you tested what happens in error cases?
That's why I set transfer_len to zero when we exit this function on
error (see the error_out label):
+error_out:
+ rsp->req.transfer_len = 0;
+ return NVME_SC_INTERNAL;
I haven't tested the error path, but I can. Is it sufficient to just
change the code to create an error or do you know of a better way to
test this?
Thanks,
Logan