On Sat, 2011-02-12 at 15:33 +0100, Fubo Chen wrote: > Target drivers assume that transport_generic_allocate_tasks() returns > 0, -1 or -2. But if transport_generic_allocate_tasks() invoks > transport_generic_cmd_sequencer() and if > transport_generic_cmd_sequencer() invokes core_alua_state_check() the > value 1 can be returned. Which is correct - drivers or core ? And what > is meaning of return values ? > Hi Fubo, Note that when 'ret = T10_ALUA(su_dev)->alua_state_check(...)' is non zero, there are two possible cases: *) transport_generic_cmd_sequencer() will still 'return -2' when the (ret > 0) check is true from ->alua_state_check(...) *) Or jump to the label out_invalid_cdb_field: that also will 'return -2'. So AFAICT transport_generic_cmd_sequencer() will never actually 'return ret' when 'ret = 1'; --nab -- 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