thanks for jerry’s answer and it works.
As you told me, i add a TimeOutValue of 30 seconds to HKLM\System\CurrentControl\Services\Disk and
found that all SRBs SCSIport passed to miniport got a timeout of 30 seconds.
Also, i found there was an error in my previous question. That is, the system’s
hang-up is not due to BUS RESET, but the limit of maximum outstanding SRBs in MS SCSIport.
At least in my system, if the storage server fails to respond to a disk I/O request,
(maybe because request packet is lost or storage server is busy), the disk I/O request will be blocked
and the SRB stay outstanding (not completed). But the SCSIport may continue to queue SRBs to miniport,
which makes the number of outstanding SRBs to increase, eventually, the number will exceed 254
(the maximum outstanding SRBs that MS SCSIport supports), and the system hang-up occurs.
To my opinion, if the blocked disk I/O time out, the phenomenon of BUS RESET occurs, but the real
reason that hang up the system is that the SRBs queue reaches its 254 limit.
So, if the storage server eventually manages to satisfy the blocked disk I/O request (maybe the miniport
re-transmit it’s request, or the storage server become idle), the system will recover from hang-up state.
Perhaps i need not handle bus reset at all, as long as the server can satisfy every disk I/O request.
any comment?
xxxxx@attotech.com дµÀ£º
If you’re talking about a Disk device, the timeout value can be changed by entering a DWORD value HKEY_LOCAL_MACHINE\CurrentControlSet\Services\Disk. The value name is TimeOutValue. The default is 10 seconds. This value gets multiplied by the number of 64k segments or parts thereof in the transfer - so if you’re transferring 129k, it would be 30 seconds (default). The value affects disk Read/Write commands, except possibly those sent via SCSI_PASS_THROUGH, for ALL disks in the system unfortunately. (There are some Fibre Channel HBAs that change this value to 60 seconds (!). That means a 1 meg request will time out in 16 MUNUTES!)
You can avoid the bus reset by timing out the command in your miniport before the TimeOutValue specified in the SRB, aborting the command and setting SrbStatus to SRB_STATUS_TIMEOUT.
Jerry.
xxxxx@lists.osr.com wrote: -----
>To: “Windows System Software Devs Interest List”
>
>From: identifier scorpio
>Sent by: xxxxx@lists.osr.com
>Date: 06/03/2005 10:50PM
>cc: xxxxx@lists.osr.com
>Subject: [ntdev] about BUS-RESET of SCSI miniport
>
>
>Hi, everyone
>
>i wrote a SCSI miniport driver to redirect all disk I/O to remote
>storage server, and i found that the Port driver above me pass down a
>SRB with a timeout of 10 seconds. so, if i fail to complete the SRB
>in 10 seconds, then a BUS RESET occurs, and the driver (and the whole
>system) hang up.
>
>who can tell me how can i avoid BUS RESET ? may i enlarge the 10
>seconds timeout limit, e.g., to 1 minute or more? or, how can i
>recover from BUS RESET state?
>
>thanks in advance.
>
>
>DO YOU YAHOO!?
>ÑÅ»¢Ãâ·ÑGÓÊÏä£ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä — Questions? First check the Kernel Driver
>FAQ at http://www.osronline.com/article.cfm?id=256 You are currently
>subscribed to ntdev as: xxxxx@attotech.com To unsubscribe send a
>blank email to xxxxx@lists.osr.com — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’ To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________________________
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com