From: <ty...@va...> - 2000-12-19 15:17:44
|
Date: Tue, 19 Dec 2000 11:58:42 +0100 From: Stelian Pop <ste...@al...> > Since I work only on purerly userspace and kernel LFS systems > I didn't cared to make it dynamic with an > autoconf check in LFS, but it should be easy to add for you. Does it hurt to use this patch on a non-LFS system ? Even with this patch, it will continue to run correctly on a non-LFS system I suppose... I *really* don't like usage of -D_FILE_OFFSET_BITS=64. This kind of libc magic scares me, and it's the compatibility issue (especially with regards to future versions of glibc, since the glibc developers have proven themselves less than trustworthy about maintaining backwards compatibility in my eyes). In fact, it's not necessary with e2fsprogs; it already supports 64 bit i/o, and it's abstracted away behind the unix_io and llseek interfaces in libext2fs. > And this is the patch against e2fsprogs-1.19. Ted, will you include this in e2fsprogs-1.20 ? If yes, when do you plan to release the new version ? No, I won't include the patch, because the patch is bogus. There's a reason why ext2fs_block_iterate passes BLOCK_FLAG_NO_LARGE to ext2fs_block_iterate2; that's to avoid surprising old binaries which were linked the libraries, and weren't expecting to be able to deal with large filesystems. In addition, the interface for ext2fs_block_iterate uses a 32 bit value for the block count variable, which isn't enough for files which have more than 2**32 blocks. So ext2fs_block_iterate() will return EXT2_ET_FILE_TOO_BIG for largefiles, just as the LFS specification requires that open/read/write return EFBIG unless the file was opened using the O_LARGE flag (or the open64/read64/write64 interfaces are used). I treat backwards compatibility very seriously, and that means not making changes that might break old binaries. If your application is known to be 64-bit clean, and won't get surprised by large files, it should use the ext2fs_block_iterate2 interface. Hence, a largefile-knowledgeable version dump should not require a special version of e2fsprogs/libext2fs. The ext2fs_block_iterate2 interface has been around since version 1.12. - Ted |