buffer_head.b_blocknr is unsigned long, not int

From: Matt_Domsch@Dell.com
Date: Mon Oct 02 2000 - 11:56:15 EST


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/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:10 EST