Re: [PATCH v6 19/33] target: Avoid that LUN reset sporadically triggers data corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/20/2017 03:52 PM, Nicholas A. Bellinger wrote:
> As-is just ignoring CMD_T_COMPLETE in core_tmr_drain_state_list() is not
> enough to address this bug and not cause other issues, because once a
> se_cmd descriptor is handed back to the fabric driver after
> transport_cmd_check_stop_to_fabric() is called,
> __target_check_io_state() must not attempt to abort the descriptor.

Please note that my patch is not ignoring CMD_T_COMPLETE - what it does
is to postpone sending back the LUN RESET response to the initiator
until the responses for all commands affected by the LUN RESET have been
sent. I can move this patch after the patch that makes TMF handling
synchronous because that patch makes it safe to set the CMD_T_ABORTED
flag at any time.

> That said, here is how I'd like to address this particular bug.
> 
> 1) Allow CMD_T_COMPLETE to occur, but still ignore se_cmds that have
> already called transport_cmd_check_stop_to_fabric().  Eg: CMD_T_ACTIVE
> is not set, but CMD_T_SENT is set.

My understanding of your patch is that it will cause the LUN RESET
implementation to ignore those commands for which CMD_T_FABRIC_STOP has
been set and that commands for which CMD_T_ACTIVE has been set but
CMD_T_SENT not will also be ignored. Sorry but I don't think this
approach is sufficient to fix the data corruption issue I observed.

Bart.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux