Author: aurel32 Date: 2011-10-30 19:09:46 +0000 (Sun, 30 Oct 2011) New Revision: 5025
Added: glibc-package/branches/glibc-branch-squeeze/debian/patches/any/cvs-statvfs-mount-flags.diff Modified: glibc-package/branches/glibc-branch-squeeze/debian/changelog glibc-package/branches/glibc-branch-squeeze/debian/patches/series Log: * patches/any/cvs-statvfs-mount-flags.diff: get the mount flags directly from the kernel when possible instead of parsing /proc/mounts. Closes: #639897. Modified: glibc-package/branches/glibc-branch-squeeze/debian/changelog =================================================================== --- glibc-package/branches/glibc-branch-squeeze/debian/changelog 2011-10-30 18:57:23 UTC (rev 5024) +++ glibc-package/branches/glibc-branch-squeeze/debian/changelog 2011-10-30 19:09:46 UTC (rev 5025) @@ -52,6 +52,9 @@ sometimes causes a deadlock when calling fork() from a thread. * patches/amd64/cvs-avx-detection.diff: do not use AVX if hardware support is present, but not enabled in the kernel. Closes: #646549. + * patches/any/cvs-statvfs-mount-flags.diff: get the mount flags directly + from the kernel when possible instead of parsing /proc/mounts. Closes: + #639897. -- Aurelien Jarno <aure...@debian.org> Sat, 11 Jun 2011 18:12:35 +0200 Added: glibc-package/branches/glibc-branch-squeeze/debian/patches/any/cvs-statvfs-mount-flags.diff =================================================================== --- glibc-package/branches/glibc-branch-squeeze/debian/patches/any/cvs-statvfs-mount-flags.diff (rev 0) +++ glibc-package/branches/glibc-branch-squeeze/debian/patches/any/cvs-statvfs-mount-flags.diff 2011-10-30 19:09:46 UTC (rev 5025) @@ -0,0 +1,191 @@ +2011-02-28 Aurelien Jarno <aurel...@aurel32.net> + + * ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h (struct statfs, + struct statfs64): Add f_flags field. + +2010-08-12 Joseph Myers <jos...@codesourcery.com> + + * ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, + struct statfs64): Add f_flags field. + +2010-08-11 Ulrich Drepper <drep...@redhat.com> + + * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs): Add f_flags + field. + (struct statfs64): Likewise. + (_STATFS_F_FLAGS): Define. + * sysdeps/unix/sysv/linux/s390/bits/statfs.h: Likewise. + * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): + Don't define if __ASSUME_STATFS_F_FLAGS is defined. + (ST_VALID): Define locally. + (INTERNAL_STATVFS): If f_flags has ST_VALID set don't call + __statvfs_getflags, use the provided value. + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_STATFS_F_FLAGS. + +--- + ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 6 ++++-- + ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h | 6 ++++-- + sysdeps/unix/sysv/linux/bits/statfs.h | 7 +++++-- + sysdeps/unix/sysv/linux/internal_statvfs.c | 22 +++++++++++++++++----- + sysdeps/unix/sysv/linux/kernel-features.h | 5 +++++ + sysdeps/unix/sysv/linux/s390/bits/statfs.h | 7 +++++-- + 6 files changed, 40 insertions(+), 13 deletions(-) + +--- a/sysdeps/unix/sysv/linux/bits/statfs.h ++++ b/sysdeps/unix/sysv/linux/bits/statfs.h +@@ -42,7 +42,8 @@ + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; +- __SWORD_TYPE f_spare[5]; ++ __SWORD_TYPE f_flags; ++ __SWORD_TYPE f_spare[4]; + }; + + #ifdef __USE_LARGEFILE64 +@@ -58,10 +59,12 @@ + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; +- __SWORD_TYPE f_spare[5]; ++ __SWORD_TYPE f_flags; ++ __SWORD_TYPE f_spare[4]; + }; + #endif + + /* Tell code we have these members. */ + #define _STATFS_F_NAMELEN + #define _STATFS_F_FRSIZE ++#define _STATFS_F_FLAGS +--- a/sysdeps/unix/sysv/linux/internal_statvfs.c ++++ b/sysdeps/unix/sysv/linux/internal_statvfs.c +@@ -29,6 +29,11 @@ + #include <sys/statfs.h> + #include <sys/statvfs.h> + #include "linux_fsinfo.h" ++#include "kernel-features.h" ++ ++ ++/* Special internal-only bit value. */ ++#define ST_VALID 0x0020 + + + #ifndef STATFS +@@ -37,6 +42,7 @@ + # define INTERNAL_STATVFS __internal_statvfs + + ++# ifndef __ASSUME_STATFS_F_FLAGS + int + __statvfs_getflags (const char *name, int fstype, struct stat64 *st) + { +@@ -193,6 +199,7 @@ + + return result; + } ++# endif + #else + extern int __statvfs_getflags (const char *name, int fstype, + struct stat64 *st); +@@ -234,9 +241,14 @@ + /* XXX I have no idea how to compute f_favail. Any idea??? */ + buf->f_favail = buf->f_ffree; + +- /* Determining the flags is tricky. We have to read /proc/mounts or +- the /etc/mtab file and search for the entry which matches the given +- file. The way we can test for matching filesystem is using the +- device number. */ +- buf->f_flag = __statvfs_getflags (name, fsbuf->f_type, st); ++#ifndef __ASSUME_STATFS_F_FLAGS ++ if ((fsbuf->f_flags & ST_VALID) == 0) ++ /* Determining the flags is tricky. We have to read /proc/mounts or ++ the /etc/mtab file and search for the entry which matches the given ++ file. The way we can test for matching filesystem is using the ++ device number. */ ++ buf->f_flag = __statvfs_getflags (name, fsbuf->f_type, st); ++ else ++#endif ++ buf->f_flag = fsbuf->f_flags ^ ST_VALID; + } +--- a/sysdeps/unix/sysv/linux/kernel-features.h ++++ b/sysdeps/unix/sysv/linux/kernel-features.h +@@ -565,3 +565,8 @@ + #if __LINUX_KERNEL_VERSION >= 0x020620 + # define __ASSUME_F_GETOWN_EX 1 + #endif ++ ++/* statfs fills in f_flags since 2.6.36. */ ++#if __LINUX_KERNEL_VERSION >= 0x020624 ++# define __ASSUME_STATFS_F_FLAGS 1 ++#endif +--- a/sysdeps/unix/sysv/linux/s390/bits/statfs.h ++++ b/sysdeps/unix/sysv/linux/s390/bits/statfs.h +@@ -42,7 +42,8 @@ + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + + #ifdef __USE_LARGEFILE64 +@@ -58,10 +59,12 @@ + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + #endif + + /* Tell code we have this member. */ + #define _STATFS_F_NAMELEN + #define _STATFS_F_FRSIZE ++#define _STATFS_F_FLAGS +--- a/ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h ++++ b/ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h +@@ -45,7 +45,8 @@ + /* Linux specials */ + __fsid_t f_fsid; + long int f_namelen; +- long int f_spare[6]; ++ long int f_flags; ++ long int f_spare[5]; + }; + + #ifdef __USE_LARGEFILE64 +@@ -64,7 +65,8 @@ + /* Linux specials */ + __fsid_t f_fsid; + long int f_namelen; +- long int f_spare[6]; ++ long int f_flags; ++ long int f_spare[5]; + }; + #endif + +--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h ++++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +@@ -42,7 +42,8 @@ + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + + #ifdef __USE_LARGEFILE64 +@@ -58,7 +59,8 @@ + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + #endif + Modified: glibc-package/branches/glibc-branch-squeeze/debian/patches/series =================================================================== --- glibc-package/branches/glibc-branch-squeeze/debian/patches/series 2011-10-30 18:57:23 UTC (rev 5024) +++ glibc-package/branches/glibc-branch-squeeze/debian/patches/series 2011-10-30 19:09:46 UTC (rev 5025) @@ -267,3 +267,4 @@ any/cvs-pthread-setgroups.diff any/cvs-dl_close-scope-handling.diff any/cvs-nptl-pthread-race.diff +any/cvs-statvfs-mount-flags.diff -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1rkalo-00048o...@vasks.debian.org