Re: sg_remove and pending write request

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

 



Qi, Yanling wrote:
> It seems that the reattached SAS devices would take
> the same sg slot if the following conditions meet
> 1. wait for 2+ minutes for a pending SG-IO write request to come back
> before pushing the cable back. The 2+ minutes gives the scsi middle
> level to timeout the pending io request and do error-recovery if it is
> needed.
> 2. close user space fd properly (sg_release will try to do the
> sg_dev_arr[k] = NULL.
> 
> Do you see any other conditions?

3. Do not attach other SCSI devices in the meantime.
4. Hope that the kernel re-adds the missing devices in exactly the same
order as before.

That's why many SCSI transports provide unique persistent identifiers.
You can let udev name devices files according to these identifiers or
you can query them in your application software.
-- 
Stefan Richter
-=====-=-==- =-=- =---=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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