Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)

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

James Bottomley wrote:
> 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.

Guilty as charged.  Sorry, for some reason I didn't imagine that its parameters would differ from 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

Thank you.

I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photos]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux