[lkml]   [2003]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: buffer_head.b_bsize type
On Thu, May 29, 2003 at 03:35:03AM -0700, William Lee Irwin III wrote:
> On Thu, May 29, 2003 at 08:29:40PM +1000, Stewart Smith wrote:
> > The buffer_head structure (include/linux/buffer_head.h) uses a u32 type
> > while everywhere else (e.g. bread) the size parameter is of type int.
> > Currently on all architectures u32 is defined as unsigned int. We
> > should probably not be doing unsigned and signed swaps. And you should
> > never really have a negative size of a buffer.
> > So, there are two solutions: either change the buffer_head struct to be
> > int so it matches everywhere else, or change everywhere else.
> > The attached patch does the change in one place. Although perhaps
> > changing everywhere else would be better. Thoughts? I'm happy to make
> > up the patch if needed.
> > Applies cleanly to 2.5.69 and 2.5.70 and has been tested on i386
> > without causing any further problems (that I can see at least).
> 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...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.086 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site