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]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux