From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: n0diamond@yahoo.co.jp
Cc: linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
Date: Wed, 28 Mar 2012 08:18:15 +0100 [thread overview]
Message-ID: <1332919095.2869.2.camel@dabdike> (raw)
In-Reply-To: <102582.72180.qm@web100001.mail.kks.yahoo.co.jp>
On Wed, 2012-03-28 at 13:14 +0900, Norman Diamond wrote:
> I wrote:
> > James Bottomley corrected one of the experts who corrected me yesterday:
> >>>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
> >>
> >> No, it won't be this. Everything below block does exactly what block says. If readahead is the problem, then you need to turn it off in block:
> >> echo 0 > /sys/block/<dev>/queue/read_ahead_kb
> >
> > Thank you. But...
>
> But it didn't help. Today I put the disk internally in an old notebook, and libata made it /dev/sda.
> echo 0 >/sys/block/sda/queue/read_ahead_kb
> but sg_dd still insisted on reading an entire page, so it refused to read a good block that was too close to the bad block.
This tells me you didn't read the man page on sg_dd.
To get it to read a block at a time using SCSI commands, you need
sg_dd blk_sgio=1 bs=512 bpt=1 <rest of the arguments>
That says use SG_IO and read exactly one block per SCSI command
James
next prev parent reply other threads:[~2012-03-28 7:18 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 4:14 sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block) Norman Diamond
2012-03-28 7:18 ` James Bottomley [this message]
2012-03-28 7:48 ` Norman Diamond
2012-03-28 14:41 ` Alan Stern
2012-03-28 23:43 ` Norman Diamond
2012-03-29 14:44 ` Alan Stern
2012-03-30 7:34 ` Norman Diamond
[not found] ` <662659.4715.qm-303aDswoEIb1/UedTyKF90yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-03-30 14:20 ` Alan Stern
2012-03-31 3:36 ` Norman Diamond
2012-03-31 15:31 ` Alan Stern
2012-04-02 4:25 ` Norman Diamond
[not found] ` <307043.7654.qm-W9a5FxB6bg95hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-02 18:40 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204021430130.12349-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-03 7:54 ` Norman Diamond
2012-04-03 13:55 ` James Bottomley
2012-04-04 1:28 ` Norman Diamond
[not found] ` <850871.26108.qm-303aDswoEIaO4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-04 15:28 ` Alan Stern
2012-04-06 0:27 ` Norman Diamond
2012-04-06 16:21 ` Alan Stern
2012-04-09 2:07 ` Norman Diamond
[not found] ` <137070.95048.qm-W9a5FxB6bg8QKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-09 14:19 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204091014220.1429-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-09 22:00 ` Norman Diamond
2012-04-10 14:31 ` Alan Stern
2012-04-10 23:24 ` Norman Diamond
2012-04-12 14:53 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204121030050.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-12 23:08 ` Norman Diamond
[not found] ` <14684.87111.qm-W9a5FxB6bg+O4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-13 0:59 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204122044390.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-16 2:13 ` Norman Diamond
[not found] ` <344714.25777.qm-W9a5FxB6bg85iCj6gykswkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-16 15:06 ` Alan Stern
2012-04-16 22:41 ` Norman Diamond
2012-04-17 15:19 ` Alan Stern
2012-04-17 22:54 ` Norman Diamond
2012-04-25 15:34 ` Alan Stern
2012-04-25 23:44 ` Norman Diamond
2012-04-26 15:03 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204261026260.1530-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-26 23:13 ` Norman Diamond
2012-04-27 14:51 ` Alan Stern
2012-04-28 0:59 ` Norman Diamond
2012-04-29 15:15 ` Alan Stern
2012-04-30 2:25 ` Norman Diamond
2012-04-30 19:42 ` Alan Stern
2012-04-30 23:07 ` Norman Diamond
2012-05-01 16:05 ` Alan Stern
2012-04-30 20:04 ` Alan Stern
2012-04-16 6:18 ` Norman Diamond
2012-04-03 14:28 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204031017110.1537-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-04 4:13 ` Norman Diamond
[not found] ` <388819.38189.qm-303aDswoEIaf2IT/n6niikyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-04 15:48 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204041128160.1543-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-06 0:49 ` Norman Diamond
[not found] ` <124887.42544.qm-303aDswoEIYQKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-06 16:31 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1204061221530.1392-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-09 2:25 ` Norman Diamond
2012-04-09 14:40 ` Alan Stern
2012-04-09 22:21 ` Norman Diamond
[not found] <Pine.LNX.4.44L0.1203261007290.1384-100000@iolanthe.rowland.org>
[not found] ` <Pine.LNX.4.44L0.1203261007290.1384-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-26 23:30 ` Norman Diamond
2012-03-26 23:45 ` Matthew Dharm
2012-03-27 7:40 ` James Bottomley
2012-03-27 8:48 ` Norman Diamond
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=1332919095.2869.2.camel@dabdike \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=n0diamond@yahoo.co.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox