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 (e.g., 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With