IO timeout value for Linux and Windows?
If a disk has some problems, the disk driver usually retries it. For example, sometimes Linux SCSI driver will get BUSY status from SCSI drives and resend the IO. The upper layers (eg, FS) will wait until: 1. The disk driver can't handle the IO error and directly report error. 2. The disk driver still retries but timeout occurs.
My question is that what's the timeout value in Windows and Linux platforms? For example, if I invoke "write" to send some data to disk synchronously, how long will the system call return if it can't really write data?
Thanks!
As Brian notes, it's driver dependent. The write returns when the driver gives up. How and why the driver gives up is driver and device dependent. There is no timeout, per se, like reads often have.
On Linux, you can get the IO timeout value from each block device by reading the value on :
/sys/block/ mydevice /device/timeout
By default, the value is 60s.
链接地址: http://www.djcxy.com/p/6282.html下一篇: Linux和Windows的IO超时值?