Re: [PATCH 15/15][e2fsprogs] 64-bit mke2fs cleanup

Theodore Tso
2008-07-16T14:54:32Z

On Wed, Jul 16, 2008 at 09:09:31AM -0500, Jose R. Santos wrote:
> No, ext2fs_get_device_size2() should return EFBIG size if the device is
> larger than 48-bit. I need to fix that on ext2fs_get_device_size2() but
> this check here is ok.

No, please don't do that. Make it reuturn EFBIG if the device won't
fit in a blk64_t type (i.e., larger than 64-bits). In mke2fs, there
should be a separate check to make sure the size is no larger than
48-bits. Otherwise, at some future point, perhaps we might enhance
ext4 to support full a 64-bit physical block number, and then we would
have to make behavioural changes to ext2fs_get_device_size2() that
would necessitate renaming the function yet again.

It's really important when doing library design to think about future
expandability.

- Ted