Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 (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!

like image 321
flypen Avatar asked Apr 08 '11 08:04

flypen


2 Answers

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.

like image 114
Chris Buck Avatar answered Oct 10 '22 02:10

Chris Buck


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.

like image 43
Bruno Mairlot Avatar answered Oct 10 '22 02:10

Bruno Mairlot