Comment 9 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)

Some more stumbling shows that one of the few places where the bi_size is increased is
fs/bio.c, function __bio_add_page .
While I'm not sure what this function does exactly, I find the check in line 311 somewhat disturbing:

 if (((bio->bi_size + len) >> 9) > max_sectors)
    return 0;

I can only imagine that max_sectors should encompass the entire range. This however is not true due to rounding off the lowest bits.

if ((bio->bi_size + len) > (max_sectors << 9))

would actually serve this purpose.

But again, I'm not sure whether this is actually the issue. Haven't found the time to compile my own kernel, given the broken package management :-/