Comment 7 for bug 320638

Revision history for this message
Stephan Diestelhorst (syon) wrote : Re: Raid1 HDD and SD card -> bio too big device md0 (248 > 200)

Just stumbled through Linux' source and fooled around a bit.
It seems that the value of 240 is consistent with what I can find in /sys/block/sdb/max_{,hw}_sectors_kb
for the SD card. (Returns 120)

Any other device I attach through USB and / or the card reader has the same value. Where does this come from?

I've tried to understand how this value propagates through the hierarchy, but was not too successful. What is strange is the fact that the reported 248 are exactly one page (4kb = 8 sectors) off the max. Could this be a rounding issue somewhere?

Most of the stuff just kept copying the value from the lower level or propagated the minimum value.
Which layer comes up with the 248 in the first place?

Just sharing my 0.02$, I apparently have no clue about that block layer (stack).