]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle Lustre filesystem
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 7 Jul 2011 04:20:32 +0000 (00:20 -0400)
committerAndreas Schwab <schwab@redhat.com>
Thu, 21 Jul 2011 10:18:50 +0000 (12:18 +0200)
(cherry picked from commit de283087c74f720cf8a7171972e72b5fa2b45e79)

ChangeLog
sysdeps/unix/sysv/linux/internal_statvfs.c
sysdeps/unix/sysv/linux/linux_fsinfo.h
sysdeps/unix/sysv/linux/pathconf.c

index 4d7e1ba669b9d556afb5e0097870a87bc1f6de4d..af6de9054a7f1e9db020f5746efafed10341893c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-07-07  Ulrich Drepper  <drepper@gmail.com>
+
+       [BZ #12868]
+       * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define Lustre constants.
+       * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+       Handle Lustre.
+       * sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Likewise.
+       (__statfs_filesize_max): Likewise.
+       Patch mostly by Andreas Dilger <adilger@whamcloud.com>.
+
 2011-07-06  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #12922]
index 828854806c81b0da22d0d6b7d37b5ecff9d6ec1a..2ddec1edbae1be168a4d0c25f25357b59f9c9085 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2006, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2006, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -115,6 +115,9 @@ __statvfs_getflags (const char *name, int fstype, struct stat64 *st)
     case CGROUP_SUPER_MAGIC:
       fsname = "cgroup";
       break;
+    case LUSTRE_SUPER_MAGIC:
+      fsname = "lustre";
+      break;
     }
 
   FILE *mtab = __setmntent ("/proc/mounts", "r");
index a0e070071dd474090428d624190492b1fa74277a..55bc6e380aa327dac53543ef0e902e51b0acb9ad 100644 (file)
@@ -1,5 +1,5 @@
 /* Constants from kernel header for various FSes.
-   Copyright (C) 1998-2003,2005,2010 Free Software Foundation, Inc.
+   Copyright (C) 1998-2003,2005,2010,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -83,6 +83,9 @@
 /* Constant that identifies the `logfs' filesystem.  */
 #define LOGFS_MAGIC_U32                0xc97e8168u
 
+/* Constant that identifies the `lustre' filesystem.  */
+#define LUSTRE_SUPER_MAGIC     0x0BD00BD0
+
 /* Constants that identify the `minix2' filesystem.  */
 #define MINIX2_SUPER_MAGIC     0x2468
 #define MINIX2_SUPER_MAGIC2    0x2478
 /* Maximum link counts.  */
 #define COH_LINK_MAX           10000
 #define EXT2_LINK_MAX          32000
+#define EXT4_LINK_MAX          65000
+#define LUSTRE_LINK_MAX                EXT4_LINK_MAX
 #define MINIX2_LINK_MAX                65530
 #define MINIX_LINK_MAX         250
 #define REISERFS_LINK_MAX      64535
index 52610a14d8c141eba3d2a85a27b7ad55f0ffe1ea..42b7b80c39c9f814cf2444c23ecb6f369a55c40d 100644 (file)
@@ -121,6 +121,9 @@ __statfs_link_max (int result, const struct statfs *fsbuf)
     case XFS_SUPER_MAGIC:
       return XFS_LINK_MAX;
 
+    case LUSTRE_SUPER_MAGIC:
+      return LUSTRE_LINK_MAX;
+
     default:
       return LINUX_LINK_MAX;
     }
@@ -157,6 +160,7 @@ __statfs_filesize_max (int result, const struct statfs *fsbuf)
     case JFS_SUPER_MAGIC:
     case VXFS_SUPER_MAGIC:
     case CGROUP_SUPER_MAGIC:
+    case LUSTRE_SUPER_MAGIC:
       return 64;
 
     case MSDOS_SUPER_MAGIC: