Messages in this thread | | | Date | Thu, 13 Apr 2006 11:14:45 -0600 | From | Andreas Dilger <> | Subject | Re: [Ext2-devel] [RFC][8/21]ext3 modify variables to exceed 2G |
| |
On Apr 13, 2006 16:06 +0900, sho@tnes.nec.co.jp wrote: > Summary of this patch: > [8/21] change the type of variables manipulating a block or an > inode(ext3) > - Change the type of 4byte variables manipulating a block or > an inode from signed to unsigned.
Takashi-san, please, it would make the code much more maintainable if the changes made here would use new types for filesystem-wide block offsets and for file-relative block offsets, as was previously discussed, instead of just changing some variables to be unsigned long. Like:
typedef unsigned long ext3_fsblk_t; # block offset in the filesystem typedef unsigned long ext3_fscnt_t; # block count in the filesystem typedef unsigned long ext3_fileblk_t; # block offset in a file
I believe we should already be using le32 for all on-disk blocks (e.g. indirect blocks, inodes, etc), but this would be good to verify.
This way, when we get to the stage where we want to increase the blocks to be 64-bit (as Laurent has wanted to do) we don't need to go through and re-patch all of the same files to change "unsigned long" to "unsigned long long". It also makes the code easier to read, since it will be clear what kind of variable is being used.
Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.
- 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/
| |