Re: buffer_head.b_bsize type

Stewart Smith (stewartsmith@mac.com)
Fri, 30 May 2003 00:19:05 +1000


On Thursday, May 29, 2003, at 09:15 PM,
viro@parcelfarce.linux.theplanet.co.uk wrote:
>> Could we go the other way and make all users of b_size use unsigned?
>
> Who the hell cares? Size of buffer does not exceed the page size.
> Unless you can show a platform with 2Gb pages...

I would argue the same that the size of a buffer should never be able
to be negative and the structure says this but the rest of the code
does not. (Theoretically) if a negative size was asked for, then we'd
actually try to allocate a large amount of memory for the buffer,
possibly causing badness somewhere along the line.

Any maybe we shouldn't make it too hard for archs with 2GB pages :)
It'll probably happen in 20 years. :)

------------------------------
Stewart Smith
stewartsmith@mac.com
Ph: +61 4 3884 4332
ICQ: 6734154
http://www.flamingspork.com/ http://www.linux.org.au

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/