From: Lars Melin <larsm17-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: loody <miloody-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
David Laight
<David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org>
Cc: "Bryn M. Reeves" <bmr-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
SCSI development list
<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: dummy scsi read or scsi command periodically for external USB Hard Disk
Date: Mon, 07 Jul 2014 22:51:13 +0700 [thread overview]
Message-ID: <53BAC1F1.5090006@gmail.com> (raw)
In-Reply-To: <CANudz+uOS3VVyz6FcHoui8z678R6Xc0CQrdqFRdS5NyfCB59Zw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 2014-07-07 22:39, loody wrote:
> hi David:
>
> 2014-07-07 23:06 GMT+08:00 David Laight <David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org>:
>> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-07 15:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-05 17:18 dummy scsi read or scsi command periodically for external USB Hard Disk loody
2014-07-07 9:20 ` Bryn M. Reeves
2014-07-07 14:37 ` loody
2014-07-07 14:59 ` Lars Melin
[not found] ` <53BAB5DF.5090606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-07 15:06 ` David Laight
2014-07-07 15:39 ` loody
[not found] ` <CANudz+uOS3VVyz6FcHoui8z678R6Xc0CQrdqFRdS5NyfCB59Zw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-07 15:51 ` Lars Melin [this message]
2014-07-07 15:52 ` Bryn M. Reeves
[not found] ` <20140707155233.GD19630-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-07-07 16:15 ` loody
[not found] ` <CANudz+s8R3AnxEJ229EwAOOxEk2WZUjMjoE3rwdRM1YM5ZO=og-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-07 16:25 ` Bryn M. Reeves
2014-07-09 14:15 ` loody
2014-07-07 15:54 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407071147130.871-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-07 16:13 ` loody
2014-07-07 17:02 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407071258360.871-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-08 14:58 ` loody
[not found] ` <CANudz+uRd3tRfPN-Fqcj5sSW-xkRSN-gERBP7HhUY_s5gEALbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-08 16:00 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407081149280.1283-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-08 19:04 ` loody
2014-07-08 19:26 ` Alan Stern
2014-07-09 3:17 ` loody
2014-07-09 8:37 ` David Laight
2014-07-09 13:27 ` loody
[not found] ` <CANudz+tQ4pJFmLTRsHtL=VjuCg30Af+7CpK1qRQM5TwwShoQtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-09 14:25 ` Alan Stern
2014-07-09 14:19 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BAC1F1.5090006@gmail.com \
--to=larsm17-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org \
--cc=bmr-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=miloody-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.