On 07/17/2012 09:39 AM, Christoph Hellwig wrote: > On Tue, Jul 17, 2012 at 09:34:49AM -0700, Roland Dreier wrote: >> Sleeping on things, I now feel pretty strongly that having target_submit_cmd >> return an error value for "immediate" errors where the command does not >> make it into the target core is the right approach. > > I think it is. When I tried to convert other drivers to > target_submit_cmd while doing the target processing thread removal that > would have simplified a lot of things. > >> Freeing commands is already one of the most confusing and complex parts >> of the target code, with "check_stop_free," "cmd_wait_comp" and >> "SCF_ACK_KREF." Adding another code flow back to the fabric driver >> with yet another set of semantics around freeing a command seems like >> it's making things even harder to maintain. > > True. And the above mess really needs to be simplified, too. I'm ok with submit_cmd returning a value for now. Maybe in the end it doesn't, but getting the code working comes first. This is one of those areas that needs a complete rewrite, so who cares if there's some dirt on the floor when the whole joint is due for remodeling. -- Andy -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html