On Fri, Dec 11, 2009 at 03:18:20AM +0100, Penguin Lover Frank Steinmetzger 
squawked:
> Am Donnerstag, 10. Dezember 2009 schrieb Willie Wong:
> 
> > When you plug-in your device, what does
> > /sys/block/sdb/queue/max_hw_sectors_kb say?
> 
> 120

Okay, this checks out with the 

> hw_sector_size says 512
> 
> I did another "test": I opened the syslog in continuous output (tail -f) and 
> watched it while copying a file of 350 MB. Coincidentally it started getting 
> said error "bio too big device sdb (248 > 240)" at about 120 MB (according to 
> the progress bar of KDE's copy dialogue).

Sorry, I may not have been clear in my previous e-mail. You showed me 
 /sys/..../max_hw_sectors_kb
and 
 /sys/..../hw_sector_size
But what does
 /sys/..../max_sectors_kb
contain?

(Also, if possible, can you also show me the same values for the
2.6.30 kernel?)

If the max_sectors_kb is bigger than max_hw_sectors_kb, then something
that shouldn't happen happened and the kernel is trying to send more
data than the driver can handle. And that might be where you got your
error from. If that is the case, a work around is to manually, as
root, 'echo 120 > /sys/block/sdb/queue/max_sectors_kb'. 

Now, like I said, it shouldn't happen that max_sectors is >
max_hw_sectors, since they should've been set equal the the block
device is detected. If the two values both show 120, please try
changing max_sectors_kb to a smaller multiple of 8 (64 is a
candidate), and see if the problem persists. If this fixes the error,
there is an off-by-one kernel bug, and you should file it either at
b.g.o. to pass it upstream, or if you are brave (and running a vanilla
kernel) send it directly to LKML. 

If neither of these works, then I am on the completely wrong track. 

Cheers, 

W

-- 
Where do you get Mercury?

H.G. Wells
Sortir en Pantoufles: up 1099 days, 10:14

Reply via email to