Re: [Fwd: [RFT] major libata update]

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

 



James Bottomley wrote:
No ... in that case the eh is already active, and your API does this:

void scsi_req_abort_cmd(struct scsi_cmnd *cmd)
{
	if (!scsi_delete_timer(cmd))
		return;
		^^^^^^^
	scsi_times_out(cmd);
}

Which likewise does nothing if the timer has already fired, so they both
have the same effect.

Sigh. They clearly do not have the same effect, because the above code guarantees that a timeout is forced, regardless of whether the timer has fired or not. That in turn guarantees that the timeout callback (->eh_timed_out) is called, and the cmd is in a very specific state.

Completion-or-timeout has none of these attributes.

Any alternative is forced to deal with two very different command, and EH, states... to achieve the same eventual result. Thus, the code presented is the one of least complexity, AFAICS.

	Jeff


-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux