This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/1978] New: statvfs returns incorrect mount options in results for non-ext2 / partition


ref. http://bugs.gentoo.org/show_bug.cgi?id=86515 (comment #13 is most relevant)

Originally this manifested for us as a glibc test failure (tst-atime) where the
root partition is reiserfs and set noatime.  The test uses statvfs to determine
whether to skip the check, since there's no point testing atime if the
filesystem is mounted noatime.

Problem is that when sysdeps/unix/sysv/linux/internal_statvfs.c looks for the
mount options in /proc/mounts, it first tries to find a match on mount point +
filesystem.  However it doesn't recognise reiserfs (or xfs, jfs etc) and so
falls back to just matching the mount point.  For the root filesystem therefore,
it finds the rootfs entry:

rootfs / rootfs rw 0 0

rather than the actual live mount (e.g.):

/dev/root / reiserfs rw,noatime 0 0

This leads it to return incorrect data about the mount point, effectively
ignoring any mount options for that mount point.

We've patched it with http://bugs.gentoo.org/attachment.cgi?id=69741 for the
moment, simply adding the more important missing filesystem magic so it now
finds reiserfs / partitions on the first pass.  Might be worth considering some
or all of the others listed in sysdeps/unix/sysv/linux/linux_fsinfo.h

The affected code hasn't changed in a couple of years; 2.3.3 onwards are affected.

-- 
           Summary: statvfs returns incorrect mount options in results for
                    non-ext2 / partition
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: kevquinn at gentoo dot org
                CC: glibc-bugs at sources dot redhat dot com,toolchain at
                    gentoo dot org
  GCC host triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=1978

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]