Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

Christoph Hellwig
2015-11-18T14:06:11Z

On Tue, Nov 17, 2015 at 05:17:35PM -0800, Bart Van Assche wrote:
> Chaining RDMA requests is a great idea. But it seems to me that this patch
> is based on the assumption that posting multiple RDMA requests either
> succeeds as a whole or fails as a whole. Sorry but I'm not sure that the
> verbs API guarantees this. In the ib_srpt driver a QP can be changed at any
> time into the error state and there might be drivers that report an
> immediate failure in that case. I think even when chaining RDMA requests
> that we still need a mechanism to wait until ongoing RDMA transfers have
> finished if some but not all RDMA requests have been posted.

I'd have to look at where it's guaranteed that we get flushed errors,
but if there were drivers that broke this assumption the iSER driver
would already be badly broken by this. So if we don't have the formal
guaranteed yet we should add it and fix up the drivers.

Once all drivers use the new-style complentions we could in fact just
remove the return value from ->post_send_wr and require that all erorrs
are reported through ->done.