On Mon, 7 Jul 2014 22:42:29 +0800 loody <miloody@xxxxxxxxx> wrote: > hi all: > we met a USB Hard Disk that will go to suspend if host stop > sending scsi read command over 5mins. > To save the IO, kernel will keep the file in page cache as much as > he can and under this circumstances, the read command may disappear > for a while longer enough to cause the device suspend. > > is there any kernel config or module parameter can do the dummy > read periodically, even the sector 0 (MBR) is fine. > or is there any kernel api I can use to read sector 0(MBR) maybe > every 4mins? > > appreciate your help in advance, > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html Open the device with O_DIRECT and read a block every 4 minutes. That should keep it awake. NeilBrown
Attachment:
signature.asc
Description: PGP signature