On Thu, Mar 23, 2017 at 10:35:06AM -0400, James Bottomley wrote: > I'm certainly not saying we blindly follow t10, but I believe their > intent is to issue the next command from the completion of the first > (we can do this using qc->complete_fn, like atapi_request_sense). That > way we don't get any tag problems because there's only one command > outstanding at once; reusing the qc means no allocation issues either. > > The t10 approach does mean the SG_IO problem is actually fixable rather > than simply erroring out. It would be sort of fixable, but with a lot of hackery. > That's up to you ... from the point of view of code documenting itself, > forming the ATA_16 TRIM in sd and not doing any satl transformation is > easier for others to follow, but if it's going to cause more code, I'm > only marginal on the advantages of easier to follow code. I tried this earlier before giving up on it because it looked to ugly. But I can complete that version of it and post it for people to compare.