Re: [PATCH 10/14] target: Simplify the code for waiting for command completion

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

 



On 06/11/2018 03:37 PM, Bart Van Assche wrote:
> On Mon, 2018-06-11 at 14:02 -0500, Mike Christie wrote:
>> I see that in the current code we always do a wait if the CMD_T_ABORTED
>> bit was set, so your patch matches that. However, is the original code
>> correct? In target_release_cmd_kref below we only do a wake up if both
>> CMD_T_FABRIC_STOP and CMD_T_ABORTED is set. If wait_for_tasks=false and
>> CMD_T_ABORTED was set, we would end up waiting forever. Is that right or
>> can it never happen?
> 
> Hello Mike,
> 
> transport_generic_free_cmd() calls target_wait_free_cmd() before waiting
> on cmd->cmd_wait_comp for aborted commands. target_wait_free_cmd() calls
> __transport_wait_for_tasks() with the fabric_stop argument set to true
> and that causes the CMD_T_FABRIC_STOP flag to be set.
>

Yeah, I see it's always set together now. Just misread the code.
--
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