lkml.org 
[lkml]   [2000]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectbuffer_head.b_blocknr is unsigned long, not int
Date
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?

Thanks,
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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [from the cache]
©2003-2011 Jasper Spaans