Re: [PATCH 1/2] scsi: st: Remove use of device->was_reset

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

 




> On 15. Nov 2024, at 19.45, Kai Mäkisara (Kolumbus) <kai.makisara@xxxxxxxxxxx> wrote:
> 
...
> 
> I still think that UNIT ATTENTIONs (UAs) reach the high level device without
> problems. The problem is that the device attached to the target first issuing
> a SCSI command after reset gets the UA. As long as this is st device,
> there are no problems. But, if it is the sg device attached to the same target,
> the tape device misses it.
> 
...
> 
> And there are cases where the device reset does not originate from the
> same computer.
> 
> Does anyone have any suggestions?

Besides Power on/Reset, the same problem applies to the New Media case.

One solution might be the following: the midlevel maintains counters for
the Power on/Reset and the Media change UNIT ATTENTIONs. The ULDs
can read these counters (using wrappers). If the ULD find for a device that
the counter value has changed, then the event corresponding to the counter
has occurred. The problem of clearing event flags is avoided,

A drawback comes from the counter wrap-arounds. If, e.g., four-bit counters
are used and there are 16 Power on/Resets between the checks by the ULD,
the event is missed when the counter is used. (The ULDs should also check
the sense data they do receive. It is possible/probable that the event is
recognized based on the sense data even if the counter check misses it.)

This solution is easy to implement. I have a test implementation running and
it seems to be working.


Other solutions that have come into my mind are much more complicated 
than the counters. Here are examples:
- the UNIT ATTENTIONs would be sent to all ULDs attached to the device
  when they issue the next SCSI command
- the ULDs would have possibility to register a callback for UNIT ATTENTIONs






[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