[lkml]   [2000]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectbuffer_head.b_blocknr is unsigned long, not int
Throughout linux/fs/buffer.c, the struct buffer_head member b_blocknr has
integer values put into it, while it's defined to be an unsigned long in
fs.h. For architectures where sizeof(int) != sizeof(long), calls to bread()
could potentially do the wrong thing if the disk has more than 2^41 blocks
(2 TB or more, depending on block size).

Before hunting down all the places where b_blocknr gets an integer put in
it, and making a patch, I thought I'd ask first if there's a good reason why
it's done this way. In a few places, values such as -1 and -1000 are put
there as dummy values, so don't hurt anything. Are there other reasons?

Matt Domsch
Dell Enterprise Systems Group
Linux Development Team

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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