On 2/18/13 3:43 AM, Matthias Schniedermeyer wrote:
> The more or less simple question is:
> Is the requirement for 32bit programs to support 64bit inodes the same
> as LFS(Large File Support)?
> IOW if a programs was compiled with FILE_OFFSET_BITS=64 (if i remember
> that name correctly) should it work?
I think so (I don't know where the formal documentation is,
http://users.suse.com/~aj/linux_lfs.html is an old but still good
over view I think). From open(2):
(stat()) path refers to a file whose size cannot be represented
in the type off_t. This can occur when an application
compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64
calls stat() on a file whose size exceeds (2<<31)-1 bits.
EOVERFLOW can happen if the inode nubmer doesn't fit in a (32-bit)
stat struct as well.
> So that all programs compiled in the last several years in a halfway
> recent distribution should be able to cope with 64bit inodes?
The syscalls it makes should be able to, at least. What it does after
that is up to the program.
(i.e. you might do a nice stat64 and then try to stuff the size or the
inode number into a 32-bit variable; the -D_FILE_OFFSET_BITS won't help
in that case.)
I did a test long ago at :
and the results weren't too encouraging; I should try it again on a
more recent distro, and see how things look.
> The program i care about most is rsync and it appears to work correctly
> when i tested it with 2 hard-linked files (with an inode >2^32) and the
> option to preserve hard links. And "find" and "stat" also worked,
> otherwise i couldn't have found the file to test it with. ;-)