IO timeout value for Linux and Windows?

If there are some problems on the disk, the disk driver usually repeats it. For example, sometimes the Linux SCSI driver receives BUSY status from SCSI disks and retransmits IO. The upper levels (for example, FS) will wait: 1. The disk driver cannot process an I / O error and report an error directly. 2. The disk driver still retries, but a timeout occurs.

My question is, what is the timeout value on windows and linux platforms? For example, if I call write to send some data to the disk synchronously, how long will the system call return if it cannot really write the data?

Thanks!

+7
source share
2 answers

As Brian notes, it depends on the driver. The entry is returned when the driver refuses. How and why the driver refuses drivers and devices. There is no timeout, as such, as is often read.

+2
source

On Linux, you can get the IO timeout value from each block device by reading the value at:

/ Sys / block / mydevice / device / timeout

The default value is 60 s.

+1
source

All Articles