Blame SOURCES/glibc-rh712248.patch

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