From 5f62ea4ee2c43383411f895cd323e3c67db8eca7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 3 Jan 2020 14:19:15 +0100 Subject: [PATCH] doc: Mention the 64-bit inode number problem. * m4/largefile.m4 (AC_SYS_LARGEFILE): Mention that this macro fixes the 64-bit inode number problem. * doc/posix-functions/stat.texi: Mention that this module fixes the 64-bit inode number problem. * doc/posix-functions/lstat.texi: Likewise. * doc/posix-functions/fstat.texi: Likewise. * doc/posix-functions/readdir.texi: Add more details. * doc/posix-functions/readdir_r.texi: Likewise. --- ChangeLog | 12 ++++++++++++ doc/posix-functions/fstat.texi | 5 +++++ doc/posix-functions/lstat.texi | 5 +++++ doc/posix-functions/readdir.texi | 3 ++- doc/posix-functions/readdir_r.texi | 3 ++- doc/posix-functions/stat.texi | 5 +++++ m4/largefile.m4 | 4 ++++ 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 045aae39fb..a37ece9636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2020-01-03 Bruno Haible + + doc: Mention the 64-bit inode number problem. + * m4/largefile.m4 (AC_SYS_LARGEFILE): Mention that this macro fixes the + 64-bit inode number problem. + * doc/posix-functions/stat.texi: Mention that this module fixes the + 64-bit inode number problem. + * doc/posix-functions/lstat.texi: Likewise. + * doc/posix-functions/fstat.texi: Likewise. + * doc/posix-functions/readdir.texi: Add more details. + * doc/posix-functions/readdir_r.texi: Likewise. + 2020-01-02 Bruno Haible wcrtomb: Add more tests. diff --git a/doc/posix-functions/fstat.texi b/doc/posix-functions/fstat.texi index 579ea42f6c..a404891cb7 100644 --- a/doc/posix-functions/fstat.texi +++ b/doc/posix-functions/fstat.texi @@ -16,6 +16,11 @@ On platforms where @code{off_t} is a 32-bit type, @code{fstat} may not correctly report the size of files or block devices larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.) @item +On Linux/x86 and Linux/x86_64, applications compiled in 32-bit mode cannot +access files that happen to have a 64-bit inode number. This can occur with +file systems such as XFS (typically on large disks) and NFS. +(Cf. @code{AC_SYS_LARGEFILE}.) +@item On Solaris 11.4, when this function yields a timestamp with a nonpositive @code{tv_sec} value, @code{tv_nsec} might be in the range @minus{}1000000000..@minus{}1, representing a negative nanoseconds diff --git a/doc/posix-functions/lstat.texi b/doc/posix-functions/lstat.texi index 9a03cfb337..1b1aff62cd 100644 --- a/doc/posix-functions/lstat.texi +++ b/doc/posix-functions/lstat.texi @@ -13,6 +13,11 @@ On platforms where @code{off_t} is a 32-bit type, @code{lstat} may not correctly report the size of files or block devices larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.) @item +On Linux/x86 and Linux/x86_64, applications compiled in 32-bit mode cannot +access files that happen to have a 64-bit inode number. This can occur with +file systems such as XFS (typically on large disks) and NFS. +(Cf. @code{AC_SYS_LARGEFILE}.) +@item For symlinks, when the argument ends in a slash, some platforms don't dereference the argument: Solaris 9. diff --git a/doc/posix-functions/readdir.texi b/doc/posix-functions/readdir.texi index 61ac883cff..3ec36bdbbc 100644 --- a/doc/posix-functions/readdir.texi +++ b/doc/posix-functions/readdir.texi @@ -15,7 +15,8 @@ MSVC 14. On platforms where @code{off_t} is a 32-bit type, this function may not work correctly on huge directories larger than 2 GB. Also, on platforms where @code{ino_t} is a 32-bit type, this function may report inode numbers -incorrectly. (Cf. @code{AC_SYS_LARGEFILE}.) +incorrectly. This can occur with file systems such as XFS (typically on +large disks) and NFS. (Cf. @code{AC_SYS_LARGEFILE}.) @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/posix-functions/readdir_r.texi b/doc/posix-functions/readdir_r.texi index a56d3902e2..61534488d9 100644 --- a/doc/posix-functions/readdir_r.texi +++ b/doc/posix-functions/readdir_r.texi @@ -25,5 +25,6 @@ Minix 3.1.8, mingw, MSVC 14. On platforms where @code{off_t} is a 32-bit type, this function may not work correctly on huge directories larger than 2 GB. Also, on platforms where @code{ino_t} is a 32-bit type, this function may report inode numbers -incorrectly. The fix is to use the @code{AC_SYS_LARGEFILE} macro. +incorrectly. This can occur with file systems such as XFS (typically on +large disks) and NFS. The fix is to use the @code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/doc/posix-functions/stat.texi b/doc/posix-functions/stat.texi index 395717fe11..27fbe278b3 100644 --- a/doc/posix-functions/stat.texi +++ b/doc/posix-functions/stat.texi @@ -13,6 +13,11 @@ On platforms where @code{off_t} is a 32-bit type, @code{stat} may not correctly report the size of files or block devices larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.) @item +On Linux/x86 and Linux/x86_64, applications compiled in 32-bit mode cannot +access files that happen to have a 64-bit inode number. This can occur with +file systems such as XFS (typically on large disks) and NFS. +(Cf. @code{AC_SYS_LARGEFILE}.) +@item The @code{st_atime}, @code{st_ctime}, @code{st_mtime} fields are affected by the current time zone and by the DST flag of the current time zone on some platforms: diff --git a/m4/largefile.m4 b/m4/largefile.m4 index 40b16bc0e5..e381339c40 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -1,4 +1,5 @@ # Enable large files on systems where this is not the default. +# Enable support for files on Linux file systems with 64-bit inode numbers. # Copyright 1992-1996, 1998-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -73,6 +74,9 @@ rm -rf conftest*[]dnl # one must use special compiler options to get large-file access to work. # For more details about this brain damage please see: # http://www.unix.org/version2/whatsnew/lfs20mar.html +# Additionally, on Linux file systems with 64-bit inodes a file that happens +# to have a 64-bit inode number cannot be accessed by 32-bit applications on +# Linux x86/x86_64. This can occur with file systems such as XFS and NFS. AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files]) -- 2.11.4.GIT