]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Minor xfsprogs updates - add checks for pthreads lib, add missing stripe
authorNathan Scott <nathans@sgi.com>
Thu, 26 Jun 2003 07:05:59 +0000 (07:05 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 26 Jun 2003 07:05:59 +0000 (07:05 +0000)
info init in libxfs_mount, testing script for large filesystems.
Add in pthreads library checks.

aclocal.m4
configure.in
doc/CHANGES
include/builddefs.in
libxfs/init.c
m4/Makefile
m4/package_pthread.m4 [new file with mode: 0644]

index 2679de5f1246bff9cd0906a1b2619382d09298bd..598cca86c4efc147299276ad7af5e2b7fbae3ee0 100644 (file)
@@ -1,14 +1,15 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
+# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
 # 
 # Generic macro, sets up all of the global packaging variables.
@@ -199,6 +200,26 @@ AC_DEFUN([AC_PACKAGE_CHECK_LIBUUID],
   [ test $pkg_platform = freebsd && libuuid=""
   ])
 
+AC_DEFUN([AC_PACKAGE_NEED_PTHREAD_H],
+  [ AC_CHECK_HEADERS(pthread.h)
+    if test $ac_cv_header_pthread_h = no; then
+       AC_CHECK_HEADERS(pthread.h,, [
+       echo
+       echo 'FATAL ERROR: could not find a valid pthread header.'
+       exit 1])
+    fi
+  ])
+
+AC_DEFUN([AC_PACKAGE_NEED_PTHREADMUTEXINIT],
+  [ AC_CHECK_LIB(pthread, pthread_mutex_init,, [
+       echo
+       echo 'FATAL ERROR: could not find a valid pthread library.'
+       exit 1
+    ])
+    libpthread=-lpthread
+    AC_SUBST(libpthread)
+  ])
+
 # 
 # Check if we have a type for the pointer's size integer (__psint_t)
 # 
index b091a4796180abb7a964b5b885516f8d209f0271..df99023a81951ce91ba36358d7a26eaaa6c661d9 100644 (file)
@@ -38,6 +38,9 @@ AC_ARG_ENABLE(shared-uuid,
 AC_PACKAGE_CHECK_LIBUUID
 AC_SUBST(libuuid)
 
+AC_PACKAGE_NEED_PTHREAD_H
+AC_PACKAGE_NEED_PTHREADMUTEXINIT
+
 AC_TYPE_PSINT
 AC_TYPE_PSUNSIGNED
 AC_SIZEOF_POINTERS_AND_LONG
index b654d821c927cae677db32528505e06cd71a7c3b..ba6c1560bb0f8f2c7ecfeed6eeed907cf0bb7ac5 100644 (file)
@@ -1,6 +1,10 @@
 xfsprogs-2.5.2 (25 June 2003)
        - Fix xvm stripe detection in libdisk - pass correctly
          sized structures to xvm ioctls.
+       - Add pthread library checks into configure and build scripts
+         for work-in-progress on xfs_repair and xfs_copy.
+       - Fix missing initialisation of stripe unit/width alignment
+         information during libxfs_mount.
 
 xfsprogs-2.5.1 (23 June 2003)
        - Fix libdisk device driver (volume managers) detection code
index b6ed182ce5bb0204fa48735cdc6d3bb5f5c2102b..3f535f6fbf759e70df256c99087ac5afd4569f74 100644 (file)
@@ -40,6 +40,7 @@ OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
 
 LIBUUID = @libuuid@
+LIBPTHREAD = @libpthread@
 LIBEDITLINE = @libeditline@
 LIBREADLINE = @libreadline@
 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
index e6f5ba1087aa564e0b987a9fc51f0aac320274cf..ad3a971ccad4faa2fa6c54a2157882ebd4543302 100644 (file)
@@ -585,6 +585,14 @@ libxfs_mount(
 
        mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE;
 
+       /*
+        * Set whether we're using stripe alignment.
+        */
+       if (XFS_SB_VERSION_HASDALIGN(&mp->m_sb)) {
+               mp->m_dalign = sbp->sb_unit;
+               mp->m_swidth = sbp->sb_width;
+       }
+
        /*
         * Set whether we're using inode alignment.
         */
index 3220d19c92e25a396ed6c0fb13eddb52ff415a79..2d06fec1c4ef00b508b21ce5c7ca0ecc82a91993 100644 (file)
@@ -36,6 +36,7 @@ include $(TOPDIR)/include/builddefs
 LSRCFILES = \
        manual_format.m4 \
        package_globals.m4 \
+       package_pthread.m4 \
        package_types.m4 \
        package_utilies.m4 \
        package_uuiddev.m4
diff --git a/m4/package_pthread.m4 b/m4/package_pthread.m4
new file mode 100644 (file)
index 0000000..be21d29
--- /dev/null
@@ -0,0 +1,19 @@
+AC_DEFUN([AC_PACKAGE_NEED_PTHREAD_H],
+  [ AC_CHECK_HEADERS(pthread.h)
+    if test $ac_cv_header_pthread_h = no; then
+       AC_CHECK_HEADERS(pthread.h,, [
+       echo
+       echo 'FATAL ERROR: could not find a valid pthread header.'
+       exit 1])
+    fi
+  ])
+
+AC_DEFUN([AC_PACKAGE_NEED_PTHREADMUTEXINIT],
+  [ AC_CHECK_LIB(pthread, pthread_mutex_init,, [
+       echo
+       echo 'FATAL ERROR: could not find a valid pthread library.'
+       exit 1
+    ])
+    libpthread=-lpthread
+    AC_SUBST(libpthread)
+  ])