Re: [PATCH 5/9] scsi: set host byte after EH completed

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

 



On 10/17/23 09:25, Christoph Hellwig wrote:
On Mon, Oct 16, 2023 at 02:15:38PM +0200, Hannes Reinecke wrote:
When SCSI EH completes we should be setting the host byte to
DID_ABORT, DID_RESET, or DID_TRANSPORT_DISRUPTED to inform
the caller that some EH processing has happened.

I have a hard time following this commit log.  Yes, we probably
should.  But so far we haven't, so why is this suddenly a problem?

-void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q)
+void __scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q,
+			int host_byte)
  {
+	if (host_byte)
+		set_host_byte(scmd, host_byte);
  	list_move_tail(&scmd->eh_entry, done_q);

What is the point of passing in the host_byte vs just setting it in
the caller?

Hmm. Sure, could do.

In fat I'm not even quite sure what the point of the existing helper
is, as moving the command to the passed in queue doesn't provide
much of a useful abstraction.

Share your sentiments.
One could open-code it, but if I move the host_byte setting into the
caller this function won't be touched at all.
And it's time to clean up the entire list splice-and-dice game in
SCSI EH once this rework is in; my plan is to move failed commands
onto a per-entity list, and merge them onto the next higher entity
list once an escalation fails.

So maybe shelf it for now, and just open-code the host_byte setting
in the caller.

Cheers,

Hannes




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux