Re: dummy scsi read or scsi command periodically for external USB Hard Disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-07-07 22:39, loody wrote:
hi David:

2014-07-07 23:06 GMT+08:00 David Laight <David.Laight@xxxxxxxxxx>:
From: Lars Melin
...
sgread is not included in BusyBox but you should have "touch".
Create a dummy file on the disk and let cron touch it every 4 minutes.
You don't need 'touch' a shell redirect eg ": >file" will do open(..., O_CREAT|O_TRUNC).
However that still might not force an actual disc access.

In any case you really only want to do a read, doing a write will kill the NAND memory.
actually I have searched the scsi/usb layer for possible dummy read,
even read sector 0 is fine, but in vain.

I found the read
a. determined by VFS -> block layer,
b. Block layer put it in queue
c. call scsi pre-queue function to usb layer.

That mean if I try to read sector from usb devices, I have to create a
queue and follow above b) and c) rule.
is there any already kernel API I can use?

sincerely appreciate all yours help,
dd if=/dev/sda of=/dev/null count=1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux