Blame SOURCES/glibc-rh712248.patch

b9ba6d
2011-07-07  Ulrich Drepper  <drepper@gmail.com>
b9ba6d
b9ba6d
	[BZ #12868]
b9ba6d
	* sysdeps/unix/sysv/linux/linux_fsinfo.h: Define Lustre constants.
b9ba6d
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
b9ba6d
	Handle Lustre.
b9ba6d
	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Likewise.
b9ba6d
	(__statfs_filesize_max): Likewise.
b9ba6d
	Patch mostly by Andreas Dilger <adilger@whamcloud.com>.
b9ba6d
b9ba6d
Index: glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/internal_statvfs.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.12-2-gc4ccff1.orig/sysdeps/unix/sysv/linux/internal_statvfs.c
b9ba6d
+++ glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/internal_statvfs.c
b9ba6d
@@ -109,6 +109,9 @@ __statvfs_getflags (const char *name, in
b9ba6d
     case LOGFS_MAGIC_U32:
b9ba6d
       fsname = "logfs";
b9ba6d
       break;
b9ba6d
+    case LUSTRE_SUPER_MAGIC:
b9ba6d
+      fsname = "lustre";
b9ba6d
+      break;
b9ba6d
     }
b9ba6d
 
b9ba6d
   FILE *mtab = __setmntent ("/proc/mounts", "r");
b9ba6d
Index: glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/linux_fsinfo.h
b9ba6d
===================================================================
b9ba6d
--- glibc-2.12-2-gc4ccff1.orig/sysdeps/unix/sysv/linux/linux_fsinfo.h
b9ba6d
+++ glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/linux_fsinfo.h
b9ba6d
@@ -77,6 +77,9 @@
b9ba6d
 /* Constant that identifies the `logfs´ filesystem.  */
b9ba6d
 #define LOGFS_MAGIC_U32		0xc97e8168u
b9ba6d
 
b9ba6d
+/* Constant that identifies the `lustre' filesystem.  */
b9ba6d
+#define LUSTRE_SUPER_MAGIC	0x0BD00BD0
b9ba6d
+
b9ba6d
 /* Constants that identify the `minix2' filesystem.  */
b9ba6d
 #define MINIX2_SUPER_MAGIC	0x2468
b9ba6d
 #define MINIX2_SUPER_MAGIC2	0x2478
b9ba6d
@@ -144,6 +147,8 @@
b9ba6d
 /* Maximum link counts.  */
b9ba6d
 #define COH_LINK_MAX		10000
b9ba6d
 #define EXT2_LINK_MAX		32000
b9ba6d
+#define EXT4_LINK_MAX		65000
b9ba6d
+#define LUSTRE_LINK_MAX		EXT4_LINK_MAX
b9ba6d
 #define MINIX2_LINK_MAX		65530
b9ba6d
 #define MINIX_LINK_MAX		250
b9ba6d
 #define REISERFS_LINK_MAX	64535
b9ba6d
Index: glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/pathconf.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.12-2-gc4ccff1.orig/sysdeps/unix/sysv/linux/pathconf.c
b9ba6d
+++ glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/pathconf.c
b9ba6d
@@ -104,6 +104,9 @@ __statfs_link_max (int result, const str
b9ba6d
     case XFS_SUPER_MAGIC:
b9ba6d
       return XFS_LINK_MAX;
b9ba6d
 
b9ba6d
+    case LUSTRE_SUPER_MAGIC:
b9ba6d
+      return LUSTRE_LINK_MAX;
b9ba6d
+
b9ba6d
     default:
b9ba6d
       return LINUX_LINK_MAX;
b9ba6d
     }
b9ba6d
@@ -136,6 +139,7 @@ __statfs_filesize_max (int result, const
b9ba6d
     case UDF_SUPER_MAGIC:
b9ba6d
     case JFS_SUPER_MAGIC:
b9ba6d
     case VXFS_SUPER_MAGIC:
b9ba6d
+    case LUSTRE_SUPER_MAGIC:
b9ba6d
       return 64;
b9ba6d
 
b9ba6d
     case MSDOS_SUPER_MAGIC: