Re: [Linux-usb-users] USB storage: corrupted data transfers

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mark Lord <lkml@...>
Cc: <linux-usb-users@...>, Linux Kernel <linux-kernel@...>, <mdharm-usb@...>, <dbrownell@...>, Andrew Morton <akpm@...>
Date: Saturday, November 10, 2007 - 5:20 pm

On Sat, 10 Nov 2007, Mark Lord wrote:


That's strange.  It happens periodically, you say?  What's the period?


Me too.  It seems rather unlikely that they are coming from the USB
device or the transport, since at that level everything is addressed in
terms of sector numbers.  I don't see how 16 extra sectors could just
get inserted.  More believable would be a problem in the block layer,
the filesystem, or the application.


Or it makes all drives somewhat unreliable, depending on just where the 
problem is.


You could try doing a more specific test.  Write a program to access
the block device sector-by-sector and store a distinct recognizable
byte pattern to each sector.  (Maybe just repeat the 4-byte sector 
number over and over.)  Then write another program to read the
data back and see what bytes ended up in which sectors.

At the same time, use the usbmon facility (see
Documentation/usb/usbmon.txt) to record exactly what data gets sent
to/from the stick.  That should at least be sufficient to determine the
problem is in the stick itself, in the SCSI/USB layers, or someplace
higher up.

Alan Stern

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB storage: corrupted data transfers, Mark Lord, (Sat Nov 10, 5:05 pm)
Re: USB storage: corrupted data transfers, Mark Lord, (Sat Nov 10, 5:41 pm)
Re: USB storage: corrupted data transfers, Mark Lord, (Sat Nov 10, 8:06 pm)
Re: [Linux-usb-users] USB storage: corrupted data transfers, Alan Stern, (Sat Nov 10, 5:20 pm)