Skip to contentSkip to conversation

SCSI reusing tags during error recovery

DISCUSSION Luben Tuikov 1 participant 1 message Jan 10, 2011 SCSI

lore
Share & tools
lore
#0 lore raw

Observed is on the wire, the following scenario:

0: Tag A (READ) -->
(Times out)
1: Tag X (TMF ABORT TASK, TTBM=A) -->
2: Tag X (TMR FUNCTION COMPLETE) <--
3: Tag A (TUR) -->
4: Tag A (TUR status GOOD) <--
5: Tag A+2 (some command) -->
...

Undoubtedly resulting from the SCSI layer reusing the request structure of the timed out Tag A to issue the Test Unit Ready command, sequence 3.

However, if the task manager were unable to abort Tag A and returned a different task management result, then the TUR would complete with CHECK CONDITION (ABORTED COMMAND, OVERLAPPED COMMANDS ATTEMPTED). Not all transports require the task router to implement overlapped tag checking, and in most it is optional. The TUR should go out with Tag A+1.

The SCSI layer should ideally, not perform error recovery ("error handling" to use Linux' own terminology) on behalf of a timed out request, but allow higher layers to issue TMF only based on a ITLQ (tag, a number) or ITL (LUN, a structure) or IT nexus (target port).

A previous issue I raised, tag generation for tags of task management functions, can be found here:
http://marc.info/?l=linux-scsi&m=128902337522890&w=2

Luben