On Thu, May 14, 2020 at 12:21:43PM +0900, Keith Busch wrote: > On Thu, May 14, 2020 at 10:09:55AM +0800, Ming Lei wrote: > > However, why is .commit_rqs() required? Why doesn't .queue_rq() handle the batching > > submission before non-STS_OK is returned? > > Wouldn't the driver need to know that the request is !first in that case > so that it doesn't commit nothing if the first request fails? Yeah, I have replied on this question, :-) In short, I plan to make the interface explicit and more efficient: 1) .commit_rqs() is used for notifying driver that one batching requests are done, which is usually caused by lacking of resource for queuing more requests to driver 2) one request with .last flag marks end of one batching submission, so .commit_rq() will not be called if no new request with !.last is queued 3) it is driver's responsibility for handling batching submission if non STS_OK is returned from .queue_rq() to block layer. Then we can minimize .commit_rqs() uses. Thanks, Ming