On Wed, 16 Jul 2008 10:54:29 -0400 Theodore Tso <tytso@xxxxxxx> wrote: > 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. This would not be a API or ABI change so I don't see why another renaming function would be needed. It also doesn't change the behavior of ext2fs_get_device_size2() since it returns EFBIG when a device is larger than what e2fsprogs currently supports, whether that 48bit or 64bits. Putting the limit ext2fs_get_device_size2() avoid folks from abusing something that probably isn't supported. > - Ted -JRS -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html