all:
cd src && cd libafs && $(MAKE)
+
+clean:
+ cd src && cd libafs && $(MAKE) clean
+
+distclean: clean
+ rm -f Makefile src/config/Makefile.config src/config/Makefile.version \
+ src/libafs/Makefile.common src/libafs/Makefile
You also need access to your kernel build directory for the opt_global.h
include file. Use the --with-bsd-kernel-build= configure option if your
kernel build is not GENERIC in the standard place. If
- /usr/src/sys/i386/compile/GENERIC does not point to
+ /usr/src/sys/${CPUARCH}/compile/GENERIC does not point to
/usr/obj/usr/src/sys/GENERIC you may need to resolve that and retry the
build.
# else
# undef WORDS_BIGENDIAN
# endif
-#endif])
+#endif
+#ifdef UKERNEL
+/*
+ * Always use 64-bit file offsets for UKERNEL code. Needed for UKERNEL stuff to
+ * play nice with some other interfaces like FUSE. We technically only would
+ * need to define this when building for such interfaces, but set it always to
+ * try and reduce potential confusion.
+ */
+#define _FILE_OFFSET_BITS 64
+#endif
#undef AFS_AFSDB_ENV
#undef AFS_LARGEFILE_ENV
#undef ENABLE_REDHAT_BUILDSYS
#if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
#include "redhat-fix.h"
-#endif
+#endif])
AC_CANONICAL_HOST
SRCDIR_PARENT=`pwd`
MKAFS_OSTYPE=DARWIN
AC_MSG_RESULT(x86_darwin)
;;
- *-freebsd*)
+ i386-*-freebsd*)
MKAFS_OSTYPE=FBSD
AC_MSG_RESULT(i386_fbsd)
;;
+ x86_64-*-freebsd*)
+ MKAFS_OSTYPE=FBSD
+ AC_MSG_RESULT(amd64_fbsd)
+ ;;
*-netbsd*)
MKAFS_OSTYPE=NBSD
AC_MSG_RESULT(nbsd)
vm=${v#*.}
AFS_SYSNAME="i386_fbsd_${vM}${vm}"
;;
+ x86_64-*-freebsd?.*)
+ v=${host#*freebsd}
+ vM=${v%.*}
+ vm=${v#*.}
+ AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
+ ;;
i?86-*-netbsd*1.5*)
AFS_PARAM_COMMON=param.nbsd15.h
AFS_SYSNAME="i386_nbsd15"
AFS_PARAM_COMMON=param.nbsd20.h
AFS_SYSNAME="amd64_nbsd20"
;;
- x86_64-*-netbsd*3.[0-8]*)
+ x86_64-*-netbsd*3.[[0-8]]*)
AFS_PARAM_COMMON=param.nbsd30.h
AFS_SYSNAME="amd64_nbsd30"
;;
- x86_64-*-netbsd*4.[0-8]*)
+ x86_64-*-netbsd*4.[[0-8]]*)
AFS_PARAM_COMMON=param.nbsd40.h
AFS_SYSNAME="amd64_nbsd40"
;;
LINUX_EXPORTS_PROC_ROOT_FS
LINUX_HAVE_CURRENT_KERNEL_TIME
LINUX_HAVE_WRITE_BEGIN_AOP
+ LINUX_HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN
+ LINUX_STRUCT_TASK_HAS_CRED
LINUX_KMEM_CACHE_INIT
+ LINUX_HAVE_BDI_INIT
LINUX_HAVE_KMEM_CACHE_T
LINUX_KMEM_CACHE_CREATE_TAKES_DTOR
LINUX_CONFIG_H_EXISTS
LINUX_REFRIGERATOR
LINUX_LINUX_KEYRING_SUPPORT
LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
+ LINUX_KEY_ALLOC_NEEDS_CRED
LINUX_DO_SYNC_READ
LINUX_GENERIC_FILE_AIO_READ
LINUX_INIT_WORK_HAS_DATA
LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
LINUX_SYSCTL_TABLE_CHECKING
LINUX_HAVE_IGET
+ LINUX_HAVE_I_SIZE_READ
LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH
LINUX_EXPORTS_INIT_MM
LINUX_EXPORTS_SYS_CHDIR
AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h)
AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
-AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h poll.h)
+AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h poll.h sys/pag.h)
AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h sys/user.h)
AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h regex.h)
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2006-03-13'
+timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T:Interix*:[345]*)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
XLIBS
KRB5_CONFIG
BUILD_KRB5
+MAKE_KRB5
KRB5CFLAGS
KRB5LIBS
HELPER_SPLINT
# Define the identity of the package.
PACKAGE=openafs
- VERSION=1.4.8
+ VERSION=1.4.9pre2
cat >>confdefs.h <<_ACEOF
ac_config_headers="$ac_config_headers src/config/afsconfig.h"
-MACOS_VERSION=1.4.8
-LINUX_PKGVER=1.4.8
-#LINUX_PKGREL=0.pre3
-LINUX_PKGREL=1.1
+MACOS_VERSION=1.4.9fc2
+LINUX_PKGVER=1.4.9
+#LINUX_PKGREL=1.1
+LINUX_PKGREL=0.pre2
test -n "$PATH_CPP" && break
done
+test -n "$PATH_CPP" || PATH_CPP="${CC-cc} -E"
# Make sure we can run config.sub.
-#undef AFS_AFSDB_ENV
-#undef AFS_LARGEFILE_ENV
-#undef AFS_NAMEI_ENV
-#undef BITMAP_LATER
-#undef BOS_RESTRICTED_MODE
-#undef BOS_NEW_CONFIG
-#undef FAST_RESTART
-#undef FULL_LISTVOL_SWITCH
-#undef COMPLETION_H_EXISTS
-#undef DEFINED_FOR_EACH_PROCESS
-#undef DEFINED_PREV_TASK
-#undef EXPORTED_KALLSYMS_ADDRESS
-#undef EXPORTED_KALLSYMS_SYMBOL
-#undef EXPORTED_SYS_CALL_TABLE
-#undef EXPORTED_IA32_SYS_CALL_TABLE
-#undef EXPORTED_TASKLIST_LOCK
-#undef INODE_SETATTR_NOT_VOID
-#undef IRIX_HAS_MEM_FUNCS
-#undef RECALC_SIGPENDING_TAKES_VOID
-#undef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
-#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
-#undef STRUCT_FS_HAS_FS_ROLLED
-#undef STRUCT_INODE_HAS_I_DEVICES
-#undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
-#undef STRUCT_INODE_HAS_I_ALLOC_SEM
-#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
-#undef STRUCT_TASK_STRUCT_HAS_PARENT
-#undef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
-#undef STRUCT_TASK_STRUCT_HAS_SIG
-#undef STRUCT_TASK_STRUCT_HAS_SIGHAND
-#undef STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
-#undef ssize_t
-#undef SIZEOF_TIME_T
-#undef HAVE_STRUCT_BUF
-#undef HAVE_ARPA_NAMESER_COMPAT_H
-/* glue for RedHat kernel bug */
-#undef ENABLE_REDHAT_BUILDSYS
-#if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
-#include "redhat-fix.h"
-#endif
-
{ echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
{ echo "$as_me:$LINENO: result: x86_darwin" >&5
echo "${ECHO_T}x86_darwin" >&6; }
;;
- *-freebsd*)
+ i386-*-freebsd*)
MKAFS_OSTYPE=FBSD
{ echo "$as_me:$LINENO: result: i386_fbsd" >&5
echo "${ECHO_T}i386_fbsd" >&6; }
;;
+ x86_64-*-freebsd*)
+ MKAFS_OSTYPE=FBSD
+ { echo "$as_me:$LINENO: result: amd64_fbsd" >&5
+echo "${ECHO_T}amd64_fbsd" >&6; }
+ ;;
*-netbsd*)
MKAFS_OSTYPE=NBSD
{ echo "$as_me:$LINENO: result: nbsd" >&5
vm=${v#*.}
AFS_SYSNAME="i386_fbsd_${vM}${vm}"
;;
+ x86_64-*-freebsd?.*)
+ v=${host#*freebsd}
+ vM=${v%.*}
+ vm=${v#*.}
+ AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
+ ;;
i?86-*-netbsd*1.5*)
AFS_PARAM_COMMON=param.nbsd15.h
AFS_SYSNAME="i386_nbsd15"
AFS_PARAM_COMMON=param.nbsd20.h
AFS_SYSNAME="amd64_nbsd20"
;;
- x86_64-*-netbsd*3.0-8*)
+ x86_64-*-netbsd*3.[0-8]*)
AFS_PARAM_COMMON=param.nbsd30.h
AFS_SYSNAME="amd64_nbsd30"
;;
- x86_64-*-netbsd*4.0-8*)
+ x86_64-*-netbsd*4.[0-8]*)
AFS_PARAM_COMMON=param.nbsd40.h
AFS_SYSNAME="amd64_nbsd40"
;;
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_linux_kbuild_requires_extra_cflags=no
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then :
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_find_task_by_pid=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_proc_root_fs=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_current_kernel_time=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_write_begin=yes
else
sed '/^ *+/d' conftest.err >&5
fi
+ { echo "$as_me:$LINENO: checking for linux grab_cache_page_write_begin()" >&5
+echo $ECHO_N "checking for linux grab_cache_page_write_begin()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_grab_cache_page_write_begin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/pagemap.h>
+
+void conftest(void)
+{
+grab_cache_page_write_begin(NULL, 0, 0);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_grab_cache_page_write_begin=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_grab_cache_page_write_begin=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/pagemap.h>
+int
+main ()
+{
+grab_cache_page_write_begin(NULL, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_grab_cache_page_write_begin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_grab_cache_page_write_begin=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_grab_cache_page_write_begin" >&5
+echo "${ECHO_T}$ac_cv_linux_grab_cache_page_write_begin" >&6; }
+ if test "x$ac_cv_linux_grab_cache_page_write_begin" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN 1
+_ACEOF
+
+ fi
+
+ { echo "$as_me:$LINENO: checking if struct task has cred" >&5
+echo $ECHO_N "checking if struct task has cred... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_struct_task_has_cred+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/cred.h>
+
+void conftest(void)
+{
+struct task_struct _t;
+uid_t _u;
+_u =_t.cred->uid ;
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_struct_task_has_cred=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_struct_task_has_cred=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/cred.h>
+int
+main ()
+{
+struct task_struct _t;
+uid_t _u;
+_u =_t.cred->uid ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_struct_task_has_cred=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_struct_task_has_cred=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_struct_task_has_cred" >&5
+echo "${ECHO_T}$ac_cv_linux_struct_task_has_cred" >&6; }
+ if test "x$ac_cv_linux_struct_task_has_cred" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRUCT_TASK_HAS_CRED 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for new kmem_cache init function parameters" >&5
echo $ECHO_N "checking for new kmem_cache init function parameters... $ECHO_C" >&6; }
if test "${ac_cv_linux_kmem_cache_init+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kmem_cache_init=yes
else
sed '/^ *+/d' conftest.err >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_linux_kmem_cache_init=yes
+ ac_cv_linux_kmem_cache_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_kmem_cache_init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_kmem_cache_init" >&5
+echo "${ECHO_T}$ac_cv_linux_kmem_cache_init" >&6; }
+
+ { echo "$as_me:$LINENO: checking for linux bdi_init()" >&5
+echo $ECHO_N "checking for linux bdi_init()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_bdi_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/backing-dev.h>
+
+void conftest(void)
+{
+bdi_init(NULL);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_bdi_init=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_bdi_init=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/backing-dev.h>
+int
+main ()
+{
+bdi_init(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_bdi_init=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_linux_kmem_cache_init=no
+ ac_cv_linux_bdi_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
fi
- { echo "$as_me:$LINENO: result: $ac_cv_linux_kmem_cache_init" >&5
-echo "${ECHO_T}$ac_cv_linux_kmem_cache_init" >&6; }
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_bdi_init" >&5
+echo "${ECHO_T}$ac_cv_linux_bdi_init" >&6; }
+ if test "x$ac_cv_linux_bdi_init" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDI_INIT 1
+_ACEOF
+
+ fi
{ echo "$as_me:$LINENO: checking whether kmem_cache_t exists" >&5
echo $ECHO_N "checking whether kmem_cache_t exists... $ECHO_C" >&6; }
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_kmem_cache_t=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kmem_cache_create_takes_dtor=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_config_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_completion_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_semaphore_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_defines_for_each_process=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_defines_prev_task=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_super_has_alloc_inode=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_address_space_has_page_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_alloc_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_blkbits=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_blksize=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_devices=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_mutex=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_sb_list=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_security=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_inotify_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_inotify_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_inode_setattr_returns_int=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_write_inode_returns_int=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_create_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_lookup_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_permission_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_put_link_takes_cookie=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_d_revalidate_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_f_flush_takes_fl_owner_t=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_a_writepage_takes_writeback_control=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_flock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_sendfile=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_splice=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_posix_lock_file_wait_arg=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_sock_create_v=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_page_follow_link=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_hlist_unhashed=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_key_type_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_recalc_sigpending_takes_void=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_parent=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_real_parent=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sig=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sighand=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_rlim=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_exit_state=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_tgid=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_todo=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_thread_info=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_tasklist_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_get_sb_has_struct_vfsmount=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_statfs_takes_dentry=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_freezer_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_refrigerator_takes_pf_freeze=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_keyring_support=yes
else
sed '/^ *+/d' conftest.err >&5
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
if test $AFS_SYSKVERS -ge 26 ; then
rm -fr conftest.dir
void conftest(void)
{
-(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);
+struct task_struct *t=NULL;
+(void) key_alloc(NULL, NULL, 0, 0, t, 0, 0);
}
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_key_alloc_needs_struct_task=yes
else
sed '/^ *+/d' conftest.err >&5
int
main ()
{
-(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);
+struct task_struct *t=NULL;
+(void) key_alloc(NULL, NULL, 0, 0, t, 0, 0);
;
return 0;
}
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$ac_save_CPPFLAGS"
fi
+ CPPFLAGS="$save_CPPFLAGS"
fi
{ echo "$as_me:$LINENO: result: $ac_cv_key_alloc_needs_struct_task" >&5
fi
+ { echo "$as_me:$LINENO: checking if key_alloc() takes credentials" >&5
+echo $ECHO_N "checking if key_alloc() takes credentials... $ECHO_C" >&6; }
+ if test "${ac_cv_key_alloc_needs_cred+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/rwsem.h>
+#include <linux/key.h>
+
+
+void conftest(void)
+{
+struct cred *c = NULL;
+(void) key_alloc(NULL, NULL, 0, 0, c, 0, 0);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_key_alloc_needs_cred=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_key_alloc_needs_cred=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/rwsem.h>
+#include <linux/key.h>
+
+int
+main ()
+{
+struct cred *c = NULL;
+(void) key_alloc(NULL, NULL, 0, 0, c, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_key_alloc_needs_cred=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_key_alloc_needs_cred=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_key_alloc_needs_cred" >&5
+echo "${ECHO_T}$ac_cv_key_alloc_needs_cred" >&6; }
+ if test "x$ac_cv_key_alloc_needs_cred" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define KEY_ALLOC_NEEDS_CRED 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for linux do_sync_read()" >&5
echo $ECHO_N "checking for linux do_sync_read()... $ECHO_C" >&6; }
if test "${ac_cv_linux_do_sync_read+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_do_sync_read=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_generic_file_aio_read=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_init_work_has_data=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_register_sysctl_table_noflag=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sysctl_table_checking=no
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_iget=yes
else
sed '/^ *+/d' conftest.err >&5
{ echo "$as_me:$LINENO: result: $ac_cv_linux_have_iget" >&5
echo "${ECHO_T}$ac_cv_linux_have_iget" >&6; }
+ { echo "$as_me:$LINENO: checking for linux i_size_read()" >&5
+echo $ECHO_N "checking for linux i_size_read()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_i_size_read+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/fs.h>
+
+void conftest(void)
+{
+i_size_read(NULL);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_i_size_read=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_i_size_read=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/fs.h>
+int
+main ()
+{
+i_size_read(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_i_size_read=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_i_size_read=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_i_size_read" >&5
+echo "${ECHO_T}$ac_cv_linux_i_size_read" >&6; }
+ if test "x$ac_cv_linux_i_size_read" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LINUX_I_SIZE_READ 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for path in struct nameidata" >&5
echo $ECHO_N "checking for path in struct nameidata... $ECHO_C" >&6; }
if test "${ac_cv_linux_struct_nameidata_has_path+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_struct_nameidata_has_path=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_init_mm=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_chdir=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_close=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_open=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_wait4=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_rcu_read_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_config_smp=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_kallsyms_address=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_kallsyms_symbol=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_call_table=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_ia32_sys_call_table=yes
else
sed '/^ *+/d' conftest.err >&5
-for ac_header in sys/mount.h strings.h termios.h signal.h poll.h
+
+for ac_header in sys/mount.h strings.h termios.h signal.h poll.h sys/pag.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
SHLIB_LINKER="ld -b"
;;
- *fbsd_*)
+ i386_fbsd_*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
MT_LIBS="-pthread"
YACC="byacc"
;;
+ amd64_fbsd_*)
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-pthread"
+ PAM_CFLAGS="-O2 -pipe -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ SHLIB_LINKER="${MT_CC} -shared"
+ TXLIBS="-lncurses"
+ XCFLAGS="-O2 -pipe -fPIC"
+ YACC="byacc"
+ ;;
+
*nbsd2*|*nbsd3*|*nbsd4*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
;;
ppc_darwin_70)
- AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
+ AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
LEX="lex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
KROOT=
fi
-if test X$with_krb5 = Xyes; then
+if test X$with_krb5 != X; then
if test X$conf_krb5 = XYES; then
{ { echo "$as_me:$LINENO: error: --with-krb5-config and --with-krb5 are mutually exclusive, choose only one" >&5
echo "$as_me: error: --with-krb5-config and --with-krb5 are mutually exclusive, choose only one" >&2;}
fi
BUILD_KRB5=no
+MAKE_KRB5=#
if test X$conf_krb5 = XYES; then
{ echo "$as_me:$LINENO: result: Configuring support for Kerberos 5 utilities" >&5
echo "${ECHO_T}Configuring support for Kerberos 5 utilities" >&6; }
BUILD_KRB5=yes
+ MAKE_KRB5=
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
save_LIBS="$LIBS"
+
TOP_SRCDIR="${srcdir}/src"
case $TOP_SRCDIR in
/*)
XLIBS!$XLIBS$ac_delim
KRB5_CONFIG!$KRB5_CONFIG$ac_delim
BUILD_KRB5!$BUILD_KRB5$ac_delim
+MAKE_KRB5!$MAKE_KRB5$ac_delim
KRB5CFLAGS!$KRB5CFLAGS$ac_delim
KRB5LIBS!$KRB5LIBS$ac_delim
HELPER_SPLINT!$HELPER_SPLINT$ac_delim
-HELPER_SPLINTCFG!$HELPER_SPLINTCFG$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+HELPER_SPLINTCFG!$HELPER_SPLINTCFG$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
XLIBS
KRB5_CONFIG
BUILD_KRB5
+MAKE_KRB5
KRB5CFLAGS
KRB5LIBS
HELPER_SPLINT
# Define the identity of the package.
PACKAGE=openafs-libafs
- VERSION=1.4.8
+ VERSION=1.4.9pre2
cat >>confdefs.h <<_ACEOF
ac_config_headers="$ac_config_headers src/config/afsconfig.h"
-MACOS_VERSION=1.4.8
-LINUX_PKGVER=1.4.8
-#LINUX_PKGREL=0.pre3
-LINUX_PKGREL=1.1
+MACOS_VERSION=1.4.9fc2
+LINUX_PKGVER=1.4.9
+#LINUX_PKGREL=1.1
+LINUX_PKGREL=0.pre2
-#undef AFS_AFSDB_ENV
-#undef AFS_LARGEFILE_ENV
-#undef AFS_NAMEI_ENV
-#undef BITMAP_LATER
-#undef BOS_RESTRICTED_MODE
-#undef BOS_NEW_CONFIG
-#undef FAST_RESTART
-#undef FULL_LISTVOL_SWITCH
-#undef COMPLETION_H_EXISTS
-#undef DEFINED_FOR_EACH_PROCESS
-#undef DEFINED_PREV_TASK
-#undef EXPORTED_KALLSYMS_ADDRESS
-#undef EXPORTED_KALLSYMS_SYMBOL
-#undef EXPORTED_SYS_CALL_TABLE
-#undef EXPORTED_IA32_SYS_CALL_TABLE
-#undef EXPORTED_TASKLIST_LOCK
-#undef INODE_SETATTR_NOT_VOID
-#undef IRIX_HAS_MEM_FUNCS
-#undef RECALC_SIGPENDING_TAKES_VOID
-#undef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
-#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
-#undef STRUCT_FS_HAS_FS_ROLLED
-#undef STRUCT_INODE_HAS_I_DEVICES
-#undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
-#undef STRUCT_INODE_HAS_I_ALLOC_SEM
-#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
-#undef STRUCT_TASK_STRUCT_HAS_PARENT
-#undef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
-#undef STRUCT_TASK_STRUCT_HAS_SIG
-#undef STRUCT_TASK_STRUCT_HAS_SIGHAND
-#undef STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
-#undef ssize_t
-#undef SIZEOF_TIME_T
-#undef HAVE_STRUCT_BUF
-#undef HAVE_ARPA_NAMESER_COMPAT_H
-/* glue for RedHat kernel bug */
-#undef ENABLE_REDHAT_BUILDSYS
-#if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
-#include "redhat-fix.h"
-#endif
-
{ echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
{ echo "$as_me:$LINENO: result: x86_darwin" >&5
echo "${ECHO_T}x86_darwin" >&6; }
;;
- *-freebsd*)
+ i386-*-freebsd*)
MKAFS_OSTYPE=FBSD
{ echo "$as_me:$LINENO: result: i386_fbsd" >&5
echo "${ECHO_T}i386_fbsd" >&6; }
;;
+ x86_64-*-freebsd*)
+ MKAFS_OSTYPE=FBSD
+ { echo "$as_me:$LINENO: result: amd64_fbsd" >&5
+echo "${ECHO_T}amd64_fbsd" >&6; }
+ ;;
*-netbsd*)
MKAFS_OSTYPE=NBSD
{ echo "$as_me:$LINENO: result: nbsd" >&5
vm=${v#*.}
AFS_SYSNAME="i386_fbsd_${vM}${vm}"
;;
+ x86_64-*-freebsd?.*)
+ v=${host#*freebsd}
+ vM=${v%.*}
+ vm=${v#*.}
+ AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
+ ;;
i?86-*-netbsd*1.5*)
AFS_PARAM_COMMON=param.nbsd15.h
AFS_SYSNAME="i386_nbsd15"
AFS_PARAM_COMMON=param.nbsd20.h
AFS_SYSNAME="amd64_nbsd20"
;;
- x86_64-*-netbsd*3.0-8*)
+ x86_64-*-netbsd*3.[0-8]*)
AFS_PARAM_COMMON=param.nbsd30.h
AFS_SYSNAME="amd64_nbsd30"
;;
- x86_64-*-netbsd*4.0-8*)
+ x86_64-*-netbsd*4.[0-8]*)
AFS_PARAM_COMMON=param.nbsd40.h
AFS_SYSNAME="amd64_nbsd40"
;;
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_linux_kbuild_requires_extra_cflags=no
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then :
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_find_task_by_pid=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_proc_root_fs=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_current_kernel_time=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_write_begin=yes
else
sed '/^ *+/d' conftest.err >&5
fi
+ { echo "$as_me:$LINENO: checking for linux grab_cache_page_write_begin()" >&5
+echo $ECHO_N "checking for linux grab_cache_page_write_begin()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_grab_cache_page_write_begin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/pagemap.h>
+
+void conftest(void)
+{
+grab_cache_page_write_begin(NULL, 0, 0);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_grab_cache_page_write_begin=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_grab_cache_page_write_begin=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/pagemap.h>
+int
+main ()
+{
+grab_cache_page_write_begin(NULL, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_grab_cache_page_write_begin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_grab_cache_page_write_begin=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_grab_cache_page_write_begin" >&5
+echo "${ECHO_T}$ac_cv_linux_grab_cache_page_write_begin" >&6; }
+ if test "x$ac_cv_linux_grab_cache_page_write_begin" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN 1
+_ACEOF
+
+ fi
+
+ { echo "$as_me:$LINENO: checking if struct task has cred" >&5
+echo $ECHO_N "checking if struct task has cred... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_struct_task_has_cred+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/cred.h>
+
+void conftest(void)
+{
+struct task_struct _t;
+uid_t _u;
+_u =_t.cred->uid ;
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_struct_task_has_cred=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_struct_task_has_cred=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/cred.h>
+int
+main ()
+{
+struct task_struct _t;
+uid_t _u;
+_u =_t.cred->uid ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_struct_task_has_cred=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_struct_task_has_cred=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_struct_task_has_cred" >&5
+echo "${ECHO_T}$ac_cv_linux_struct_task_has_cred" >&6; }
+ if test "x$ac_cv_linux_struct_task_has_cred" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRUCT_TASK_HAS_CRED 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for new kmem_cache init function parameters" >&5
echo $ECHO_N "checking for new kmem_cache init function parameters... $ECHO_C" >&6; }
if test "${ac_cv_linux_kmem_cache_init+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kmem_cache_init=yes
else
sed '/^ *+/d' conftest.err >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_linux_kmem_cache_init=yes
+ ac_cv_linux_kmem_cache_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_kmem_cache_init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_kmem_cache_init" >&5
+echo "${ECHO_T}$ac_cv_linux_kmem_cache_init" >&6; }
+
+ { echo "$as_me:$LINENO: checking for linux bdi_init()" >&5
+echo $ECHO_N "checking for linux bdi_init()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_bdi_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/backing-dev.h>
+
+void conftest(void)
+{
+bdi_init(NULL);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_bdi_init=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_bdi_init=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/backing-dev.h>
+int
+main ()
+{
+bdi_init(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_bdi_init=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_linux_kmem_cache_init=no
+ ac_cv_linux_bdi_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
fi
- { echo "$as_me:$LINENO: result: $ac_cv_linux_kmem_cache_init" >&5
-echo "${ECHO_T}$ac_cv_linux_kmem_cache_init" >&6; }
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_bdi_init" >&5
+echo "${ECHO_T}$ac_cv_linux_bdi_init" >&6; }
+ if test "x$ac_cv_linux_bdi_init" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDI_INIT 1
+_ACEOF
+
+ fi
{ echo "$as_me:$LINENO: checking whether kmem_cache_t exists" >&5
echo $ECHO_N "checking whether kmem_cache_t exists... $ECHO_C" >&6; }
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_kmem_cache_t=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kmem_cache_create_takes_dtor=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_config_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_completion_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_semaphore_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_defines_for_each_process=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_defines_prev_task=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_super_has_alloc_inode=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_address_space_has_page_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_alloc_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_blkbits=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_blksize=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_devices=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_mutex=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_sb_list=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_i_security=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_inotify_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_inode_has_inotify_sem=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_inode_setattr_returns_int=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_write_inode_returns_int=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_create_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_lookup_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_permission_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_i_put_link_takes_cookie=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_d_revalidate_takes_nameidata=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_f_flush_takes_fl_owner_t=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_a_writepage_takes_writeback_control=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_flock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_sendfile=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_fs_struct_fop_has_splice=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_posix_lock_file_wait_arg=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_sock_create_v=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_page_follow_link=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_kernel_hlist_unhashed=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_key_type_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_recalc_sigpending_takes_void=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_parent=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_real_parent=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sig=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sighand=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_rlim=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_exit_state=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_tgid=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_todo=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sched_struct_task_struct_has_thread_info=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_tasklist_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_get_sb_has_struct_vfsmount=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_statfs_takes_dentry=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_freezer_h_exists=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_func_refrigerator_takes_pf_freeze=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_keyring_support=yes
else
sed '/^ *+/d' conftest.err >&5
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
if test $AFS_SYSKVERS -ge 26 ; then
rm -fr conftest.dir
void conftest(void)
{
-(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);
+struct task_struct *t=NULL;
+(void) key_alloc(NULL, NULL, 0, 0, t, 0, 0);
}
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_key_alloc_needs_struct_task=yes
else
sed '/^ *+/d' conftest.err >&5
int
main ()
{
-(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);
+struct task_struct *t=NULL;
+(void) key_alloc(NULL, NULL, 0, 0, t, 0, 0);
;
return 0;
}
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$ac_save_CPPFLAGS"
fi
+ CPPFLAGS="$save_CPPFLAGS"
fi
{ echo "$as_me:$LINENO: result: $ac_cv_key_alloc_needs_struct_task" >&5
fi
+ { echo "$as_me:$LINENO: checking if key_alloc() takes credentials" >&5
+echo $ECHO_N "checking if key_alloc() takes credentials... $ECHO_C" >&6; }
+ if test "${ac_cv_key_alloc_needs_cred+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/rwsem.h>
+#include <linux/key.h>
+
+
+void conftest(void)
+{
+struct cred *c = NULL;
+(void) key_alloc(NULL, NULL, 0, 0, c, 0, 0);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_key_alloc_needs_cred=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_key_alloc_needs_cred=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/rwsem.h>
+#include <linux/key.h>
+
+int
+main ()
+{
+struct cred *c = NULL;
+(void) key_alloc(NULL, NULL, 0, 0, c, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_key_alloc_needs_cred=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_key_alloc_needs_cred=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_key_alloc_needs_cred" >&5
+echo "${ECHO_T}$ac_cv_key_alloc_needs_cred" >&6; }
+ if test "x$ac_cv_key_alloc_needs_cred" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define KEY_ALLOC_NEEDS_CRED 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for linux do_sync_read()" >&5
echo $ECHO_N "checking for linux do_sync_read()... $ECHO_C" >&6; }
if test "${ac_cv_linux_do_sync_read+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_do_sync_read=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_generic_file_aio_read=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_init_work_has_data=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_register_sysctl_table_noflag=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_sysctl_table_checking=no
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_have_iget=yes
else
sed '/^ *+/d' conftest.err >&5
{ echo "$as_me:$LINENO: result: $ac_cv_linux_have_iget" >&5
echo "${ECHO_T}$ac_cv_linux_have_iget" >&6; }
+ { echo "$as_me:$LINENO: checking for linux i_size_read()" >&5
+echo $ECHO_N "checking for linux i_size_read()... $ECHO_C" >&6; }
+ if test "${ac_cv_linux_i_size_read+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
+
+ if test $AFS_SYSKVERS -ge 26 ; then
+ rm -fr conftest.dir
+ if test "x$ac_linux_kbuild_requires_extra_cflags" = "xyes" ; then
+ CFLAGS_PREFIX='EXTRA_'
+ fi
+ if mkdir conftest.dir &&
+ cat >conftest.dir/Makefile <<_ACEOF &&
+${CFLAGS_PREFIX}CFLAGS += $CPPFLAGS
+
+obj-m += conftest.o
+_ACEOF
+ cat >conftest.dir/conftest.c <<\_ACEOF &&
+/* confdefs.h */
+_ACEOF
+ cat confdefs.h >>conftest.dir/conftest.c &&
+ cat >>conftest.dir/conftest.c <<\_ACEOF &&
+/* end confdefs.h */
+#include <linux/module.h>
+#include <linux/fs.h>
+
+void conftest(void)
+{
+i_size_read(NULL);
+}
+
+MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
+_ACEOF
+ echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
+ make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ then ac_cv_linux_i_size_read=yes
+ else
+ sed '/^ *+/d' conftest.err >&5
+ echo "$as_me: failed using Makefile:" >&5
+ sed 's/^/| /' conftest.dir/Makefile >&5
+ echo "$as_me: and program was:" >&5
+ sed 's/^/| /' conftest.dir/conftest.c >&5
+ ac_cv_linux_i_size_read=no
+ fi; rm -fr conftest.err conftest.dir
+ else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$LINUX_KERNEL_PATH/include -D__KERNEL__ -Werror-implicit-function-declaration $CPPFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <linux/kernel.h>
+#include <linux/fs.h>
+int
+main ()
+{
+i_size_read(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_linux_i_size_read=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_linux_i_size_read=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+
+ { echo "$as_me:$LINENO: result: $ac_cv_linux_i_size_read" >&5
+echo "${ECHO_T}$ac_cv_linux_i_size_read" >&6; }
+ if test "x$ac_cv_linux_i_size_read" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LINUX_I_SIZE_READ 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for path in struct nameidata" >&5
echo $ECHO_N "checking for path in struct nameidata... $ECHO_C" >&6; }
if test "${ac_cv_linux_struct_nameidata_has_path+set}" = set; then
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_struct_nameidata_has_path=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_init_mm=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_chdir=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_close=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_open=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_wait4=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_rcu_read_lock=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_config_smp=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_kallsyms_address=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_kallsyms_symbol=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_sys_call_table=yes
else
sed '/^ *+/d' conftest.err >&5
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&5 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then ac_cv_linux_exports_ia32_sys_call_table=yes
else
sed '/^ *+/d' conftest.err >&5
-for ac_header in sys/mount.h strings.h termios.h signal.h poll.h
+
+for ac_header in sys/mount.h strings.h termios.h signal.h poll.h sys/pag.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
SHLIB_LINKER="ld -b"
;;
- *fbsd_*)
+ i386_fbsd_*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
MT_LIBS="-pthread"
YACC="byacc"
;;
+ amd64_fbsd_*)
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-pthread"
+ PAM_CFLAGS="-O2 -pipe -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ SHLIB_LINKER="${MT_CC} -shared"
+ TXLIBS="-lncurses"
+ XCFLAGS="-O2 -pipe -fPIC"
+ YACC="byacc"
+ ;;
+
*nbsd2*|*nbsd3*|*nbsd4*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
;;
ppc_darwin_70)
- AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
+ AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
LEX="lex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
KROOT=
fi
-if test X$with_krb5 = Xyes; then
+if test X$with_krb5 != X; then
if test X$conf_krb5 = XYES; then
{ { echo "$as_me:$LINENO: error: --with-krb5-config and --with-krb5 are mutually exclusive, choose only one" >&5
echo "$as_me: error: --with-krb5-config and --with-krb5 are mutually exclusive, choose only one" >&2;}
fi
BUILD_KRB5=no
+MAKE_KRB5=#
if test X$conf_krb5 = XYES; then
{ echo "$as_me:$LINENO: result: Configuring support for Kerberos 5 utilities" >&5
echo "${ECHO_T}Configuring support for Kerberos 5 utilities" >&6; }
BUILD_KRB5=yes
+ MAKE_KRB5=
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
save_LIBS="$LIBS"
+
TOP_SRCDIR="${srcdir}/src"
case $TOP_SRCDIR in
/*)
XLIBS!$XLIBS$ac_delim
KRB5_CONFIG!$KRB5_CONFIG$ac_delim
BUILD_KRB5!$BUILD_KRB5$ac_delim
+MAKE_KRB5!$MAKE_KRB5$ac_delim
KRB5CFLAGS!$KRB5CFLAGS$ac_delim
KRB5LIBS!$KRB5LIBS$ac_delim
HELPER_SPLINT!$HELPER_SPLINT$ac_delim
HELPER_SPLINTCFG!$HELPER_SPLINTCFG$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 1; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
AC_INIT(src/libafs/Makefile.common.in)
-AM_INIT_AUTOMAKE(openafs-libafs,1.4.8)
+AM_INIT_AUTOMAKE(openafs-libafs,1.4.9pre2)
AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.4.8
-LINUX_PKGVER=1.4.8
-#LINUX_PKGREL=0.pre3
-LINUX_PKGREL=1.1
+MACOS_VERSION=1.4.9fc2
+LINUX_PKGVER=1.4.9
+#LINUX_PKGREL=1.1
+LINUX_PKGREL=0.pre2
AC_SUBST(MACOS_VERSION)
AC_SUBST(LINUX_PKGVER)
AC_INIT(src/config/stds.h)
-AM_INIT_AUTOMAKE(openafs,1.4.8)
+AM_INIT_AUTOMAKE(openafs,1.4.9pre2)
AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.4.8
-LINUX_PKGVER=1.4.8
-#LINUX_PKGREL=0.pre3
-LINUX_PKGREL=1.1
+MACOS_VERSION=1.4.9fc2
+LINUX_PKGVER=1.4.9
+#LINUX_PKGREL=1.1
+LINUX_PKGREL=0.pre2
AC_SUBST(MACOS_VERSION)
AC_SUBST(LINUX_PKGVER)
AC_SUBST(LINUX_PKGREL)
AC_PROG_CC
-AC_PATH_PROGS([PATH_CPP], [cpp], , [$PATH:/lib:/usr/ccs/lib])
+AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib])
AC_SUBST([PATH_CPP])
OPENAFS_CONFIGURE_COMMON
restorevol
rmtsysd
tokens.krb
- vos setfields
vsys
* Add -noresolve to the documentation of all the vos commands.
.nr % 0
.rr F
.\}
-.TH PTS_MEMBERSHIP 1 "OpenAFS" "4/Feb/2008" "AFS Command Reference"
+.TH PTS_MEMBERSHIP 1 "OpenAFS" "19/Jan/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
system:authuser groups, and they do not appear in the list of groups to
which a user belongs.
.PP
-To add users or machine to groups, use the pts adduser command; to remove
+To add users or machine to groups, use the \fBpts adduser\fR command; to remove
them, use the \fBpts removeuser\fR command.
.SH "OPTIONS"
.Ip "\fB\-nameorid\fR <\fIuser or group name or id\fR>+" 4
\& thompson
.Ve
.SH "PRIVILEGE REQUIRED"
-The required privilege depends on the setting of the third privacy flag in
-the Protection Database entry of each user or group indicated by the
-\fB\-nameorid\fR argument (use the \fBpts examine\fR command to display the
+Members of the system:ptsviewers and system:administrators groups can
+always use this command in any of its variations. Additionally, a user
+can always list the groups to which they belong, and the owner of a group
+can always list the members of the group.
+.PP
+Additional privileges may be granted by the setting of the third privacy
+flag in the Protection Database entry of each user or group indicated by
+the \fB\-nameorid\fR argument (use the \fBpts examine\fR command to display the
flags):
.Ip "\(bu" 4
-If it is the hyphen and the \fB\-nameorid\fR argument specifies a user, only
-the associated user and members of the system:administrators group can
-list the groups to which the user belongs.
-.Ip "\(bu" 4
-If it is the hyphen and the \fB\-nameorid\fR argument specifies a machine,
-only the members of the system:administrators group can list the groups to
-which the machine belongs.
-.Ip "\(bu" 4
-If it is the hyphen and the \fB\-nameorid\fR argument specifies a group, only
-the owner of the group and members of the system:administrators group can
-list the members of the group.
-.Ip "\(bu" 4
-If it is lowercase \f(CWm\fR and the \fB\-nameorid\fR argument specifies a user or
-machine entry, the meaning is equivalent to the hyphen.
+If it is a hyphen, the default permissions described above apply.
.Ip "\(bu" 4
If it is lowercase \f(CWm\fR and the \fB\-nameorid\fR argument specifies a group,
-members of the group can also list the other members.
+then members of that group can also list the other members. A privacy
+flag of \f(CWm\fR only changes the permissions when set for a group. Setting
+this flag for a user or a machine has no effect.
.Ip "\(bu" 4
If it is uppercase \f(CWM\fR, anyone who can access the cell's database server
-machines can list group memberships.
+machines can list the membership of the group or the groups to which that
+user or machine belongs, depending on what type of entry the flag is set
+on.
.SH "SEE ALSO"
the \fIpts(1)\fR manpage,
the \fIpts_adduser(1)\fR manpage,
.IX Item "\(bu"
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
.IX Header "SEE ALSO"
.IX Header "COPYRIGHT"
.nr % 0
.rr F
.\}
-.TH VOS 1 "OpenAFS" "13/Jul/2008" "AFS Command Reference"
+.TH VOS 1 "OpenAFS" "16/Mar/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
.Ip "\(bu" 4
A command to report Volume Server status: \fBvos status\fR.
.Ip "\(bu" 4
+A command to change volume fields: \fBvos setfields\fR.
+.Ip "\(bu" 4
Commands to obtain help: \fBvos apropos\fR and \fBvos help\fR.
.SH "CAUTIONS"
Currently, the maximum size of a volume is 2 terabytes (2^31 bytes)
.Sp
The \fB\-fromserver\fR and \fB\-toserver\fR arguments to the \fBvos move\fR command
also accept these name formats.
+.Ip "\fB\-noresolve\fR" 4
+Shows all servers as \s-1IP\s0 addresses instead of the \s-1DNS\s0 name. This is very
+useful when the server address is registered as 127.0.0.1 or when dealing
+with multi-homed servers. The \fB\-noresolve\fR option is available in OpenAFS
+versions 1.4.8 or later and 1.5.35 or later.
.Ip "\fB\-verbose\fR" 4
Produces on the standard output stream a detailed trace of the command's
execution. If this argument is omitted, only warnings and error messages
the \fIvos_remsite(1)\fR manpage,
the \fIvos_rename(1)\fR manpage,
the \fIvos_restore(1)\fR manpage,
+the \fIvos_setfields(1)\fR manpage,
the \fIvos_shadow(1)\fR manpage,
the \fIvos_size(1)\fR manpage,
the \fIvos_status(1)\fR manpage,
.IX Item "\(bu"
+.IX Item "\(bu"
+
.IX Header "CAUTIONS"
.IX Header "OPTIONS"
.IX Item "\fB\-server\fR <\fImachine name\fR>"
+.IX Item "\fB\-noresolve\fR"
+
.IX Item "\fB\-verbose\fR"
.IX Header "PRIVILEGE REQUIRED"
.nr % 0
.rr F
.\}
-.TH VOS_EXAMINE 1 "OpenAFS" "19/Feb/2008" "AFS Command Reference"
+.TH VOS_EXAMINE 1 "OpenAFS" "1/Feb/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
.Ip "\(bu" 4
The date and time the volume was created, in the \f(CWCreation\fR field. If the
volume has been restored with the \fBbackup diskrestore\fR, \fBbackup
-volrestore\fR, or \fBvos restore\fR command, this is the restore time.
+volrestore\fR, or \fBvos restore\fR command, this is the restore time. For a
+read-only volume, this is the last release time.
+.Ip "\(bu" 4
+The date and time this copy of this volume was created, in the \f(CWCopy\fR
+field. This is the time when the volume was created on this server and
+partition. For read-only volumes, it is not updated by a release (unlike
+the Creation date). The copy date is not stored in volume dumps.
.Ip "\(bu" 4
The date and time when the contents of the volume last changed, in the
\f(CWLast Update\fR field. For read-only and backup volumes, it matches the
\fI/afs/abc.com/usr\fR directory). For the sake of illustration, the output
shows the volume as locked.
.PP
-.Vb 14
+.Vb 15
\& % vos examine usr
\& usr 536870981 RW 3459 K On-line
\& fs2.abc.com /vicepb
\& RWrite 5360870981 ROnly 536870982 Backup 536870983
\& MaxQuota 40000 K
\& Creation Mon Jun 12 15:22:06 1989
+\& Copy Mon Jun 12 15:22:06 1989
\& Last Update Fri Jun 16 09:34:35 1989
\& 5719 accesses in the past day (i.e., vnode references)
\& RWrite: 5360870981 ROnly: 536870982 Backup: 536870983
The following example shows the output for the volume \f(CWuser.terry\fR using
the \fB\-extended\fR flag. The volume has no read-only replication sites.
.PP
-.Vb 33
+.Vb 34
\& % vos examine -id user.terry -extended
\& user.terry 354287190 RW 2302 K used 119 files On-line
\& fs4.abc.com /vicepc
\& RWrite 354287190 ROnly 0 Backup 354287192
\& MaxQuota 5000 K
\& Creation Wed Nov 25 17:38:57 1992
+\& Copy Wed Nov 25 17:38:57 1992
\& Last Update Tue Dec 15 10:46:20 1992
\& 598 accesses in the past day (i.e., vnode references)
\& Raw Read/Write Stats
.IX Item "\(bu"
+.IX Item "\(bu"
+
.IX Item "Not released"
.IX Item "Old release"
--- /dev/null
+.rn '' }`
+''' $RCSfile$$Revision$$Date$
+'''
+''' $Log$
+'''
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+'''
+'''
+''' Set up \*(-- to give an unbreakable dash;
+''' string Tr holds user defined translation string.
+''' Bell System Logo is used as a dummy character.
+'''
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+''' \*(L" and \*(R", except that they are used on ".xx" lines,
+''' such as .IP and .SH, which do another additional levels of
+''' double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\" If the F register is turned on, we'll generate
+.\" index entries out stderr for the following things:
+.\" TH Title
+.\" SH Header
+.\" Sh Subsection
+.\" Ip Item
+.\" X<> Xref (embedded
+.\" Of course, you have to process the output yourself
+.\" in some meaninful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH VOS_SETFIELDS 1 "OpenAFS" "16/Mar/2009" "AFS Command Reference"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+. \" AM - accent mark definitions
+.bd B 3
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds ? ?
+. ds ! !
+. ds /
+. ds q
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds v \h'-1'\o'\(aa\(ga'
+. ds _ \h'-1'^
+. ds . \h'-1'.
+. ds 3 3
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+. ds oe oe
+. ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+vos_setfields \- Sets the quota or clear the access counter on a volume.
+.SH "SYNOPSIS"
+\fBvos setfields\fR <<\ \fB\-id\fR\ <\fIvolume\ name\ or\ ID\fR >>>
+ <<\ \fB\-maxquota\fR\ <\fIquota\ (KB)\fR >>> [\fB\-clearuse\fR]
+ <<\ [\fB\-cell\fR\ <\fIcell\ name\fR] >>> [\fB\-noauth\fR] [\fB\-localauth\fR]
+ [\fB\-verbose\fR] [\fB\-encrypt\fR] [b<\-noresolve>] [\fB\-help\fR]
+.PP
+\fBvos se\fR <<\ \fB\-id\fR\ <\fIvolume\ name\ or\ ID\fR >>>
+ <<\ \fB\-maxquota\fR\ <\fIquota\ (KB)\fR >>> [\fB\-clearuse\fR]
+ <<\ [\fB\-cell\fR\ <\fIcell\ name\fR] >>> [\fB\-noauth\fR] [\fB\-localauth\fR]
+ [\fB\-verbose\fR] [\fB\-encrypt\fR] [b<\-noresolve>] [\fB\-help\fR]
+.SH "DESCRIPTION"
+The \fBvos setfields\fR command can set the quota on a volume, and it can
+clear the access counter on a volume. This command differs from
+\fBfs setquota\fR because only the volume name is needed to set the quota,
+whereas the path to the volume is needed with \fBfs setquota\fR.
+.PP
+If the \fB\-maxquota\fR and \fB\-clearuse\fR flags are missing, then no action is
+taken.
+.SH "CAUTIONS"
+This command is not effective on read-only or backup volumes.
+.SH "OPTIONS"
+.Ip "\fB\-id\fR <\fIvolume name or id\fR>" 4
+Identifies the volume on which to operate, either by its complete name or
+volume \s-1ID\s0 number.
+.Ip "\fB\-maxquota\fR <\fIcell name\fR>" 4
+Sets the maximum amount of file server disk space the volume can
+occupy. Specify the number of one-kilobyte blocks as a positive integer
+(\f(CW1024\fR is one megabyte). A value of \f(CW0\fR sets an unlimited quota, but
+the size of the disk partition that houses the volume places an absolute
+limit on the volume's size.
+.Ip "\fB\-clearuse\fR" 4
+Clears the access counter on a volumes, which is shown as \f(CWX accesses in
+the past day (i.e., vnode references)\fR in the \fBvos examine\fR output.
+.Ip "\fB\-cell\fR <\fIcell name\fR>" 4
+Names the cell in which to run the command. Do not combine this argument
+with the \fB\-localauth\fR flag. For more details, see the \fIvos(1)\fR manpage.
+.Ip "\fB\-noauth\fR" 4
+Assigns the unprivileged identity \f(CWanonymous\fR to the issuer. Do not
+combine this flag with the \fB\-localauth\fR flag. For more details, see
+the \fIvos(1)\fR manpage.
+.Ip "\fB\-localauth\fR" 4
+Constructs a server ticket using a key from the local
+\fI/usr/afs/etc/KeyFile\fR file. The \fBvos\fR command interpreter presents it
+to the Volume Server and Volume Location Server during mutual
+authentication. Do not combine this flag with the \fB\-cell\fR argument or
+\fB\-noauth\fR flag. For more details, see the \fIvos(1)\fR manpage.
+.Ip "\fB\-encrypt\fR" 4
+Encrypts the command so that the operation's results are not transmitted
+across the network in clear text.
+.Ip "\fB\-noresolve\fR" 4
+Shows all servers as \s-1IP\s0 addresses instead of the \s-1DNS\s0 name. This is very
+useful when the server address is registered as 127.0.0.1 or when dealing
+with multi-homed servers. The \fB\-noresolve\fR option is available in OpenAFS
+versions 1.4.8 or later and 1.5.35 or later.
+.Ip "\fB\-verbose\fR" 4
+Produces on the standard output stream a detailed trace of the command's
+execution. If this argument is omitted, only warnings and error messages
+appear.
+.Ip "\fB\-help\fR" 4
+Prints the online help for this command. All other valid options are
+ignored.
+.SH "OUTPUT"
+This command produces no output other than error messages.
+.SH "EXAMPLES"
+To set a 123KB quota on the root.cell volume, the following command may be
+used:
+.PP
+.Vb 1
+\& % vos setfields -id root.cell -maxquota 123
+.Ve
+To clear the access counter on the root.cell volume, use the following
+command:
+.PP
+.Vb 1
+\& % vos setfields -id root.cell -clearuse
+.Ve
+The above commands may be combined as follows:
+.PP
+.Vb 1
+\& % vos setfields -id root.cell -maxquota 123 -clearuse
+.Ve
+.SH "PRIVILEGE REQUIRED"
+The issuer must be listed in the \fI/usr/afs/etc/UserList\fR file on the
+machine specified with the \fB\-server\fR argument and on each database server
+machine. If the \fB\-localauth\fR flag is included, the issuer must instead be
+logged on to a server machine as the local superuser \f(CWroot\fR.
+.SH "SEE ALSO"
+the \fIfs_setquota(1)\fR manpage,
+the \fIvos(1)\fR manpage,
+the \fIvos_examine(1)\fR manpage
+.SH "COPYRIGHT"
+Copyright 2009 Jason Edgecombe <jason@rampaginggeek.com>
+.PP
+This documentation is covered by the BSD License as written in the
+doc/LICENSE file. This man page was written by Jason Edgecombe for
+OpenAFS.
+
+.rn }` ''
+.IX Title "VOS_SETFIELDS 1"
+.IX Name "vos_setfields - Sets the quota or clear the access counter on a volume."
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "CAUTIONS"
+
+.IX Header "OPTIONS"
+
+.IX Item "\fB\-id\fR <\fIvolume name or id\fR>"
+
+.IX Item "\fB\-maxquota\fR <\fIcell name\fR>"
+
+.IX Item "\fB\-clearuse\fR"
+
+.IX Item "\fB\-cell\fR <\fIcell name\fR>"
+
+.IX Item "\fB\-noauth\fR"
+
+.IX Item "\fB\-localauth\fR"
+
+.IX Item "\fB\-encrypt\fR"
+
+.IX Item "\fB\-noresolve\fR"
+
+.IX Item "\fB\-verbose\fR"
+
+.IX Item "\fB\-help\fR"
+
+.IX Header "OUTPUT"
+
+.IX Header "EXAMPLES"
+
+.IX Header "PRIVILEGE REQUIRED"
+
+.IX Header "SEE ALSO"
+
+.IX Header "COPYRIGHT"
+
.nr % 0
.rr F
.\}
-.TH NetRestrict 5 "OpenAFS" "19/Jun/2007" "AFS File Reference"
+.TH NetRestrict 5 "OpenAFS" "6/Jan/2009" "AFS File Reference"
.UC
.if n .hy 0
.if n .na
.PP
The \fINetRestrict\fR file is in \s-1ASCII\s0 format. One \s-1IP\s0 address appears on each
line, in dotted decimal format. The order of the addresses is not
-significant. The value \f(CW255\fR is a wildcard that represents all possible
-addresses in that field. For example, the value \f(CW192.12.105.255\fR
-indicates that the File Server or database server processes do not
-register or use any of the addresses in the \f(CW192.12.105\fR subnet.
+significant.
.PP
To display the File Server interface addresses registered in the \s-1VLDB\s0, use
the \fBvos listaddrs\fR command.
.nr % 0
.rr F
.\}
-.TH afsd 8 "OpenAFS" "9/Mar/2008" "AFS Command Reference"
+.TH afsd 8 "OpenAFS" "19/Mar/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
[\fB\-settime\fR] [\fB\-shutdown\fR]
<<\ [\fB\-splitcache\fR\ <\fIRW/RO\ ratio\fR] >>>
<<\ [\fB\-stat\fR\ <\fInumber\ of\ stat\ entries\fR] >>> [\fB\-verbose\fR]
+ [\fB\-disable-dynamic-vcaches\fR]
<<\ [\fB\-volumes\fR\ <\fInumber\ of\ volume\ entries\fR] >>>
[\fB\-waitclose\fR]
.SH "DESCRIPTION"
.Ip "\fB\-volumes\fR <\fInumber of volume entries\fR>" 4
Specifies the number of memory structures to allocate for storing volume
location information. The default value is \f(CW50\fR.
+.Ip "\fB\-disable-dynamic-vcaches\fR" 4
+By default, dynamic vcache overrides the \fB\-stat\fR option by using the value of
+\fB\-stat\fR (or the default) as the initial size of the stat (or vcache) pool and
+increases the pool dynamically as needed on supported platforms. This flag will
+disable this new functionality and honor the \*(L'\-stat\*(R' setting.
.Ip "\fB\-waitclose\fR" 4
Has no effect on the operation of the Cache Manager. The behavior it
affected in previous versions of the Cache Manager, to perform synchronous
.IX Item "\fB\-volumes\fR <\fInumber of volume entries\fR>"
+.IX Item "\fB\-disable-dynamic-vcaches\fR"
+
.IX Item "\fB\-waitclose\fR"
.IX Header "EXAMPLES"
.nr % 0
.rr F
.\}
-.TH fileserver 8 "OpenAFS" "24/Aug/2008" "AFS Command Reference"
+.TH fileserver 8 "OpenAFS" "11/Nov/2008" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
.PP
The File Server stores volumes in partitions. A partition is a
filesystem or directory on the server machine that is named \f(CW/vicepX\fR
-or \f(CW/vicepXX\fR where \s-1XX\s0 is \*(L"a\*(R" through \*(L"z\*(R" or \*(L"aa\*(R" though \*(L"zz\*(R". The
-File Server expects that the /vicepXX directories are each on a
-dedicated filesystem. The File Server will only use a /vicepXX if it's
-a mountpoint for another filesystem, unless the file
-\f(CW/vicepXX/AlwaysAttach\fR exists. The data in the partition is a
-special format that can only be access using OpenAFS commands or an
-OpenAFS client.
+or \f(CW/vicepXX\fR where \s-1XX\s0 is \*(L"a\*(R" through \*(L"z\*(R" or \*(L"aa\*(R" though \*(L"iv\*(R". Up to
+255 partitions are allowed. The File Server expects that the /vicepXX
+directories are each on a dedicated filesystem. The File Server will
+only use a /vicepXX if it's a mountpoint for another filesystem,
+unless the file \f(CW/vicepXX/AlwaysAttach\fR exists. The data in the
+partition is a special format that can only be access using OpenAFS
+commands or an OpenAFS client.
.PP
The File Server generates the following message when a partition is nearly
full:
option only on the relevant system type.
.PP
Currently, the maximum size of a volume is 2 terabytes (2^31 bytes)
-and the maximum size of a /vicepX partition on a fileserver is also 2
-terabytes. The fileserver will not report an error when it has access
-to a partition larger than 2 terabytes, but it will probably fail if
-the administrator attempts to use more than 2 terabytes of space. In
-addition, there are reports of erroneous disk usage numbers when
-\fBvos partinfo\fR or other OpenAFS disk reporting tools are used with
-partitions larger than 2 terabytes.
-.PP
-The maximum number of directory entries is 64,000 if all of the
-entries have names that are 15 characters or less in length. A name
-that is 15 characters long requires the use of only one block in the
-directory. Additional sequential blocks are required to store entries
-with names that are longer than 15 characters. Each additional block
-provides an additional length of 32 characters for the name of the
-entry.
+and the maximum size of a /vicepX partition on a fileserver is 2^64
+kilobytes. The maximum partition size in releases 1.4.7 and earlier is
+2 terabytes (2^31 bytes). The maximum partition size for 1.5.x
+releases 1.5.34 and earlier is 2 terabytes as well.
+
+The maximum number of directory entries is 64,000 if all of the entries
+have names that are 15 octets or less in length. A name that is 15 octets
+long requires the use of only one block in the directory. Additional
+sequential blocks are required to store entries with names that are longer
+than 15 octets. Each additional block provides an additional length of 32
+octets for the name of the entry. Note that if file names use an encoding
+like UTF\-8, a single character may be encoded into multiple octets.
.PP
In real world use, the maximum number of objects in an AFS directory
is usually between 16,000 and 25,000, depending on the average name
number, the File Server automatically uses five of the threads for its own
purposes).
.Sp
-The maximum number of threads can differ in each release of \s-1AFS\s0. Consult
-the \fI\s-1IBM\s0 \s-1AFS\s0 Release Notes\fR for the current release.
+The maximum number of threads can differ in each release of OpenAFS.
+Consult the \fIOpenAFS Release Notes\fR for the current release.
.Ip "\fB\-spare\fR <\fInumber of spare blocks\fR>" 4
Specifies the number of additional kilobytes an application can store in a
volume after the quota is exceeded. Provide a positive integer; a value of
.nr % 0
.rr F
.\}
-.TH salvager 8 "OpenAFS" "1/Mar/2006" "AFS Command Reference"
+.TH salvager 8 "OpenAFS" "1/Feb/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
constantly moving the disk head from one partition to another. However,
this strategy is often not ideal if the partitions are configured as
logical volumes that span multiple disks. To force the Salvager to salvage
-logical volumes in parallel, provide the string \f(CWall\fR as the value for
-the \fB\-parallel\fR argument. Provide a positive integer to specify the
-number of subprocesses to run in parallel (for example, \f(CW-parallel 5all\fR
-for five subprocesses), or omit the integer to run up to four
-subprocesses, depending on the number of logical volumes being salvaged.
+logical volumes in parallel as if they were on separate disks, provide the
+string \f(CWall\fR as the value for the \fB\-parallel\fR argument.
+.PP
+To set both parameters at the same time, append the number of Salvager
+processes to the string \f(CWall\fR. For example, \f(CW-parallel all5\fR treats
+each partition as a separate disk and runs five Salvager processes, thus
+salvaging five partitions at a time.
.PP
The Salvager creates temporary files as it runs, by default writing them
to the partition it is salvaging. The number of files can be quite large,
The \s-1BOS\s0 Server never starts more Salvager subprocesses than there are
partitions, and always starts only one process to salvage a single
volume. If this argument is omitted, up to four Salvager subprocesses run
-in parallel.
+in parallel but partitions on the same device are salvaged serially.
.Ip "\fB\-tmpdir\fR <\fIname of dir to place tmp files\fR>" 4
Names a local disk directory in which the Salvager places the temporary
files it creates during a salvage operation, instead of writing them to
.nr % 0
.rr F
.\}
-.TH vldb_check 8 "OpenAFS" "1/Mar/2006" "AFS Command Reference"
+.TH vldb_check 8 "OpenAFS" "16/Feb/2009" "AFS Command Reference"
.UC
.if n .hy 0
.if n .na
vldb_check \- Checks the integrity of the VLDB
.SH "SYNOPSIS"
\fBvldb_check\fR <<\ \fB\-database\fR\ <\fIvldb\ file\fR >>> [\fB\-uheader\fR] [\fB\-vheader\fR]
- [\fB\-servers\fR] [\fB\-entries\fR] [\fB\-verbose\fR] [\fB\-help\fR]
+ [\fB\-servers\fR] [\fB\-entries\fR] [\fB\-quiet\fR | \fB\-verbose\fR] [\fB\-help\fR]
.PP
\fBvldb_check\fR <<\ \fB\-d\fR\ <\fIvldb\ file\fR >>> [\fB\-u\fR] [\fB\-vh\fR] [\fB\-s\fR] [\fB\-e\fR]
[\fB\-ve\fR] [\fB\-h\fR]
.Ip "\fB\-entries\fR" 4
Outputs every volume entry in the database. The information includes the
volume's name and the volume \s-1ID\s0 number for each of its versions.
+.Ip "\fB\-quiet\fR" 4
+Blocks output from going to stdout. Output to stderr is not blocked. Cannot
+be used with \-verbose, \-uheader, \-servers or \-entries.
.Ip "\fB\-verbose\fR" 4
Reports additional information about the database, including the number of
-entries for each type of volume.
+entries for each type of volume. Cannot be used with \-quiet.
.Ip "\fB\-help\fR" 4
Prints the online help for this command. All other valid options are
ignored.
additional information as described for each option in the \fIOPTIONS\fR manpage. The
output is intended for debugging purposes and is meaningful to someone
familiar with the internal structure of the VLDB.
+.PP
+The \fB\-quiet\fR option can be used to supress the standard output stream
+so that the command can be used more easily inside scripts.
+.PP
+The command exits with one of the following completion codes:
+.PP
+0: No errors or warnings have been encountered.
+1: One or more warnings encountered.
+2: One or more warnings and/or errors encountered.
+4: A fatal or internal error has occurred and the program cannot proceed.
.SH "PRIVILEGE REQUIRED"
The issuer must be logged in as the local superuser \f(CWroot\fR.
.SH "SEE ALSO"
.IX Item "\fB\-entries\fR"
+.IX Item "\fB\-quiet\fR"
+
.IX Item "\fB\-verbose\fR"
.IX Item "\fB\-help\fR"
system:authuser groups, and they do not appear in the list of groups to
which a user belongs.
-To add users or machine to groups, use the pts adduser command; to remove
+To add users or machine to groups, use the B<pts adduser> command; to remove
them, use the B<pts removeuser> command.
=head1 OPTIONS
=head1 PRIVILEGE REQUIRED
-The required privilege depends on the setting of the third privacy flag in
-the Protection Database entry of each user or group indicated by the
-B<-nameorid> argument (use the B<pts examine> command to display the
+Members of the system:ptsviewers and system:administrators groups can
+always use this command in any of its variations. Additionally, a user
+can always list the groups to which they belong, and the owner of a group
+can always list the members of the group.
+
+Additional privileges may be granted by the setting of the third privacy
+flag in the Protection Database entry of each user or group indicated by
+the B<-nameorid> argument (use the B<pts examine> command to display the
flags):
=over 4
=item *
-If it is the hyphen and the B<-nameorid> argument specifies a user, only
-the associated user and members of the system:administrators group can
-list the groups to which the user belongs.
-
-=item *
-
-If it is the hyphen and the B<-nameorid> argument specifies a machine,
-only the members of the system:administrators group can list the groups to
-which the machine belongs.
-
-=item *
-
-If it is the hyphen and the B<-nameorid> argument specifies a group, only
-the owner of the group and members of the system:administrators group can
-list the members of the group.
-
-=item *
-
-If it is lowercase C<m> and the B<-nameorid> argument specifies a user or
-machine entry, the meaning is equivalent to the hyphen.
+If it is a hyphen, the default permissions described above apply.
=item *
If it is lowercase C<m> and the B<-nameorid> argument specifies a group,
-members of the group can also list the other members.
+then members of that group can also list the other members. A privacy
+flag of C<m> only changes the permissions when set for a group. Setting
+this flag for a user or a machine has no effect.
=item *
If it is uppercase C<M>, anyone who can access the cell's database server
-machines can list group memberships.
+machines can list the membership of the group or the groups to which that
+user or machine belongs, depending on what type of entry the flag is set
+on.
=back
=item *
+A command to change volume fields: B<vos setfields>.
+
+=item *
+
Commands to obtain help: B<vos apropos> and B<vos help>.
=back
The B<-fromserver> and B<-toserver> arguments to the B<vos move> command
also accept these name formats.
+=item B<-noresolve>
+
+Shows all servers as IP addresses instead of the DNS name. This is very
+useful when the server address is registered as 127.0.0.1 or when dealing
+with multi-homed servers. The B<-noresolve> option is available in OpenAFS
+versions 1.4.8 or later and 1.5.35 or later.
+
=item B<-verbose>
Produces on the standard output stream a detailed trace of the command's
L<vos_remsite(1)>,
L<vos_rename(1)>,
L<vos_restore(1)>,
+L<vos_setfields(1)>,
L<vos_shadow(1)>,
L<vos_size(1)>,
L<vos_status(1)>,
The date and time the volume was created, in the C<Creation> field. If the
volume has been restored with the B<backup diskrestore>, B<backup
-volrestore>, or B<vos restore> command, this is the restore time.
+volrestore>, or B<vos restore> command, this is the restore time. For a
+read-only volume, this is the last release time.
+
+=item *
+
+The date and time this copy of this volume was created, in the C<Copy>
+field. This is the time when the volume was created on this server and
+partition. For read-only volumes, it is not updated by a release (unlike
+the Creation date). The copy date is not stored in volume dumps.
=item *
RWrite 5360870981 ROnly 536870982 Backup 536870983
MaxQuota 40000 K
Creation Mon Jun 12 15:22:06 1989
+ Copy Mon Jun 12 15:22:06 1989
Last Update Fri Jun 16 09:34:35 1989
5719 accesses in the past day (i.e., vnode references)
RWrite: 5360870981 ROnly: 536870982 Backup: 536870983
RWrite 354287190 ROnly 0 Backup 354287192
MaxQuota 5000 K
Creation Wed Nov 25 17:38:57 1992
+ Copy Wed Nov 25 17:38:57 1992
Last Update Tue Dec 15 10:46:20 1992
598 accesses in the past day (i.e., vnode references)
Raw Read/Write Stats
--- /dev/null
+=head1 NAME
+
+vos_setfields - Sets the quota or clear the access counter on a volume.
+
+=head1 SYNOPSIS
+
+=for html
+<div class="synopsis">
+
+B<vos setfields> S<<< B<-id> <I<volume name or ID>> >>>
+ S<<< B<-maxquota> <I<quota (KB)>> >>> [B<-clearuse>]
+ S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>]
+ [B<-verbose>] [B<-encrypt>] [b<-noresolve>] [B<-help>]
+
+B<vos se> S<<< B<-id> <I<volume name or ID>> >>>
+ S<<< B<-maxquota> <I<quota (KB)>> >>> [B<-clearuse>]
+ S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>]
+ [B<-verbose>] [B<-encrypt>] [b<-noresolve>] [B<-help>]
+
+=for html
+</div>
+
+=head1 DESCRIPTION
+
+The B<vos setfields> command can set the quota on a volume, and it can
+clear the access counter on a volume. This command differs from
+B<fs setquota> because only the volume name is needed to set the quota,
+whereas the path to the volume is needed with B<fs setquota>.
+
+If the B<-maxquota> and B<-clearuse> flags are missing, then no action is
+taken.
+
+=head1 CAUTIONS
+
+This command is not effective on read-only or backup volumes.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-id> <I<volume name or id>>
+
+Identifies the volume on which to operate, either by its complete name or
+volume ID number.
+
+=item B<-maxquota> <I<cell name>>
+
+Sets the maximum amount of file server disk space the volume can
+occupy. Specify the number of one-kilobyte blocks as a positive integer
+(C<1024> is one megabyte). A value of C<0> sets an unlimited quota, but
+the size of the disk partition that houses the volume places an absolute
+limit on the volume's size.
+
+=item B<-clearuse>
+
+Clears the access counter on a volumes, which is shown as C<X accesses in
+the past day (i.e., vnode references)> in the B<vos examine> output.
+
+=item B<-cell> <I<cell name>>
+
+Names the cell in which to run the command. Do not combine this argument
+with the B<-localauth> flag. For more details, see L<vos(1)>.
+
+=item B<-noauth>
+
+Assigns the unprivileged identity C<anonymous> to the issuer. Do not
+combine this flag with the B<-localauth> flag. For more details, see
+L<vos(1)>.
+
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. The B<vos> command interpreter presents it
+to the Volume Server and Volume Location Server during mutual
+authentication. Do not combine this flag with the B<-cell> argument or
+B<-noauth> flag. For more details, see L<vos(1)>.
+
+=item B<-encrypt>
+
+Encrypts the command so that the operation's results are not transmitted
+across the network in clear text.
+
+=item B<-noresolve>
+
+Shows all servers as IP addresses instead of the DNS name. This is very
+useful when the server address is registered as 127.0.0.1 or when dealing
+with multi-homed servers. The B<-noresolve> option is available in OpenAFS
+versions 1.4.8 or later and 1.5.35 or later.
+
+=item B<-verbose>
+
+Produces on the standard output stream a detailed trace of the command's
+execution. If this argument is omitted, only warnings and error messages
+appear.
+
+=item B<-help>
+
+Prints the online help for this command. All other valid options are
+ignored.
+
+=back
+
+=head1 OUTPUT
+
+This command produces no output other than error messages.
+
+=head1 EXAMPLES
+
+To set a 123KB quota on the root.cell volume, the following command may be
+used:
+
+ % vos setfields -id root.cell -maxquota 123
+
+To clear the access counter on the root.cell volume, use the following
+command:
+
+ % vos setfields -id root.cell -clearuse
+
+The above commands may be combined as follows:
+
+ % vos setfields -id root.cell -maxquota 123 -clearuse
+
+=head1 PRIVILEGE REQUIRED
+
+The issuer must be listed in the F</usr/afs/etc/UserList> file on the
+machine specified with the B<-server> argument and on each database server
+machine. If the B<-localauth> flag is included, the issuer must instead be
+logged on to a server machine as the local superuser C<root>.
+
+=head1 SEE ALSO
+
+L<fs_setquota(1)>,
+L<vos(1)>,
+L<vos_examine(1)>
+
+=head1 COPYRIGHT
+
+Copyright 2009 Jason Edgecombe <jason@rampaginggeek.com>
+
+This documentation is covered by the BSD License as written in the
+doc/LICENSE file. This man page was written by Jason Edgecombe for
+OpenAFS.
The F<NetRestrict> file is in ASCII format. One IP address appears on each
line, in dotted decimal format. The order of the addresses is not
-significant. The value C<255> is a wildcard that represents all possible
-addresses in that field. For example, the value C<192.12.105.255>
-indicates that the File Server or database server processes do not
-register or use any of the addresses in the C<192.12.105> subnet.
+significant.
To display the File Server interface addresses registered in the VLDB, use
the B<vos listaddrs> command.
[B<-settime>] [B<-shutdown>]
S<<< [B<-splitcache> <I<RW/RO ratio>>] >>>
S<<< [B<-stat> <I<number of stat entries>>] >>> [B<-verbose>]
+ [B<-disable-dynamic-vcaches>]
S<<< [B<-volumes> <I<number of volume entries>>] >>>
[B<-waitclose>]
Specifies the number of memory structures to allocate for storing volume
location information. The default value is C<50>.
+=item B<-disable-dynamic-vcaches>
+
+By default, dynamic vcache overrides the B<-stat> option by using the value of
+B<-stat> (or the default) as the initial size of the stat (or vcache) pool and
+increases the pool dynamically as needed on supported platforms. This flag will
+disable this new functionality and honor the '-stat' setting.
+
=item B<-waitclose>
Has no effect on the operation of the Cache Manager. The behavior it
The File Server stores volumes in partitions. A partition is a
filesystem or directory on the server machine that is named C</vicepX>
-or C</vicepXX> where XX is "a" through "z" or "aa" though "zz". The
-File Server expects that the /vicepXX directories are each on a
-dedicated filesystem. The File Server will only use a /vicepXX if it's
-a mountpoint for another filesystem, unless the file
-C</vicepXX/AlwaysAttach> exists. The data in the partition is a
-special format that can only be access using OpenAFS commands or an
-OpenAFS client.
+or C</vicepXX> where XX is "a" through "z" or "aa" though "iv". Up to
+255 partitions are allowed. The File Server expects that the /vicepXX
+directories are each on a dedicated filesystem. The File Server will
+only use a /vicepXX if it's a mountpoint for another filesystem,
+unless the file C</vicepXX/AlwaysAttach> exists. The data in the
+partition is a special format that can only be access using OpenAFS
+commands or an OpenAFS client.
The File Server generates the following message when a partition is nearly
full:
option only on the relevant system type.
Currently, the maximum size of a volume is 2 terabytes (2^31 bytes)
-and the maximum size of a /vicepX partition on a fileserver is also 2
-terabytes. The fileserver will not report an error when it has access
-to a partition larger than 2 terabytes, but it will probably fail if
-the administrator attempts to use more than 2 terabytes of space. In
-addition, there are reports of erroneous disk usage numbers when
-B<vos partinfo> or other OpenAFS disk reporting tools are used with
-partitions larger than 2 terabytes.
-
-The maximum number of directory entries is 64,000 if all of the
-entries have names that are 15 characters or less in length. A name
-that is 15 characters long requires the use of only one block in the
-directory. Additional sequential blocks are required to store entries
-with names that are longer than 15 characters. Each additional block
-provides an additional length of 32 characters for the name of the
-entry.
+and the maximum size of a /vicepX partition on a fileserver is 2^64
+kilobytes. The maximum partition size in releases 1.4.7 and earlier is
+2 terabytes (2^31 bytes). The maximum partition size for 1.5.x
+releases 1.5.34 and earlier is 2 terabytes as well.
+
+The maximum number of directory entries is 64,000 if all of the entries
+have names that are 15 octets or less in length. A name that is 15 octets
+long requires the use of only one block in the directory. Additional
+sequential blocks are required to store entries with names that are longer
+than 15 octets. Each additional block provides an additional length of 32
+octets for the name of the entry. Note that if file names use an encoding
+like UTF-8, a single character may be encoded into multiple octets.
In real world use, the maximum number of objects in an AFS directory
is usually between 16,000 and 25,000, depending on the average name
number, the File Server automatically uses five of the threads for its own
purposes).
-The maximum number of threads can differ in each release of AFS. Consult
-the I<IBM AFS Release Notes> for the current release.
+The maximum number of threads can differ in each release of OpenAFS.
+Consult the I<OpenAFS Release Notes> for the current release.
=item B<-spare> <I<number of spare blocks>>
constantly moving the disk head from one partition to another. However,
this strategy is often not ideal if the partitions are configured as
logical volumes that span multiple disks. To force the Salvager to salvage
-logical volumes in parallel, provide the string C<all> as the value for
-the B<-parallel> argument. Provide a positive integer to specify the
-number of subprocesses to run in parallel (for example, C<-parallel 5all>
-for five subprocesses), or omit the integer to run up to four
-subprocesses, depending on the number of logical volumes being salvaged.
+logical volumes in parallel as if they were on separate disks, provide the
+string C<all> as the value for the B<-parallel> argument.
+
+To set both parameters at the same time, append the number of Salvager
+processes to the string C<all>. For example, C<-parallel all5> treats
+each partition as a separate disk and runs five Salvager processes, thus
+salvaging five partitions at a time.
The Salvager creates temporary files as it runs, by default writing them
to the partition it is salvaging. The number of files can be quite large,
The BOS Server never starts more Salvager subprocesses than there are
partitions, and always starts only one process to salvage a single
volume. If this argument is omitted, up to four Salvager subprocesses run
-in parallel.
+in parallel but partitions on the same device are salvaged serially.
=item B<-tmpdir> <I<name of dir to place tmp files>>
<div class="synopsis">
B<vldb_check> S<<< B<-database> <I<vldb file>> >>> [B<-uheader>] [B<-vheader>]
- [B<-servers>] [B<-entries>] [B<-verbose>] [B<-help>]
+ [B<-servers>] [B<-entries>] [B<-quiet> | B<-verbose>] [B<-help>]
B<vldb_check> S<<< B<-d> <I<vldb file>> >>> [B<-u>] [B<-vh>] [B<-s>] [B<-e>]
[B<-ve>] [B<-h>]
Outputs every volume entry in the database. The information includes the
volume's name and the volume ID number for each of its versions.
+=item B<-quiet>
+
+Blocks output from going to stdout. Output to stderr is not blocked. Cannot
+be used with -verbose, -uheader, -servers or -entries.
+
=item B<-verbose>
Reports additional information about the database, including the number of
-entries for each type of volume.
+entries for each type of volume. Cannot be used with -quiet.
=item B<-help>
output is intended for debugging purposes and is meaningful to someone
familiar with the internal structure of the VLDB.
+The B<-quiet> option can be used to supress the standard output stream
+so that the command can be used more easily inside scripts.
+
+The command exits with one of the following completion codes:
+
+0: No errors or warnings have been encountered.
+1: One or more warnings encountered.
+2: One or more warnings and/or errors encountered.
+4: A fatal or internal error has occurred and the program cannot proceed.
+
=head1 PRIVILEGE REQUIRED
The issuer must be logged in as the local superuser C<root>.
*/
#include <afs/param.h>
+#include <afs/com_err.h>
#include <errno.h>
#include "Internal.h"
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.18.2.5 2008/08/26 14:02:14 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.18.2.6 2009/01/12 14:33:37 shadow Exp $");
#include <afs/sysincludes.h> /* Standard vendor system headers */
#include <afsincludes.h> /* Afs-based standard headers */
if (((ap->a_command >> 8) & 0xff) == 'V') {
/* This is a VICEIOCTL call */
AFS_GLOCK();
- error = HandleIoctl(tvc, NULL /*Not used */ ,
- ap->a_command, ap->a_data);
+ error = HandleIoctl(tvc, ap->a_command, ap->a_data);
AFS_GUNLOCK();
return (error);
} else {
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_cred.c,v 1.10.2.3 2006/12/19 02:29:56 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_cred.c,v 1.10.2.4 2009/01/15 13:27:43 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
{
cred_t *cr = crget();
- cr->cr_uid = current->fsuid;
- cr->cr_ruid = current->uid;
- cr->cr_gid = current->fsgid;
- cr->cr_rgid = current->gid;
+ cr->cr_uid = current_fsuid();
+ cr->cr_ruid = current_uid();
+ cr->cr_gid = current_fsgid();
+ cr->cr_rgid = current_gid();
#if defined(AFS_LINUX26_ENV)
task_lock(current);
- get_group_info(current->group_info);
- cr->cr_group_info = current->group_info;
+ get_group_info(current_group_info());
+ cr->cr_group_info = current_group_info();
task_unlock(current);
#else
memcpy(cr->cr_groups, current->groups, NGROUPS * sizeof(gid_t));
void
crset(cred_t * cr)
{
+#if defined(STRUCT_TASK_HAS_CRED)
+ struct cred *new_creds;
+
+ new_creds = prepare_creds();
+ new_creds->fsuid = cr->cr_uid;
+ new_creds->uid = cr->cr_ruid;
+ new_creds->fsgid = cr->cr_gid;
+ new_creds->gid = cr->cr_rgid;
+#else
current->fsuid = cr->cr_uid;
current->uid = cr->cr_ruid;
current->fsgid = cr->cr_gid;
current->gid = cr->cr_rgid;
+#endif
#if defined(AFS_LINUX26_ENV)
{
struct group_info *old_info;
get_group_info(cr->cr_group_info);
task_lock(current);
+#if defined(STRUCT_TASK_HAS_CRED)
+ old_info = current->cred->group_info;
+ new_creds->group_info = cr->cr_group_info;
+ commit_creds(new_creds);
+#else
old_info = current->group_info;
current->group_info = cr->cr_group_info;
+#endif
task_unlock(current);
put_group_info(old_info);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.16 2008/03/26 04:10:52 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.19 2009/01/15 13:27:43 shadow Exp $");
#ifdef AFS_LINUX24_ENV
#include "h/module.h" /* early to avoid printf->printk mapping */
#endif
tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
+#if defined(STRUCT_TASK_HAS_CRED)
+ filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
+#else
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
+#endif
if (IS_ERR(filp))
osi_Panic("Can't open inode %d\n", ainode);
afile->filp = filp;
- afile->size = FILE_INODE(filp)->i_size;
+ afile->size = i_size_read(FILE_INODE(filp));
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
code = filp->f_op->open(tip, filp);
if (code)
osi_Panic("Can't open inode %d\n", ainode);
- afile->size = tip->i_size;
+ afile->size = i_size_read(tip);
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
register afs_int32 code;
AFS_STATCNT(osi_Stat);
MObtainWriteLock(&afs_xosi, 320);
- astat->size = OSIFILE_INODE(afile)->i_size;
+ astat->size = i_size_read(OSIFILE_INODE(afile));
#if defined(AFS_LINUX26_ENV)
astat->mtime = OSIFILE_INODE(afile)->i_mtime.tv_sec;
astat->atime = OSIFILE_INODE(afile)->i_atime.tv_sec;
if (!code)
truncate_inode_pages(&inode->i_data, asize);
#else
- inode->i_size = asize;
+ i_size_write(inode, asize);
if (inode->i_sb->s_op && inode->i_sb->s_op->notify_change) {
code = inode->i_sb->s_op->notify_change(&afile->dentry, &newattrs);
}
#endif
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.16 2008/06/09 03:39:44 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.20 2009/03/23 15:17:02 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
crset(*cr);
-#ifdef STRUCT_TASK_STRUCT_HAS_PARENT
+#if defined(STRUCT_TASK_STRUCT_HAS_PARENT) && !defined(STRUCT_TASK_HAS_CRED)
if (change_parent) {
old_info = current->parent->group_info;
get_group_info(group_info);
not_in_quota = KEY_ALLOC_IN_QUOTA;
sprintf(desc, "_ses.%u", task->tgid);
-#ifdef KEY_ALLOC_NEEDS_STRUCT_TASK
+#if defined(KEY_ALLOC_NEEDS_STRUCT_TASK)
+ keyring = key_alloc(__key_type_keyring, desc,
+ task_uid(task), task_gid(task), task,
+ (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL,
+ not_in_quota);
+#elif defined(KEY_ALLOC_NEEDS_CRED)
keyring = key_alloc(__key_type_keyring, desc,
- task->uid, task->gid, task,
+ task_uid(task), task_gid(task), current_cred(),
(KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL,
not_in_quota);
#else
keyring = key_alloc(__key_type_keyring, desc,
- task->uid, task->gid,
+ task_uid(task), task_gid(task),
(KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL,
not_in_quota);
#endif
/* install the keyring */
spin_lock_irq(&task->sighand->siglock);
- old = task->signal->session_keyring;
+ old = task_session_keyring(task);
smp_wmb();
- task->signal->session_keyring = keyring;
+ task_session_keyring(task) = keyring;
spin_unlock_irq(&task->sighand->siglock);
if (old)
(void) install_session_keyring(current, NULL);
- if (current->signal->session_keyring) {
+ if (current_session_keyring()) {
struct key *key;
key_perm_t perm;
perm = KEY_POS_VIEW | KEY_POS_SEARCH;
perm |= KEY_USR_VIEW | KEY_USR_SEARCH;
-#ifdef KEY_ALLOC_NEEDS_STRUCT_TASK
+#if defined(KEY_ALLOC_NEEDS_STRUCT_TASK)
key = key_alloc(&key_type_afs_pag, "_pag", 0, 0, current, perm, 1);
+#elif defined(KEY_ALLOC_NEEDS_CRED)
+ key = key_alloc(&key_type_afs_pag, "_pag", 0, 0, current_cred(), perm, 1);
#else
key = key_alloc(&key_type_afs_pag, "_pag", 0, 0, perm, 1);
#endif
if (!IS_ERR(key)) {
key_instantiate_and_link(key, (void *) newpag, sizeof(afs_uint32),
- current->signal->session_keyring, NULL);
+ current_session_keyring(), NULL);
key_put(key);
}
}
{
int code;
afs_uint32 *userpag, pag = NOPAG;
+#ifndef AFS_LINUX26_ONEGROUP_ENV
int g0, g1;
+#endif
if (key->uid != 0 || key->gid != 0)
return -EPERM;
code = -EINVAL;
- get_group_info(current->group_info);
+ get_group_info(current_group_info());
if (datalen != sizeof(afs_uint32) || !data)
goto error;
- if (current->group_info->ngroups < NUMPAGGROUPS)
+ if (current_group_info()->ngroups < NUMPAGGROUPS)
goto error;
/* ensure key being set matches current pag */
#ifdef AFS_LINUX26_ONEGROUP_ENV
- pag = afs_get_pag_from_groups(current->group_info);
+ pag = afs_get_pag_from_groups(current_group_info());
#else
- g0 = GROUP_AT(current->group_info, 0);
- g1 = GROUP_AT(current->group_info, 1);
+ g0 = GROUP_AT(current_group_info(), 0);
+ g1 = GROUP_AT(current_group_info(), 1);
pag = afs_get_pag_from_groups(g0, g1);
#endif
code = 0;
error:
- put_group_info(current->group_info);
+ put_group_info(current_group_info());
return code;
}
#else
p = find_task_by_vpid(1);
#endif
- if (p && p->user->session_keyring)
- __key_type_keyring = p->user->session_keyring->type;
+ if (p && task_user(p)->session_keyring)
+ __key_type_keyring = task_user(p)->session_keyring->type;
# ifdef EXPORTED_TASKLIST_LOCK
if (&tasklist_lock)
read_unlock(&tasklist_lock);
#endif
/* cred struct */
-typedef struct cred { /* maps to task field: */
+typedef struct afs_cred { /* maps to task field: */
int cr_ref;
uid_t cr_uid; /* euid */
uid_t cr_ruid; /* uid */
gid_t cr_groups[NGROUPS]; /* 32 groups - empty set to NOGROUP */
int cr_ngroups;
#endif
- struct cred *cr_next;
+ struct afs_cred *cr_next;
} cred_t;
-#define AFS_UCRED cred
+#define AFS_UCRED afs_cred
#define AFS_PROC struct task_struct
+#if !defined(current_cred)
+#define current_gid() (current->gid)
+#define current_uid() (current->uid)
+#define current_fsgid() (current->fsgid)
+#define current_fsuid() (current->fsuid)
+#endif
+#if defined(STRUCT_TASK_HAS_CRED)
+#define current_group_info() (current->cred->group_info)
+#define task_gid(task) (task->cred->gid)
+#define task_user(task) (task->cred->user)
+#define task_session_keyring(task) (task->cred->tgcred->session_keyring)
+#define current_session_keyring() (current->cred->tgcred->session_keyring)
+#else
+#define current_group_info() (current->group_info)
+#if !defined(task_gid)
+#define task_gid(task) (task->gid)
+#endif
+#if !defined(task_uid)
+#define task_uid(task) (task->uid)
+#endif
+#define task_user(task) (task->user)
+#define task_session_keyring(task) (task->signal->session_keyring)
+#define current_session_keyring() (current->signal->session_keyring)
+#endif
#define crhold(c) (c)->cr_ref++
/* UIO manipulation */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.31 2008/08/22 19:17:02 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.32 2009/03/15 18:42:34 shadow Exp $");
#include <linux/module.h> /* early to avoid printf->printk mapping */
#include "afs/sysincludes.h"
struct afs_q *cq, *tq;
loff_t n = 0;
+ AFS_GLOCK();
ObtainReadLock(&afs_xcell);
for (cq = CellLRU.next; cq != &CellLRU; cq = tq) {
tq = QNext(cq);
break;
}
if (cq == &CellLRU)
- return NULL;
+ cq = NULL;
+ AFS_GUNLOCK();
return cq;
}
{
struct afs_q *cq = p, *tq;
+
+ AFS_GLOCK();
(*pos)++;
tq = QNext(cq);
if (tq == &CellLRU)
- return NULL;
+ tq = NULL;
+ AFS_GUNLOCK();
return tq;
}
static void c_stop(struct seq_file *m, void *p)
{
+ AFS_GLOCK();
ReleaseReadLock(&afs_xcell);
+ AFS_GUNLOCK();
}
static int c_show(struct seq_file *m, void *p)
if (probe_debug & 0x0001) { \
printk("<7>osi_probe: %s = 0x%016lx %s\n", P->symbol, (unsigned long)(x), (m)); \
} \
- if ((x)) { \
+ if ((x) && ((int)(x)) != -ENOENT) { \
*method = (m); \
final_answer = (void *)(x); \
} \
} while (0)
#else
#define check_result(x,m) do { \
- if ((x)) { \
+ if ((x) && ((int)(x)) != -ENOENT) { \
*method = (m); \
return (void *)(x); \
} \
#define VATTR_NULL(A) memset(A, 0, sizeof(struct vattr))
+#ifndef HAVE_LINUX_I_SIZE_READ
+#define i_size_read(X) ((X)->i_size)
+#define i_size_write(X,Y) (X)->i_size = Y
+#endif
+
#endif /* OSI_VFS_H_ */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.28 2007/11/23 13:45:04 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.31 2009/03/18 12:57:17 shadow Exp $");
#define __NO_VERSION__ /* don't define kernel_version in module.h */
#include <linux/module.h> /* early to avoid printf->printk mapping */
sb->s_blocksize_bits = 10;
sb->s_magic = AFS_VFSMAGIC;
sb->s_op = &afs_sops; /* Super block (vfs) ops */
+#if defined(HAVE_BDI_INIT)
+ bdi_init(&afs_backing_dev_info);
+#endif
#if defined(MAX_NON_LFS)
#ifdef AFS_64BIT_CLIENT
#if !defined(MAX_LFS_FILESIZE)
#endif
osi_linux_verify_alloced_memory();
+#if defined(HAVE_BDI_INIT)
+ bdi_destroy(&afs_backing_dev_info);
+#endif
AFS_GUNLOCK();
sbp->s_dev = 0;
ip->i_mode = vp->va_mode;
ip->i_uid = vp->va_uid;
ip->i_gid = vp->va_gid;
- ip->i_size = vp->va_size;
+ i_size_write(ip, vp->va_size);
#if defined(AFS_LINUX26_ENV)
ip->i_atime.tv_sec = vp->va_atime.tv_sec;
ip->i_atime.tv_nsec = 0;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_vm.c,v 1.16.2.2 2008/10/20 12:10:00 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_vm.c,v 1.16.2.4 2009/03/20 15:55:57 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
return EBUSY;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
- truncate_inode_pages(&ip->i_data, 0);
+ return vmtruncate(ip, 0);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
truncate_inode_pages(ip, 0);
#else
osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
- struct inode *ip = AFSTOV(avc);
-
- truncate_inode_pages(&ip->i_data, 0);
+ invalidate_remote_inode(AFSTOV(avc));
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
struct inode *ip = AFSTOV(avc);
osi_VM_Truncate(struct vcache *avc, int alen, struct AFS_UCRED *acred)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
- struct inode *ip = AFSTOV(avc);
-
- truncate_inode_pages(&ip->i_data, alen);
+ vmtruncate(AFSTOV(avc), alen);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
struct inode *ip = AFSTOV(avc);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.73 2008/11/08 16:49:59 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.77 2009/03/19 04:54:50 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
#if defined(AFS_LINUX26_ENV)
#define UnlockPage(pp) unlock_page(pp)
+extern struct backing_dev_info afs_backing_dev_info;
#endif
extern struct vcache *afs_globalVp;
code = afs_write(vcp, &tuio, f_flags, credp, 0);
- ip->i_size = vcp->m.Length;
+ i_size_write(ip, vcp->m.Length);
ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
if (!code) {
#endif
inode = (struct inode *)mapping->host;
- end_index = inode->i_size >> PAGE_CACHE_SHIFT;
+ end_index = i_size_read(inode) >> PAGE_CACHE_SHIFT;
/* easy case */
if (pp->index < end_index)
goto do_it;
/* things got complicated... */
- offset = inode->i_size & (PAGE_CACHE_SIZE - 1);
+ offset = i_size_read(inode) & (PAGE_CACHE_SIZE - 1);
/* OK, are we completely out? */
if (pp->index >= end_index + 1 || !offset)
return -EIO;
code = afs_write(vcp, &tuio, fp->f_flags, credp, 0);
- ip->i_size = vcp->m.Length;
+ i_size_write(ip, vcp->m.Length);
ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
if (!code) {
{
struct page *page;
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
+#if defined(HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN)
+ page = grab_cache_page_write_begin(mapping, index, flags);
+#else
page = __grab_cache_page(mapping, index);
+#endif
*pagep = page;
return 0;
if (vattr)
vattr2inode(ip, vattr);
+#if defined(AFS_LINUX26_ENV)
+ ip->i_mapping->backing_dev_info = &afs_backing_dev_info;
+#endif
/* Reset ops if symlink or directory. */
if (S_ISREG(ip->i_mode)) {
ip->i_op = &afs_file_iops;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_file.c,v 1.13.2.3 2008/03/17 15:28:55 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_file.c,v 1.13.2.5 2009/03/19 19:30:28 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
osi_UfsOpen(afs_int32 ainode)
#endif
{
+#ifdef AFS_CACHE_VNODE_PATH
+ struct vnode *vp;
+#else
struct inode *ip;
+#endif
register struct osi_file *afile = NULL;
afs_int32 code = 0;
int dummy;
+ char fname[1024];
+#ifdef AFS_CACHE_VNODE_PATH
+ char namebuf[1024];
+ struct pathname lookpn;
+#endif
+ struct osi_stat tstat;
afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
AFS_GUNLOCK();
+
+/*
+ * AFS_CACHE_VNODE_PATH can be used with any file system, including ZFS or tmpfs.
+ * The ainode is not an inode number but a signed index used to generate file names.
+ */
+#ifdef AFS_CACHE_VNODE_PATH
+ switch (ainode) {
+ case AFS_CACHE_CELLS_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CellItems");
+ break;
+ case AFS_CACHE_ITEMS_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CacheItems");
+ break;
+ case AFS_CACHE_VOLUME_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "VolumeItems");
+ break;
+ default:
+ dummy = ainode / afs_numfilesperdir;
+ snprintf(fname, 1024, "%s/D%d/V%d", afs_cachebasedir, dummy, ainode);
+ }
+
+ /* Can not use vn_open or lookupname, they use user's CRED()
+ * We need to run as root So must use low level lookuppnvp
+ * assume fname starts with /
+ */
+
+ code = pn_get_buf(fname, AFS_UIOSYS, &lookpn, namebuf, sizeof(namebuf));
+ if (code != 0)
+ osi_Panic("UfsOpen: pn_get_buf failed %ld %s %ld", code, fname, ainode);
+
+ VN_HOLD(rootdir); /* released in loopuppnvp */
+ code = lookuppnvp(&lookpn, NULL, FOLLOW, NULL, &vp,
+ rootdir, rootdir, &afs_osi_cred);
+ if (code != 0)
+ osi_Panic("UfsOpen: lookuppnvp failed %ld %s %ld", code, fname, ainode);
+
+#ifdef AFS_SUN511_ENV
+ code = VOP_OPEN(&vp, FREAD|FWRITE, &afs_osi_cred, NULL);
+#else
+ code = VOP_OPEN(&vp, FREAD|FWRITE, &afs_osi_cred);
+#endif
+
+ if (code != 0)
+ osi_Panic("UfsOpen: VOP_OPEN failed %ld %s %ld", code, fname, ainode);
+
+#else
code =
igetinode(afs_cacheVfsp, (dev_t) cacheDev.dev, (ino_t) ainode, &ip,
CRED(), &dummy);
+#endif
AFS_GLOCK();
if (code) {
osi_FreeSmallSpace(afile);
- osi_Panic("UfsOpen: igetinode failed");
+ osi_Panic("UfsOpen: igetinode failed %ld %s %ld", code, fname, ainode);
}
+#ifdef AFS_CACHE_VNODE_PATH
+ afile->vnode = vp;
+ code = afs_osi_Stat(afile, &tstat);
+ afile->size = tstat.size;
+#else
afile->vnode = ITOV(ip);
afile->size = VTOI(afile->vnode)->i_size;
+#endif
afile->offset = 0;
afile->proc = (int (*)())0;
afile->inum = ainode; /* for hint validity checking */
osi_DisableAtimes(struct vnode *avp)
{
if (afs_CacheFSType == AFS_SUN_UFS_CACHE) {
+#ifndef AFS_CACHE_VNODE_PATH
struct inode *ip = VTOI(avp);
rw_enter(&ip->i_contents, RW_READER);
mutex_enter(&ip->i_tlock);
ip->i_flag &= ~IACC;
mutex_exit(&ip->i_tlock);
rw_exit(&ip->i_contents);
+#endif
}
}
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.12 2008/03/17 15:28:55 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.13 2009/03/15 18:13:55 shadow Exp $");
/*
* SOLARIS/osi_vnodeops.c
else
tdc = afs_GetDCache(avc, (afs_offs_t) off, &treq, &offset, &nlen, 1);
if (!tdc)
- return EINVAL;
+ return afs_CheckCode(EINVAL, &treq, 62);
code = afs_VerifyVCache(avc, &treq);
if (code) {
afs_PutDCache(tdc);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.27.2.9 2008/10/27 23:54:09 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.27.2.10 2008/12/29 21:26:24 shadow Exp $");
#ifdef UKERNEL
struct usr_vnode *afs_FileTable[MAX_OSI_FILES];
int afs_FileFlags[MAX_OSI_FILES];
-int afs_FileOffsets[MAX_OSI_FILES];
+off_t afs_FileOffsets[MAX_OSI_FILES];
#define MAX_CACHE_LOOPS 4
usr_key_t afs_global_u_key;
-struct usr_proc *afs_global_procp;
-struct usr_ucred *afs_global_ucredp;
+struct usr_proc *afs_global_procp = NULL;
+struct usr_ucred *afs_global_ucredp = NULL;
struct usr_sysent usr_sysent[200];
#ifdef AFS_USR_OSF_ENV
cacheStatEntries = cacheStatEntriesParam;
}
strcpy(cacheBaseDir, cacheBaseDirParam);
- if (nDaemons != 0) {
+ if (nDaemonsParam != 0) {
nDaemons = nDaemonsParam;
} else {
nDaemons = 3;
(long)pathname_for_V[currVFile], 0, 0, 0);
}
/*end for */
-#ifndef NETSCAPE_NSAPI
+/*#ifndef NETSCAPE_NSAPI*/
+#if 0
+/* this breaks solaris if the kernel-mode client has never been installed,
+ * and it doesn't seem to work now anyway, so just disable it */
+
/*
* Copy our tokens from the kernel to the user space client
*/
errno = code;
return -1;
}
+ fileP = AFSTOV(vc);
} else {
fileP = NULL;
code = uafs_LookupName(nameP, dirP, &fileP, 1, 0);
*/
if ((flags & O_TRUNC) && (attrs.va_size != 0)) {
usr_vattr_null(&attrs);
+ attrs.va_mask = ATTR_SIZE;
attrs.va_size = 0;
code = afs_setattr(VTOAFS(fileP), &attrs, u.u_cred);
if (code != 0) {
{
int retval;
AFS_GLOCK();
- retval = uafs_write_r(fd, buf, len);
+ retval = uafs_pwrite_r(fd, buf, len, afs_FileOffsets[fd]);
+ AFS_GUNLOCK();
+ return retval;
+}
+
+int
+uafs_pwrite(int fd, char *buf, int len, off_t offset)
+{
+ int retval;
+ AFS_GLOCK();
+ retval = uafs_pwrite_r(fd, buf, len, offset);
AFS_GUNLOCK();
return retval;
}
int
-uafs_write_r(int fd, char *buf, int len)
+uafs_pwrite_r(int fd, char *buf, int len, off_t offset)
{
int code;
struct usr_uio uio;
iov[0].iov_len = len;
uio.uio_iov = &iov[0];
uio.uio_iovcnt = 1;
- uio.uio_offset = afs_FileOffsets[fd];
+ uio.uio_offset = offset;
uio.uio_segflg = 0;
uio.uio_fmode = FWRITE;
uio.uio_resid = len;
{
int retval;
AFS_GLOCK();
- retval = uafs_read_r(fd, buf, len);
+ retval = uafs_pread_r(fd, buf, len, afs_FileOffsets[fd]);
+ AFS_GUNLOCK();
+ return retval;
+}
+
+int
+uafs_pread(int fd, char *buf, int len, off_t offset)
+{
+ int retval;
+ AFS_GLOCK();
+ retval = uafs_pread_r(fd, buf, len, offset);
AFS_GUNLOCK();
return retval;
}
int
-uafs_read_r(int fd, char *buf, int len)
+uafs_pread_r(int fd, char *buf, int len, off_t offset)
{
int code;
struct usr_uio uio;
iov[0].iov_len = len;
uio.uio_iov = &iov[0];
uio.uio_iovcnt = 1;
- uio.uio_offset = afs_FileOffsets[fd];
+ uio.uio_offset = offset;
uio.uio_segflg = 0;
uio.uio_fmode = FREAD;
uio.uio_resid = len;
return -1;
}
usr_vattr_null(&attrs);
+ attrs.va_mask = ATTR_MODE;
attrs.va_mode = mode;
code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
VN_RELE(vp);
return -1;
}
usr_vattr_null(&attrs);
+ attrs.va_mask = ATTR_MODE;
attrs.va_mode = mode;
code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
return -1;
}
usr_vattr_null(&attrs);
+ attrs.va_mask = ATTR_SIZE;
attrs.va_size = length;
code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
VN_RELE(vp);
return -1;
}
usr_vattr_null(&attrs);
+ attrs.va_mask = ATTR_SIZE;
attrs.va_size = length;
code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
extern struct usr_vnode *afs_CurrentDir;
extern struct usr_vnode *afs_FileTable[];
extern int afs_FileFlags[];
-extern int afs_FileOffsets[];
+extern off_t afs_FileOffsets[];
extern char afs_mountDir[];
extern int afs_mountDirLen;
extern int uafs_creat(char *path, int mode);
extern int uafs_creat_r(char *path, int mode);
extern int uafs_write(int fd, char *buf, int len);
-extern int uafs_write_r(int fd, char *buf, int len);
+extern int uafs_pwrite(int fd, char *buf, int len, off_t offset);
+extern int uafs_pwrite_r(int fd, char *buf, int len, off_t offset);
extern int uafs_read(int fd, char *buf, int len);
-extern int uafs_read_r(int fd, char *buf, int len);
+extern int uafs_pread(int fd, char *buf, int leni, off_t offset);
+extern int uafs_pread_r(int fd, char *buf, int len, off_t offset);
extern int uafs_fsync(int fd);
extern int uafs_fsync_r(int fd);
extern int uafs_close(int fd);
unsigned long f_files;
};
+#define ATTR_MODE (1 << 0)
+#define ATTR_UID (1 << 1)
+#define ATTR_GID (1 << 2)
+#define ATTR_MTIME (1 << 3)
+#define ATTR_SIZE (1 << 4)
+
struct usr_vattr {
- long va_mask;
+ int va_mask; /* bitmask of ATTR_* values above */
usr_vtype_t va_type;
- unsigned short va_mode;
- long va_uid;
- long va_gid;
- unsigned long va_fsid;
- unsigned long va_nodeid;
- unsigned long va_nlink;
- unsigned long va_size;
+ mode_t va_mode;
+ uid_t va_uid;
+ gid_t va_gid;
+ int va_fsid;
+ ino_t va_nodeid;
+ nlink_t va_nlink;
+ afs_size_t va_size;
struct timeval va_atime;
struct timeval va_mtime;
struct timeval va_ctime;
- unsigned long va_rdev;
+ dev_t va_rdev;
unsigned long va_blocksize;
- unsigned long va_blocks;
+ blkcnt_t va_blocks;
unsigned long va_vcode;
};
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.11 2006/11/10 00:08:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.14 2009/01/13 19:37:28 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#elif defined(AFS_AIX_ENV)
/* Boy, was this machine dependent bogosity hard to swallow????.... */
if (av->va_mode != -1) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_MODE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MODE) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_gid)) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_GID) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_GID) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_uid)) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_UID) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_UID) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_modify_time)) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_MTIME) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MTIME) {
*/
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (attrs->va_mask & ATTR_SIZE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
#endif
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
if (attrs->va_mask & ATTR_SIZE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
#elif defined(AFS_OSF_ENV) || defined(AFS_XBSD_ENV)
if (attrs->va_size != VNOVAL) {
-#else
+#elif defined(AFS_AIX41_ENV)
if (attrs->va_size != -1) {
+#else
+ if (attrs->va_size != ~0) {
#endif
afs_size_t tsize = attrs->va_size;
ObtainWriteLock(&avc->lock, 128);
avc->states |= CDirty;
code = afs_TruncateAllSegments(avc, tsize, &treq, acred);
+#ifdef AFS_LINUX26_ENV
+ /* We must update the Linux kernel's idea of file size as soon as
+ * possible, to avoid racing with delayed writepages delivered by
+ * pdflush */
+ if (code == 0)
+ i_size_write(AFSTOV(avc), tsize);
+#endif
/* if date not explicitly set by this call, set it ourselves, since we
* changed the data */
if (!(astat.Mask & AFS_SETMODTIME)) {
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.16.2.10 2007/12/08 18:00:45 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.16.2.11 2008/12/29 21:26:25 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
VATTR_INIT(attrs);
VATTR_SET_SUPPORTED(attrs, va_data_size);
VATTR_SET_ACTIVE(attrs, va_data_size);
+#elif defined(UKERNEL)
+ attrs->va_mask = ATTR_SIZE;
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
attrs->va_mask = AT_SIZE;
#else
/* The actual number of bytes in the SmallFid, not the sizeof struct. */
#define SIZEOF_SMALLFID 10
+/* Queues
+ * ------
+ *
+ * Circular queues, implemented with pointers. Structures may contain as many
+ * queues as required, which may be located at any point within the structure,
+ * providing the QEntry macro is used to translate between a queue pointer, and
+ * the address of its containing structure
+ */
-/*
- * Queues implemented with both pointers and short offsets into a disk file.
- */
struct afs_q {
struct afs_q *next;
struct afs_q *prev;
};
+#define QInit(q) ((q)->prev = (q)->next = (q))
+#define QAdd(q,e) ((e)->next = (q)->next, (e)->prev = (q), \
+ (q)->next->prev = (e), (q)->next = (e))
+#define QRemove(e) ((e)->next->prev = (e)->prev, (e)->prev->next = (e)->next, (e)->prev = NULL, (e)->next = NULL)
+#define QNext(e) ((e)->next)
+#define QPrev(e) ((e)->prev)
+#define QEmpty(q) ((q)->prev == (q))
+/* this one takes q1 and sticks it on the end of q2 - that is, the other end, not the end
+ * that things are added onto. q1 shouldn't be empty, it's silly */
+#define QCat(q1,q2) ((q2)->prev->next = (q1)->next, (q1)->next->prev=(q2)->prev, (q1)->prev->next=(q2), (q2)->prev=(q1)->prev, (q1)->prev=(q1)->next=(q1))
+
+/* Given a pointer to an afs_q within a structure, go back to the address of
+ * the parent structure
+ */
+
+#define QEntry(queue, structure, member) \
+ ((structure *)((char *)(queue)-(char *)(&((structure *)NULL)->member)))
+
+/* And implement operations for individual lists in terms of the above macro */
+
+#define QTOV(e) QEntry(e, struct vcache, vlruq)
+#define QTOC(e) QEntry(e, struct cell, lruq)
+#define QTOVH(e) QEntry(e, struct vcache, vhashq)
+
struct vrequest {
afs_int32 uid; /* user id making the request */
afs_int32 busyCount; /* how many busies we've seen so far */
(!(afid)->Fid.Unique && ((tvc)->states & CUnique))))
-/*
- * Operations on circular queues implemented with pointers. Note: these queue
- * objects are always located at the beginning of the structures they are linking.
- */
-#define QInit(q) ((q)->prev = (q)->next = (q))
-#define QAdd(q,e) ((e)->next = (q)->next, (e)->prev = (q), \
- (q)->next->prev = (e), (q)->next = (e))
-#define QRemove(e) ((e)->next->prev = (e)->prev, (e)->prev->next = (e)->next, (e)->prev = NULL, (e)->next = NULL)
-#define QNext(e) ((e)->next)
-#define QPrev(e) ((e)->prev)
-#define QEmpty(q) ((q)->prev == (q))
-/* this one takes q1 and sticks it on the end of q2 - that is, the other end, not the end
- * that things are added onto. q1 shouldn't be empty, it's silly */
-#define QCat(q1,q2) ((q2)->prev->next = (q1)->next, (q1)->next->prev=(q2)->prev, (q1)->prev->next=(q2), (q2)->prev=(q1)->prev, (q1)->prev=(q1)->next=(q1))
-/*
- * Do lots of address arithmetic to go from vlruq to the base of the vcache
- * structure. Don't move struct vnode, since we think of a struct vcache as
- * a specialization of a struct vnode
- */
-#define QTOV(e) ((struct vcache *)(((char *) (e)) - (((char *)(&(((struct vcache *)(e))->vlruq))) - ((char *)(e)))))
-#define QTOC(e) ((struct cell *)((char *) (e)))
-#define QTOVH(e) ((struct vcache *)(((char *) (e)) - (((char *)(&(((struct vcache *)(e))->vhashq))) - ((char *)(e)))))
-
#define SRVADDR_MH 1
#define SRVADDR_ISDOWN 0x20 /* same as SRVR_ISDOWN */
#define SRVADDR_NOUSE 0x40 /* Don't use this srvAddr */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.32 2008/06/29 03:26:03 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.33 2009/03/20 02:32:59 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
afs_CacheInit(cparms.cacheScaches, cparms.cacheFiles,
cparms.cacheBlocks, cparms.cacheDcaches,
cparms.cacheVolumes, cparms.chunkSize,
- cparms.memCacheFlag, cparms.inodes, cparms.users);
+ cparms.memCacheFlag, cparms.inodes, cparms.users,
+ cparms.dynamic_vcaches);
} else if (parm == AFSOP_CACHEINODE) {
ino_t ainode = parm2;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_cbqueue.c,v 1.9.2.4 2006/03/02 06:44:05 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_cbqueue.c,v 1.9.2.5 2009/03/20 02:32:59 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
*/
/* Sanity check on the callback queue. Allow for slop in the computation. */
-#ifdef AFS_OSF_ENV
+#if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
#define CBQ_LIMIT (afs_maxvcount + 10)
#else
#define CBQ_LIMIT (afs_cacheStats + afs_stats_cmperf.vcacheXAllocs + 10)
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.14 2007/10/23 00:03:01 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.15 2009/03/20 02:32:59 shadow Exp $");
#ifdef AFS_AIX51_ENV
#define __FULL_PROTO
#define afs_CheckRXEpoch() {if (rxepoch_checked == 0 && rxkad_EpochWasSet) { \
rxepoch_checked = 1; afs_GCUserData(/* force flag */ 1); } }
+extern int afsd_dynamic_vcaches;
+
/* PAG garbage collection */
/* We induce a compile error if param.h does not define AFS_GCPAGS */
afs_int32 afs_gcpags = AFS_GCPAGS;
struct afs_exporter *exporter;
afs_int32 now;
afs_int32 last3MinCheck, last10MinCheck, last60MinCheck, lastNMinCheck;
- afs_int32 last1MinCheck;
+ afs_int32 last1MinCheck, last5MinCheck;
afs_uint32 lastCBSlotBump;
char cs_warned = 0;
AFS_STATCNT(afs_Daemon);
last1MinCheck = last3MinCheck = last60MinCheck = last10MinCheck =
- lastNMinCheck = 0;
+ last5MinCheck = lastNMinCheck = 0;
afs_rootFid.Fid.Volume = 0;
while (afs_initState < 101)
last3MinCheck = now - 90 + ((afs_random() & 0x7fffffff) % 180);
last60MinCheck = now - 1800 + ((afs_random() & 0x7fffffff) % 3600);
last10MinCheck = now - 300 + ((afs_random() & 0x7fffffff) % 600);
+ last5MinCheck = now - 150 + ((afs_random() & 0x7fffffff) % 300);
lastNMinCheck = now - 90 + ((afs_random() & 0x7fffffff) % 180);
/* start off with afs_initState >= 101 (basic init done) */
* tickets */
last3MinCheck = now;
}
+#ifdef AFS_MAXVCOUNT_ENV
+ if (afsd_dynamic_vcaches && (last5MinCheck + 300 < now)) {
+ /* start with trying to drop us back to our base usage */
+ int anumber;
+ if (afs_maxvcount <= afs_cacheStats)
+ anumber = VCACHE_FREE;
+ else
+ anumber = VCACHE_FREE + (afs_maxvcount - afs_cacheStats);
+
+ afs_ShakeLooseVCaches(anumber);
+ last5MinCheck = now;
+ }
+#endif
if (!afs_CheckServerDaemonStarted) {
/* Do the check here if the correct afsd is not installed. */
if (!cs_warned) {
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.8 2008/06/12 17:25:03 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.9 2009/03/20 02:32:59 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
static struct vnode *volumeVnode;
#endif
+/* This is the kernel side of the dynamic vcache setting */
+int afsd_dynamic_vcaches = 0; /* Enable dynamic-vcache support */
+
/*
* Initialization order is important. Must first call afs_CacheInit,
* then cache file and volume file initialization routines. Next, the
int
afs_CacheInit(afs_int32 astatSize, afs_int32 afiles, afs_int32 ablocks,
afs_int32 aDentries, afs_int32 aVolumes, afs_int32 achunk,
- afs_int32 aflags, afs_int32 ninodes, afs_int32 nusers)
+ afs_int32 aflags, afs_int32 ninodes, afs_int32 nusers, afs_int32 dynamic_vcaches)
{
register afs_int32 i;
register struct volume *tv;
afs_stats_cmperf.sysName_ID = SYS_NAME_ID_UNDEFINED;
#endif /* SYS_NAME_ID */
+#ifdef AFS_MAXVCOUNT_ENV
+ afsd_dynamic_vcaches = dynamic_vcaches;
+ printf("%s dynamically allocated vcaches\n", ( afsd_dynamic_vcaches ? "enabling" : "disabling" ));
+#else
+ afsd_dynamic_vcaches = 0;
+#endif
+
printf("Starting AFS cache scan...");
if (afs_cacheinit_flag)
return 0;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_nfsdisp.c,v 1.18.2.4 2008/08/13 23:49:37 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_nfsdisp.c,v 1.18.2.5 2009/01/15 13:27:43 shadow Exp $");
/* Ugly Ugly Ugly but precludes conflicting XDR macros; We want kernel xdr */
#define __XDR_INCLUDE__
afs_nfs2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_setattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_lookup(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_READLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_read(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_write(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_create(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_remove(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rename(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_link(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_symlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_mkdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rmdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_statfs(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs2_dispatcher(0, RFS_STATFS, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_acl2_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_access(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETXATTRDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READLINK, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKNOD, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIRPLUS, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSSTAT, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSINFO, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_PATHCONF, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_COMMIT, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ struct AFS_UCRED *svcred = curthread->t_cred;
+ curthread->t_cred = (struct AFS_UCRED *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_GETXATTRDIR, (char *)args, &exp, rp, crp);
if (call > 1)
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.18 2008/10/12 18:44:46 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.19 2009/01/15 13:27:43 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
|| (pr->state == TASK_UNINTERRUPTIBLE)
|| (pr->state == TASK_STOPPED)) {
cr.cr_ref = 1;
- cr.cr_uid = pr->uid;
+ cr.cr_uid = task_uid(pr);
#if defined(AFS_LINUX26_ENV)
+#if defined(STRUCT_TASK_HAS_CRED)
+ get_group_info(pr->cred->group_info);
+ cr.cr_group_info = pr->cred->group_info;
+#else
get_group_info(pr->group_info);
cr.cr_group_info = pr->group_info;
+#endif
#else
cr.cr_ngroups = pr->ngroups;
memcpy(cr.cr_groups, pr->groups, NGROUPS * sizeof(gid_t));
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.33 2008/04/18 20:13:32 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.34 2009/01/19 18:09:34 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifdef AFS_OBSD_ENV
DECL_PIOCTL(PRxStatProc);
DECL_PIOCTL(PRxStatPeer);
DECL_PIOCTL(PPrefetchFromTape);
-DECL_PIOCTL(PResidencyCmd);
+DECL_PIOCTL(PFsCmd);
DECL_PIOCTL(PCallBackAddr);
DECL_PIOCTL(PNewUuid);
/*
PBogus, /* 64 -- arla: force cache check */
PBogus, /* 65 -- arla: break callback */
PPrefetchFromTape, /* 66 -- MR-AFS: prefetch file from tape */
- PResidencyCmd, /* 67 -- MR-AFS: generic commnd interface */
+ PFsCmd, /* 67 -- RXOSD: generic commnd interface */
PBogus, /* 68 -- arla: fetch stats */
PGetVnodeXStatus2, /* 69 - get caller access and some vcache status */
};
return code;
}
-DECL_PIOCTL(PResidencyCmd)
+DECL_PIOCTL(PFsCmd)
{
register afs_int32 code;
struct conn *tc;
struct vcache *tvc;
- struct ResidencyCmdInputs *Inputs;
- struct ResidencyCmdOutputs *Outputs;
+ struct FsCmdInputs *Inputs;
+ struct FsCmdOutputs *Outputs;
struct VenusFid tfid;
struct AFSFid *Fid;
- Inputs = (struct ResidencyCmdInputs *)ain;
- Outputs = (struct ResidencyCmdOutputs *)aout;
+ Inputs = (struct FsCmdInputs *)ain;
+ Outputs = (struct FsCmdOutputs *)aout;
if (!avc)
return EINVAL;
- if (!ain || ainSize != sizeof(struct ResidencyCmdInputs))
+ if (!ain || ainSize != sizeof(struct FsCmdInputs))
return EINVAL;
Fid = &Inputs->fid;
if (tc) {
RX_AFS_GUNLOCK();
code =
- RXAFS_ResidencyCmd(tc->id, Fid, Inputs,
- (struct ResidencyCmdOutputs *)aout);
+ RXAFS_FsCmd(tc->id, Fid, Inputs,
+ (struct FsCmdOutputs *)aout);
RX_AFS_GLOCK();
} else
code = -1;
afs_PutVCache(tvc);
if (!code) {
- *aoutSize = sizeof(struct ResidencyCmdOutputs);
+ *aoutSize = sizeof(struct FsCmdOutputs);
}
return code;
}
afs_int32 ablocks, afs_int32 aDentries,
afs_int32 aVolumes, afs_int32 achunk,
afs_int32 aflags, afs_int32 ninodes,
- afs_int32 nusers);
+ afs_int32 nusers, afs_int32 dynamic_vcaches);
extern void afs_ComputeCacheParms(void);
extern int afs_InitCacheInfo(register char *afile);
extern int afs_InitVolumeInfo(char *afile);
/* afs_vcache.c */
+extern int afs_ShakeLooseVCaches(afs_int32 anumber);
extern afs_int32 afs_maxvcount;
extern afs_int32 afs_vcount;
extern int afsvnumbers;
ec CM_TRACE_VMRDWR, "afs_vm_rdwr: vp = 0x%lx, xfrSize 0x%lx, toffset 0x%x"
ec CM_TRACE_READFAST, "ReadFast vp 0x%lx off (0x%x, 0x%x) resid 0x%x file length (0x%x, 0x%x)"
ec CM_TRACE_FETCH64CODE, "StartRX_FetchData64 for vp 0x%lx returned %d"
- ec CM_TRACE_FETCH64LENG, "FetchData64 for vp 0xl%x code = %d, length = (0x%x, 0x%x)"
- ec CM_TRACE_FETCH64READ, "FetchData64 for vp 0xl%x code = %d, length = 0x%x"
+ ec CM_TRACE_FETCH64LENG, "FetchData64 for vp 0x%lx code = %d, length = (0x%x, 0x%x)"
+ ec CM_TRACE_FETCH64READ, "FetchData64 for vp 0x%lx code = %d, length = 0x%x"
ec CM_TRACE_VMWRITE, "afs_vm_rdwr: vp 0x%lx offset (0x%x, 0x%x) length (0x%x, 0x%x)"
ec CM_TRACE_VMWRITE2, "afs_vm_rdwr: vp 0x%lx first page 0x%x pages %d"
ec CM_TRACE_VMSTOREALL, "osi_VM_StoreAllSegments for vp 0x%lx call %d"
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.50 2008/08/26 14:02:11 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.54 2009/03/25 19:34:59 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
static struct afs_cbr *afs_cbrHashT[CBRSIZE];
afs_int32 afs_bulkStatsLost;
int afs_norefpanic = 0;
+extern int afsd_dynamic_vcaches;
/* Forward declarations */
static afs_int32 afs_QueueVCB(struct vcache *avc);
VN_UNLOCK(AFSTOV(avc));
#endif
AFS_RELE(AFSTOV(avc));
+ afs_stats_cmperf.vcacheXAllocs--;
} else {
if (afs_norefpanic) {
printf("flush vc refcnt < 1");
* held, so we don't have to worry about blocking in osi_Alloc.
*/
static struct afs_cbr *afs_cbrSpace = 0;
+/* if alloc limit below changes, fix me! */
+static struct afs_cbr *afs_cbrHeads[2];
struct afs_cbr *
afs_AllocCBR(void)
{
}
tsp[AFS_NCBRS - 1].next = 0;
afs_cbrSpace = tsp;
+ afs_cbrHeads[afs_stats_cmperf.CallBackAlloced] = tsp;
afs_stats_cmperf.CallBackAlloced++;
}
}
#endif
}
-/*
- * afs_NewVCache
- *
- * Description:
- * This routine is responsible for allocating a new cache entry
- * from the free list. It formats the cache entry and inserts it
- * into the appropriate hash tables. It must be called with
- * afs_xvcache write-locked so as to prevent several processes from
- * trying to create a new cache entry simultaneously.
- *
- * Parameters:
- * afid : The file id of the file whose cache entry is being
- * created.
- */
-/* LOCK: afs_NewVCache afs_xvcache W */
-struct vcache *
-afs_NewVCache(struct VenusFid *afid, struct server *serverp)
+int
+afs_ShakeLooseVCaches(afs_int32 anumber)
{
- struct vcache *tvc;
+#if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
afs_int32 i, j;
- afs_int32 anumber = VCACHE_FREE;
-#ifdef AFS_AIX_ENV
- struct gnode *gnodepnt;
-#endif
-#ifdef AFS_OSF_ENV
- struct vcache *nvc;
-#endif /* AFS_OSF_ENV */
+ struct vcache *tvc;
struct afs_q *tq, *uq;
int code, fv_slept;
+ afs_int32 target = anumber;
+ int haveGlock = 1;
- AFS_STATCNT(afs_NewVCache);
-
- afs_FlushReclaimedVcaches();
+ /* Should probably deal better */
+ if (!ISAFS_GLOCK()) {
+ haveGlock = 0;
+ AFS_GLOCK();
+ }
-#if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
-#if defined(AFS_OSF30_ENV) || defined(AFS_LINUX22_ENV)
- if (afs_vcount >= afs_maxvcount)
-#else
- /*
- * If we are using > 33 % of the total system vnodes for AFS vcache
- * entries or we are using the maximum number of vcache entries,
- * then free some. (if our usage is > 33% we should free some, if
- * our usage is > afs_maxvcount, set elsewhere to 0.5*nvnode,
- * we _must_ free some -- no choice).
- */
- if (((3 * afs_vcount) > nvnode) || (afs_vcount >= afs_maxvcount))
+ if (
+#ifdef AFS_MAXVCOUNT_ENV
+ afsd_dynamic_vcaches || /* Always run if dynamic vcaches are enabled. */
#endif
- {
+ afs_vcount >= afs_maxvcount
+ ) {
int i;
char *panicstr;
uq = QPrev(tq);
if (tvc->states & CVFlushed) {
refpanic("CVFlushed on VLRU");
- } else if (i++ > afs_maxvcount) {
+ } else if (
+#ifdef AFS_MAXVCOUNT_ENV
+ ! afsd_dynamic_vcaches &&
+#endif
+ i++ > afs_maxvcount) {
refpanic("Exceeded pool of AFS vnodes(VLRU cycle?)");
} else if (QNext(uq) != tq) {
refpanic("VLRU inconsistent");
if (tq == uq)
break;
}
- if (anumber == VCACHE_FREE) {
- printf("afs_NewVCache: warning none freed, using %d of %d\n",
+ if (
+#ifdef AFS_MAXVCOUNT_ENV
+ !afsd_dynamic_vcaches &&
+#endif
+ anumber == target) {
+ printf("afs_ShakeLooseVCaches: warning none freed, using %d of %d\n",
afs_vcount, afs_maxvcount);
- if (afs_vcount >= afs_maxvcount) {
- printf("afs_NewVCache - none freed\n");
- return NULL;
- }
}
}
+/*
+ printf("recycled %d entries\n", target-anumber);
+*/
+ if (!haveGlock)
+ AFS_GUNLOCK();
+#endif
+ return 0;
+}
-#if defined(AFS_LINUX22_ENV)
+
+static struct vcache *
+afs_AllocVCache(void)
{
+ struct vcache *tvc;
+#if defined(AFS_OSF30_ENV)
+ struct vcache *nvc;
+ AFS_GUNLOCK();
+ if (getnewvnode(MOUNT_AFS, &Afs_vnodeops, &nvc)) {
+ /* What should we do ???? */
+ osi_Panic("afs_AllocVCache: no more vnodes");
+ }
+ AFS_GLOCK();
+
+ tvc = nvc;
+ tvc->nextfree = NULL;
+ afs_vcount++;
+#elif defined(AFS_LINUX22_ENV)
struct inode *ip;
AFS_GUNLOCK();
ip = new_inode(afs_globalVFS);
if (!ip)
- osi_Panic("afs_NewVCache: no more inodes");
+ osi_Panic("afs_AllocVCache: no more inodes");
AFS_GLOCK();
#if defined(STRUCT_SUPER_HAS_ALLOC_INODE)
tvc = VTOAFS(ip);
ip->u.generic_ip = tvc;
tvc->v = ip;
#endif
-}
+
+ afs_vcount++;
+#ifdef AFS_MAXVCOUNT_ENV
+ /* track the peak */
+ if (afsd_dynamic_vcaches && afs_maxvcount < afs_vcount) {
+ afs_maxvcount = afs_vcount;
+ printf("peak vnodes: %d\n", afs_maxvcount);
+ }
+#endif
+ afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
#else
- AFS_GUNLOCK();
- if (getnewvnode(MOUNT_AFS, &Afs_vnodeops, &nvc)) {
- /* What should we do ???? */
- osi_Panic("afs_NewVCache: no more vnodes");
+ /* none free, making one is better than a panic */
+ afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
+ tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache));
+#if defined(AFS_DARWIN_ENV) && !defined(UKERNEL)
+ tvc->v = NULL; /* important to clean this, or use memset 0 */
+#endif
+#ifdef KERNEL_HAVE_PIN
+ pin((char *)tvc, sizeof(struct vcache)); /* XXX */
+#endif
+#if defined(AFS_SGI_ENV)
+ {
+ char name[METER_NAMSZ];
+ memset(tvc, 0, sizeof(struct vcache));
+ tvc->v.v_number = ++afsvnumbers;
+ tvc->vc_rwlockid = OSI_NO_LOCKID;
+ initnsema(&tvc->vc_rwlock, 1,
+ makesname(name, "vrw", tvc->v.v_number));
+#ifndef AFS_SGI53_ENV
+ initnsema(&tvc->v.v_sync, 0,
+ makesname(name, "vsy", tvc->v.v_number));
+#endif
+#ifndef AFS_SGI62_ENV
+ initnlock(&tvc->v.v_lock,
+ makesname(name, "vlk", tvc->v.v_number));
+#endif
}
- AFS_GLOCK();
+#endif /* AFS_SGI_ENV */
+#endif
+ return tvc;
+}
- tvc = nvc;
- tvc->nextfree = NULL;
+/*!
+ * This routine is responsible for allocating a new cache entry
+ * from the free list. It formats the cache entry and inserts it
+ * into the appropriate hash tables. It must be called with
+ * afs_xvcache write-locked so as to prevent several processes from
+ * trying to create a new cache entry simultaneously.
+ *
+ * LOCK: afs_NewVCache afs_xvcache W
+ *
+ * \param afid The file id of the file whose cache entry is being created.
+ *
+ * \return The new vcache struct.
+ */
+struct vcache *
+afs_NewVCache(struct VenusFid *afid, struct server *serverp)
+{
+ struct vcache *tvc;
+ afs_int32 i, j;
+ afs_int32 anumber = VCACHE_FREE;
+#ifdef AFS_AIX_ENV
+ struct gnode *gnodepnt;
#endif
- afs_vcount++;
+ struct afs_q *tq, *uq;
+ int code, fv_slept;
+
+ AFS_STATCNT(afs_NewVCache);
+
+ afs_FlushReclaimedVcaches();
+
+#if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
+#ifdef AFS_MAXVCOUNT_ENV
+ if(!afsd_dynamic_vcaches) {
+#endif
+ afs_ShakeLooseVCaches(anumber);
+ if (afs_vcount >= afs_maxvcount) {
+ printf("afs_NewVCache - none freed\n");
+ return NULL;
+ }
+#ifdef AFS_MAXVCOUNT_ENV
+ }
+#endif
+ tvc = afs_AllocVCache();
#else /* AFS_OSF_ENV */
/* pull out a free cache entry */
if (!freeVCList) {
}
}
if (!freeVCList) {
- /* none free, making one is better than a panic */
- afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
- tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache));
-#if defined(AFS_DARWIN_ENV) && !defined(UKERNEL)
- tvc->v = NULL; /* important to clean this, or use memset 0 */
-#endif
-#ifdef KERNEL_HAVE_PIN
- pin((char *)tvc, sizeof(struct vcache)); /* XXX */
-#endif
-#if defined(AFS_SGI_ENV)
- {
- char name[METER_NAMSZ];
- memset(tvc, 0, sizeof(struct vcache));
- tvc->v.v_number = ++afsvnumbers;
- tvc->vc_rwlockid = OSI_NO_LOCKID;
- initnsema(&tvc->vc_rwlock, 1,
- makesname(name, "vrw", tvc->v.v_number));
-#ifndef AFS_SGI53_ENV
- initnsema(&tvc->v.v_sync, 0,
- makesname(name, "vsy", tvc->v.v_number));
-#endif
-#ifndef AFS_SGI62_ENV
- initnlock(&tvc->v.v_lock,
- makesname(name, "vlk", tvc->v.v_number));
-#endif
- }
-#endif /* AFS_SGI_ENV */
+ tvc = afs_AllocVCache();
} else {
tvc = freeVCList; /* take from free list */
freeVCList = tvc->nextfree;
newvcache = 1;
ConvertWToSLock(&afs_xvcache);
- if (!tvc)
+ if (tvc == NULL)
{
ReleaseSharedLock(&afs_xvcache);
return NULL;
*/
{
- register struct afs_q *tq, *uq;
+ register struct afs_q *tq, *uq = NULL;
register struct vcache *tvc;
for (tq = VLRU.prev; tq != &VLRU; tq = uq) {
tvc = QTOV(tq);
tvc->linkData = 0;
}
- afs_FreeAllAxs(&(tvc->Access));
+ if (tvc->Access)
+ afs_FreeAllAxs(&(tvc->Access));
}
afs_vhashT[i] = 0;
}
/*
* Free any leftover callback queue
*/
- for (tsp = afs_cbrSpace; tsp; tsp = nsp) {
- nsp = tsp->next;
+ for (i = 0; i < afs_stats_cmperf.CallBackAlloced; i++) {
+ tsp = afs_cbrHeads[i];
+ afs_cbrHeads[i] = 0;
afs_osi_Free((char *)tsp, AFS_NCBRS * sizeof(struct afs_cbr));
}
afs_cbrSpace = 0;
-#! /bin/sh
+#! /bin/bash
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
#
* -nosettime Don't keep checking the time to avoid drift (default).
* -settime Keep checking the time to avoid drift.
* -verbose Be chatty.
+ * -disable-dynamic-vcaches Disable the use of -stat value as the starting size of
+ * the size of the vcache/stat cache pool,
+ * but increase that pool dynamically as needed.
* -debug Print out additional debugging info.
* -kerndev [OBSOLETE] The kernel device for AFS.
* -dontfork [OBSOLETE] Don't fork off as a new process.
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.25 2007/10/31 22:32:17 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.26 2009/03/20 02:32:59 shadow Exp $");
#define VFS 1
#ifdef notdef
static int inodes = 60; /* VERY conservative, but has to be */
#endif
+int afsd_dynamic_vcaches = 0; /* Enable dynamic-vcache support */
int afsd_verbose = 0; /*Are we being chatty? */
int afsd_debug = 0; /*Are we printing debugging info? */
int afsd_CloseSynch = 0; /*Are closes synchronous or not? */
}
}
+ if (as->parms[34].items) {
+#ifdef AFS_MAXVCOUNT_ENV
+ /* -disable-dynamic-vcaches */
+ afsd_dynamic_vcaches = FALSE;
+#else
+ printf("afsd: Error toggling flag, dynamically allocated vcaches not supported on your platform\n");
+ exit(1);
+#endif
+ }
+#ifdef AFS_MAXVCOUNT_ENV
+ else {
+ /* -dynamic-vcaches */
+ afsd_dynamic_vcaches = TRUE;
+ }
+
+ if (afsd_verbose)
+ printf("afsd: %s dynamically allocated vcaches\n", ( afsd_dynamic_vcaches ? "enabling" : "disabling" ));
+#endif
+
/*
* Pull out all the configuration info for the workstation's AFS cache and
* the cellular community we're willing to let our users see.
cparams.chunkSize = chunkSize;
cparams.setTimeFlag = cacheSetTime;
cparams.memCacheFlag = cacheFlags;
+ cparams.dynamic_vcaches = afsd_dynamic_vcaches;
#ifdef notdef
cparams.inodes = inodes;
#endif
cmd_AddParm(ts, "-settime", CMD_FLAG, CMD_OPTIONAL,
"set the time");
cmd_AddParm(ts, "-rxpck", CMD_SINGLE, CMD_OPTIONAL, "set rx_extraPackets to this value");
+ cmd_AddParm(ts, "-disable-dynamic-vcaches", CMD_FLAG, CMD_OPTIONAL, "disable stat/vcache cache growing as needed");
return (cmd_Dispatch(argc, argv));
}
AKLIBS = ${LIBS} @KRB5LIBS@
AFSLIBS = ${TOP_LIBDIR}/libprot.a ${TOP_LIBDIR}/libubik.a \
${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a \
- ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
- ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdes.a \
- ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libafsutil.a
+ ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/librx.a \
+ ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libsys.a \
+ ${TOP_LIBDIR}/libdes.a ${TOP_LIBDIR}/libcom_err.a \
+ ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libafsutil.a
SRCS= aklog.c aklog_main.c krb_util.c linked_list.c
OBJS= aklog.o aklog_main.o krb_util.o linked_list.o
klog: klog.o skipwrap.o ${AFSLIBS}
${CC} -o $@ ${CFLAGS} skipwrap.o klog.o ${AKLIBS} ${AFSLIBS} \
- ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/librx.a ${XLIBS}
+ ${XLIBS}
#
# Installation targets
/*
- * $Id: aklog_main.c,v 1.1.2.28 2008/10/29 19:44:10 shadow Exp $
+ * $Id: aklog_main.c,v 1.1.2.31 2009/03/15 18:02:52 shadow Exp $
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
#include <afsconfig.h>
RCSID
- ("$Header: /cvs/openafs/src/aklog/aklog_main.c,v 1.1.2.28 2008/10/29 19:44:10 shadow Exp $");
+ ("$Header: /cvs/openafs/src/aklog/aklog_main.c,v 1.1.2.31 2009/03/15 18:02:52 shadow Exp $");
#include <stdio.h>
#include <string.h>
#include <ctype.h>
if (! do524) {
char *p;
+ char k4name[ANAME_SZ], k4inst[INST_SZ], k4realm[REALM_SZ];
int len;
if (dflag)
printf("Using Kerberos V5 ticket natively\n");
+#ifndef HAVE_NO_KRB5_524
+ status = krb5_524_conv_principal (context, v5cred->client, &k4name, &k4inst, &k4realm);
+ if (status) {
+ afs_com_err(progname, status, "while converting principal "
+ "to Kerberos V4 format");
+ return(AKLOG_KERBEROS);
+ }
+ strcpy (username, k4name);
+ if (k4inst[0]) {
+ strcat (username, ".");
+ strcat (username, k4inst);
+ }
+#else
len = min(get_princ_len(context, v5cred->client, 0),
- second_comp(context, v5cred->client) ?
- MAXKTCNAMELEN - 2 : MAXKTCNAMELEN - 1);
+ second_comp(context, v5cred->client) ?
+ MAXKTCNAMELEN - 2 : MAXKTCNAMELEN - 1);
strncpy(username, get_princ_str(context, v5cred->client, 0), len);
username[len] = '\0';
-
+
if (second_comp(context, v5cred->client)) {
- strcat(username, ".");
+ strcat(username, ".");
p = username + strlen(username);
len = min(get_princ_len(context, v5cred->client, 1),
MAXKTCNAMELEN - strlen(username) - 1);
strncpy(p, get_princ_str(context, v5cred->client, 1), len);
p[len] = '\0';
}
+#endif
memset(&atoken, 0, sizeof(atoken));
atoken.kvno = RXKAD_TKT_TYPE_KERBEROS_V5;
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/audit/audit.c,v 1.8.2.12 2006/10/13 19:42:19 shadow Exp $");
+ ("$Header: /cvs/openafs/src/audit/audit.c,v 1.8.2.16 2009/03/19 03:45:01 shadow Exp $");
#include <fcntl.h>
#include <stdarg.h>
#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef AFS_NT40_ENV
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
#ifdef AFS_AIX32_ENV
#include <sys/audit.h>
#else
break;
case AUD_FIDS: /* array of Fids */
vaFids = va_arg(vaList, struct AFSCBFids *);
- vaFid = NULL;
if (vaFids) {
int i;
- if (vaFid)
+
+ vaFid = vaFids->AFSCBFids_val;
+
+ if (vaFid) {
fprintf(out, "FIDS %u FID %u:%u:%u ", vaFids->AFSCBFids_len, vaFid->Volume,
vaFid->Vnode, vaFid->Unique);
- else
+ for ( i = 1; i < vaFids->AFSCBFids_len; i++, vaFid++ )
+ fprintf(out, "FID %u:%u:%u ", vaFid->Volume,
+ vaFid->Vnode, vaFid->Unique);
+ } else
fprintf(out, "FIDS 0 FID 0:0:0 ");
- for ( i = 1; i < vaFids->AFSCBFids_len; i++ ) {
- vaFid = vaFids->AFSCBFids_val;
- if (vaFid)
- fprintf(out, "FID %u:%u:%u ", vaFid->Volume,
- vaFid->Vnode, vaFid->Unique);
- else
- fprintf(out, "FID 0:0:0 ");
- }
}
break;
default:
}
if ((clen = strlen(tcell))) {
#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
- static char local_realm[AFS_REALM_SZ] = "";
- if (!local_realm[0]) {
- if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
- strncpy(local_realm, "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
+ static char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
+ static int num_lrealms = -1;
+ int i, lrealm_match;
+
+ if (num_lrealms == -1) {
+ for (i=0; i<AFS_NUM_LREALMS; i++) {
+ if (afs_krb_get_lrealm(local_realms[i], i) != 0 /*KSUCCESS*/)
+ break;
+ }
+
+ if (i == 0)
+ strncpy(local_realms[0], "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
+ num_lrealms = i;
}
- if (strcasecmp(local_realm, tcell)) {
+
+ /* Check to see if the ticket cell matches one of the local realms */
+ lrealm_match = 0;
+ for ( i=0;i<num_lrealms;i++ ) {
+ if (!strcasecmp(local_realms[i], tcell)) {
+ lrealm_match = 1;
+ break;
+ }
+ }
+ /* If yes, then make sure that the name is not present in
+ * an exclusion list */
+ if (lrealm_match) {
+ char uname[256];
+ if (inst[0])
+ snprintf(uname,sizeof(uname),"%s.%s@%s",name,inst,tcell);
+ else
+ snprintf(uname,sizeof(uname),"%s@%s",name,tcell);
+
+ if (afs_krb_exclusion(uname))
+ lrealm_match = 0;
+ }
+
+ if (!lrealm_match) {
if (strlen(vname) + 1 + clen >= sizeof(vname))
goto done;
strcat(vname, "@");
}
int
-osi_audit_file(FILE *out)
+osi_audit_file(char *fileName)
{
- auditout = out;
+ int tempfd, flags;
+ char oldName[MAXPATHLEN];
+
+#ifndef AFS_NT40_ENV
+ struct stat statbuf;
+
+ if ((lstat(fileName, &statbuf) == 0)
+ && (S_ISFIFO(statbuf.st_mode))) {
+ flags = O_WRONLY | O_NONBLOCK;
+ } else
+#endif
+ {
+ strcpy(oldName, fileName);
+ strcat(oldName, ".old");
+ renamefile(fileName, oldName);
+ flags = O_WRONLY | O_TRUNC | O_CREAT;
+ }
+ tempfd = open(fileName, flags, 0666);
+ if (tempfd > -1) {
+ auditout = fdopen(tempfd, "a");
+ if (!auditout) {
+ printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ return 1;
+ }
+ } else {
+ printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ return 1;
+ }
return 0;
}
/* prototypes for audit functions */
int osi_audit(char *audEvent, afs_int32 errCode, ...);
int osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...);
-int osi_audit_file(FILE *out);
+int osi_audit_file(char *filename);
void osi_audit_init(void);
#endif
RCSID
- ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.10 2007/12/13 18:54:09 shadow Exp $");
+ ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.11 2009/03/20 22:45:37 shadow Exp $");
#if defined(UKERNEL)
#include "afs/sysincludes.h"
#include <sys/lockf.h>
#ifdef AFS_AIX51_ENV
#include <sys/cred.h>
+#ifdef HAVE_SYS_PAG_H
#include <sys/pag.h>
#endif
#endif
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/auth/userok.c,v 1.12.2.3 2008/02/29 04:46:20 shadow Exp $");
+ ("$Header: /cvs/openafs/src/auth/userok.c,v 1.12.2.4 2009/03/19 03:44:59 shadow Exp $");
#include <afs/stds.h>
#include <afs/pthread_glock.h>
afs_uint32 exp;
static char lcell[MAXCELLCHARS] = "";
- static char lrealm[AFS_REALM_SZ] = "";
+ static char lrealms[AFS_NUM_LREALMS][AFS_REALM_SZ];
+ static int num_lrealms = -1;
+ int lrealm_match = 0, i;
/* get auth details from server connection */
code =
/* if running a krb environment, also get the local realm */
/* note - this assumes AFS_REALM_SZ <= MAXCELLCHARS */
/* just set it to lcell if it fails */
- if (!lrealm[0]) {
- if (afs_krb_get_lrealm(lrealm, 0) != 0) /* KSUCCESS */
- strncpy(lrealm, lcell, AFS_REALM_SZ);
+ if (num_lrealms == -1) {
+ for (i=0; i<AFS_NUM_LREALMS; i++) {
+ if (afs_krb_get_lrealm(lrealms[i], i) != 0 /*KSUCCESS*/)
+ break;
+ }
+
+ if (i == 0) {
+ strncpy(lrealms[0], lcell, AFS_REALM_SZ);
+ num_lrealms = 1;
+ } else {
+ num_lrealms = i;
+ }
}
+ /* See if the ticket cell matches one of the local realms */
+ lrealm_match = 0;
+ for ( i=0;i<num_lrealms;i++ ) {
+ if (!strcasecmp(lrealms[i], tcell)) {
+ lrealm_match = 1;
+ break;
+ }
+ }
+
+ /* If yes, then make sure that the name is not present in
+ * an exclusion list */
+ if (lrealm_match) {
+ if (tinst[0])
+ snprintf(uname,sizeof(uname),"%s.%s@%s",tname,tinst,tcell);
+ else
+ snprintf(uname,sizeof(uname),"%s@%s",tname,tcell);
+
+ if (afs_krb_exclusion(uname))
+ lrealm_match = 0;
+ }
/* start with no uname and no authorization */
strcpy(uname, "");
strcpy(uname, "<LocalAuth>");
flag = 1;
- /* cell of connection matches local cell or krb4 realm */
- } else if (!strcasecmp(tcell, lcell) || !strcasecmp(tcell, lrealm)) {
+ /* cell of connection matches local cell or one of the realms */
+ } else if (!strcasecmp(tcell, lcell) || lrealm_match) {
if ((tmp = CompFindUser(adir, tname, ".", tinst, NULL))) {
strcpy(uname, tmp);
flag = 1;
flag = 1;
#endif
}
-
/* cell of conn doesn't match local cell or realm */
} else {
if ((tmp = CompFindUser(adir, tname, ".", tinst, tcell))) {
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.17.2.9 2008/06/30 20:31:41 rra Exp $");
+ ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.17.2.10 2009/02/17 04:32:30 shadow Exp $");
#include <stddef.h>
#include <stdlib.h>
TM_GetTimeOfDay(&Start, 0);
TimeFields = localtime(&Start.tv_sec);
sprintf(FileName, "%s.%d%02d%02d%02d%02d%02d", tbuffer,
- TimeFields->tm_year, TimeFields->tm_mon + 1, TimeFields->tm_mday,
+ TimeFields->tm_year + 1900, TimeFields->tm_mon + 1, TimeFields->tm_mday,
TimeFields->tm_hour, TimeFields->tm_min, TimeFields->tm_sec);
strcpy(tbuffer, FileName);
#endif
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.17 2008/10/18 15:10:57 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.18 2008/12/17 18:16:27 shadow Exp $");
#include <afs/stds.h>
#include <sys/types.h>
}
}
else if (strcmp(argv[code], "-auditlog") == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++code];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
}
else {
#include <afs/stds.h>
RCSID
- ("$Header: /cvs/openafs/src/bucoord/ubik_db_if.c,v 1.10.2.2 2007/04/10 18:43:41 shadow Exp $");
+ ("$Header: /cvs/openafs/src/bucoord/ubik_db_if.c,v 1.10.2.4 2009/01/22 19:33:26 shadow Exp $");
#include <sys/types.h>
#include <fcntl.h>
afs_int32 bcdb_CreateDump(register struct budb_dumpEntry *) ;
afs_int32 bcdb_deleteDump(afs_int32, afs_int32, afs_int32, budb_dumpsList *);
/*note the pinter to the function comes from ubik/ubikclient ubik_Call function.*/
-afs_int32 bcdb_listDumps (int (), afs_int32,afs_int32,afs_int32, budb_dumpsList *,
+afs_int32 bcdb_listDumps (afs_int32, afs_int32,afs_int32,afs_int32, budb_dumpsList *,
budb_dumpsList *);
afs_int32 bcdb_DeleteVDP(char *, char *, afs_int32 );
afs_int32 bcdb_FindClone(afs_int32, char *, afs_int32 *);
return (code);
}
-afs_int32 bcdb_listDumps (int (*sflags) (), afs_int32 groupId,afs_int32 fromTime, afs_int32 toTime,budb_dumpsList *dumps, budb_dumpsList *flags)
+afs_int32 bcdb_listDumps (afs_int32 sflags, afs_int32 groupId,afs_int32 fromTime, afs_int32 toTime,budb_dumpsList *dumps, budb_dumpsList *flags)
{
afs_int32 code, sflag = 0;
budb_dumpsList dumpsList, *dumpsPtr;
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.9 2008/03/10 22:35:34 shadow Exp $");
+ ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.11 2008/12/22 19:23:31 shadow Exp $");
#include <fcntl.h>
#include <sys/stat.h>
ubik_nBuffers = 0;
if (as->parms[7].items != 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = as->parms[7].items->data;
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
}
return 0;
code = ubik_ServerInitByInfo (globalConfPtr->myHost,
htons(AFSCONF_BUDBPORT),
&cellinfo,
- &clones,
+ clones,
dbNamePtr, /* name prefix */
&BU_dbase);
#endif
#if defined(AFS_AIX_ENV)
dynlib = dlopen("/usr/lib/libApiDS.a(dsmapish.o)", RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
+#elif defined (AFS_AMD64_LINUX26_ENV)
+ dynlib = dlopen("/usr/lib64/libApiTSM64.so", RTLD_NOW | RTLD_LOCAL);
#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
dynlib = dlopen("/usr/lib/libApiDS.so", RTLD_NOW | RTLD_LOCAL);
#else
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/butc/dump.c,v 1.17.2.4 2008/05/02 00:59:48 shadow Exp $");
+ ("$Header: /cvs/openafs/src/butc/dump.c,v 1.17.2.5 2009/03/15 18:19:37 shadow Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
}
}
+#ifdef xbsa
+ /* Set aside space for the trailing volume header when using large buffers. */
+ if (XBSAMAXBUFFER < toread + sizeof(hostVolumeHeader)) {
+ toread = XBSAMAXBUFFER - sizeof(hostVolumeHeader);
+ }
+#endif
+
/* Read some volume data. */
if (fragmentvolume) {
bytesread = 0;
dnl
-dnl $Id: kerberos.m4,v 1.1.2.16 2008/04/18 20:50:28 shadow Exp $
+dnl $Id: kerberos.m4,v 1.1.2.18 2009/03/21 16:30:15 shadow Exp $
dnl
dnl Kerberos autoconf glue
dnl
AC_ARG_WITH([krb5], [--with-krb5 Support for Kerberos 5 (manual configuration)])
-if test X$with_krb5 = Xyes; then
+if test X$with_krb5 != X; then
if test X$conf_krb5 = XYES; then
AC_MSG_ERROR([--with-krb5-config and --with-krb5 are mutually exclusive, choose only one])
fi
fi
BUILD_KRB5=no
+MAKE_KRB5=#
if test X$conf_krb5 = XYES; then
AC_MSG_RESULT([Configuring support for Kerberos 5 utilities])
BUILD_KRB5=yes
+ MAKE_KRB5=
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
save_LIBS="$LIBS"
fi
AC_SUBST(BUILD_KRB5)
+AC_SUBST(MAKE_KRB5)
AC_SUBST(KRB5CFLAGS)
AC_SUBST(KRB5LIBS)
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
- ! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
+ ! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then [$3]
else
sed '/^ *+/d' conftest.err >&AS_MESSAGE_LOG_FD
AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK], [
AC_MSG_CHECKING([if key_alloc() takes a struct task *])
AC_CACHE_VAL([ac_cv_key_alloc_needs_struct_task], [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
AC_TRY_KBUILD(
[#include <linux/rwsem.h>
#include <linux/key.h>
],
-[(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);],
+[struct task_struct *t=NULL;
+(void) key_alloc(NULL, NULL, 0, 0, t, 0, 0);],
ac_cv_key_alloc_needs_struct_task=yes,
- ac_cv_key_alloc_needs_struct_task=no)])
+ ac_cv_key_alloc_needs_struct_task=no)
+ CPPFLAGS="$save_CPPFLAGS"])
AC_MSG_RESULT($ac_cv_key_alloc_needs_struct_task)
if test "x$ac_cv_key_alloc_needs_struct_task" = "xyes"; then
AC_DEFINE([KEY_ALLOC_NEEDS_STRUCT_TASK], 1, [define if key_alloc takes a struct task *])
fi])
+AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_CRED], [
+ AC_MSG_CHECKING([if key_alloc() takes credentials])
+ AC_CACHE_VAL([ac_cv_key_alloc_needs_cred], [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror"
+ AC_TRY_KBUILD(
+[#include <linux/rwsem.h>
+#include <linux/key.h>
+],
+[struct cred *c = NULL;
+(void) key_alloc(NULL, NULL, 0, 0, c, 0, 0);],
+ ac_cv_key_alloc_needs_cred=yes,
+ ac_cv_key_alloc_needs_cred=no)
+ CPPFLAGS="$save_CPPFLAGS"])
+ AC_MSG_RESULT($ac_cv_key_alloc_needs_cred)
+ if test "x$ac_cv_key_alloc_needs_cred" = "xyes"; then
+ AC_DEFINE([KEY_ALLOC_NEEDS_CRED], 1, [define if key_alloc takes credentials])
+ fi])
+
AC_DEFUN([LINUX_DO_SYNC_READ], [
AC_MSG_CHECKING([for linux do_sync_read()])
AC_CACHE_VAL([ac_cv_linux_do_sync_read], [
AC_DEFINE([GENERIC_FILE_AIO_READ], 1, [define if your kernel has generic_file_aio_read()])
fi])
+AC_DEFUN([LINUX_HAVE_I_SIZE_READ], [
+ AC_MSG_CHECKING([for linux i_size_read()])
+ AC_CACHE_VAL([ac_cv_linux_i_size_read], [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
+ AC_TRY_KBUILD(
+[#include <linux/fs.h>],
+[i_size_read(NULL);],
+ ac_cv_linux_i_size_read=yes,
+ ac_cv_linux_i_size_read=no)
+ CPPFLAGS="$save_CPPFLAGS"])
+ AC_MSG_RESULT($ac_cv_linux_i_size_read)
+ if test "x$ac_cv_linux_i_size_read" = "xyes"; then
+ AC_DEFINE([HAVE_LINUX_I_SIZE_READ], 1, [define if your kernel has i_size_read()])
+ fi])
+
AC_DEFUN([LINUX_FREEZER_H_EXISTS], [
AC_MSG_CHECKING([for linux/freezer.h existance])
AC_CACHE_VAL([ac_cv_linux_freezer_h_exists], [
AC_DEFINE([LINUX_SEMAPHORE_H], 1, [define if linux/semaphore.h exists])
fi])
+AC_DEFUN([LINUX_HAVE_BDI_INIT], [
+ AC_MSG_CHECKING([for linux bdi_init()])
+ AC_CACHE_VAL([ac_cv_linux_bdi_init], [
+ AC_TRY_KBUILD(
+[#include <linux/backing-dev.h>],
+[bdi_init(NULL);],
+ ac_cv_linux_bdi_init=yes,
+ ac_cv_linux_bdi_init=no)])
+ AC_MSG_RESULT($ac_cv_linux_bdi_init)
+ if test "x$ac_cv_linux_bdi_init" = "xyes"; then
+ AC_DEFINE([HAVE_BDI_INIT], 1, [define if your kernel has a bdi_init()])
+ fi])
+
AC_DEFUN([LINUX_HAVE_WRITE_BEGIN_AOP], [
AC_MSG_CHECKING([for linux write_begin() address space op])
AC_CACHE_VAL([ac_cv_linux_write_begin], [
if test "x$ac_cv_linux_write_begin" = "xyes"; then
AC_DEFINE([HAVE_WRITE_BEGIN], 1, [define if your kernel has a write_begin() address space op])
fi])
+
+AC_DEFUN([LINUX_HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN], [
+ AC_MSG_CHECKING([for linux grab_cache_page_write_begin()])
+ AC_CACHE_VAL([ac_cv_linux_grab_cache_page_write_begin], [
+ AC_TRY_KBUILD(
+[#include <linux/pagemap.h>],
+[grab_cache_page_write_begin(NULL, 0, 0);],
+ ac_cv_linux_grab_cache_page_write_begin=yes,
+ ac_cv_linux_grab_cache_page_write_begin=no)])
+ AC_MSG_RESULT($ac_cv_linux_grab_cache_page_write_begin)
+ if test "x$ac_cv_linux_grab_cache_page_write_begin" = "xyes"; then
+ AC_DEFINE([HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN], 1, [define if your kernel has grab_cache_page_write_begin()])
+ fi])
+
+AC_DEFUN([LINUX_STRUCT_TASK_HAS_CRED], [
+ AC_MSG_CHECKING([if struct task has cred])
+ AC_CACHE_VAL([ac_cv_linux_struct_task_has_cred], [
+ AC_TRY_KBUILD(
+[#include <linux/sched.h>
+#include <linux/cred.h>],
+[struct task_struct _t;
+uid_t _u;
+_u =_t.cred->uid ;],
+ ac_cv_linux_struct_task_has_cred=yes,
+ ac_cv_linux_struct_task_has_cred=no)])
+ AC_MSG_RESULT($ac_cv_linux_struct_task_has_cred)
+ if test "x$ac_cv_linux_struct_task_has_cred" = "xyes"; then
+ AC_DEFINE([STRUCT_TASK_HAS_CRED], 1, [define if struct task has a cred pointer])
+ fi])
SHLIB_LINKER="ld -b"
;;
- *fbsd_*)
+ i386_fbsd_*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
MT_LIBS="-pthread"
YACC="byacc"
;;
+ amd64_fbsd_*)
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-pthread"
+ PAM_CFLAGS="-O2 -pipe -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ SHLIB_LINKER="${MT_CC} -shared"
+ TXLIBS="-lncurses"
+ XCFLAGS="-O2 -pipe -fPIC"
+ YACC="byacc"
+ ;;
+
*nbsd2*|*nbsd3*|*nbsd4*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
;;
ppc_darwin_70)
- AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
+ AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
LEX="lex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
KROOT=
--- /dev/null
+AC_DEFUN([AC_TYPE_SOCKLEN_T],
+[
+AC_CACHE_CHECK([for socklen_t],
+ac_cv_type_socklen_t, [
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ socklen_t len = 42; return 0;
+ ],
+ ac_cv_type_socklen_t="yes", ac_cv_type_socklen_t="no")
+ ])
+
+ if test "x$ac_cv_type_socklen_t" = "xno"; then
+ AC_DEFINE(socklen_t, int, [the type of the last argument to getsockopt etc])
+ fi
+])
afs_int32 memCacheFlag;
afs_int32 inodes;
afs_int32 users;
+ afs_int32 dynamic_vcaches;
};
/*
#define SYS_NAME_ID_i386_fbsd_61 2113
#define SYS_NAME_ID_i386_fbsd_62 2114
#define SYS_NAME_ID_i386_fbsd_70 2115
-#define SYS_NAME_ID_i386_fbsd_80 2116
+#define SYS_NAME_ID_i386_fbsd_71 2116
+#define SYS_NAME_ID_i386_fbsd_80 2117
#define SYS_NAME_ID_ia64_linux2 2200
#define SYS_NAME_ID_ia64_linux22 2201
#define SYS_NAME_ID_ppc64_linux26 2903
#define SYS_NAME_ID_amd64_fbsd_53 3008
+#define SYS_NAME_ID_amd64_fbsd_70 3009
+#define SYS_NAME_ID_amd64_fbsd_71 3010
+#define SYS_NAME_ID_amd64_fbsd_80 3011
#define SYS_NAME_ID_amd64_w2k 3400
#ifdef AFS_KERBREALM_ENV
#define AFS_REALM_SZ 64
#endif
+/* Specifies the number of equivalent local realm names */
+#define AFS_NUM_LREALMS 4
#endif /* __AFS_SYSNAMES_INCL_ENV_ */
/* define if arpa/nameser_compat.h exists */
#undef HAVE_ARPA_NAMESER_COMPAT_H
+/* define if your kernel has a bdi_init() */
+#undef HAVE_BDI_INIT
+
/* define if you have connect */
#undef HAVE_CONNECT
/* Define to 1 if you have the `getprogname' function. */
#undef HAVE_GETPROGNAME
+/* define if your kernel has grab_cache_page_write_begin() */
+#undef HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN
+
/* define if your kernel has iget */
#undef HAVE_IGET
/* define if krb5_prompt has type */
#undef HAVE_KRB5_PROMPT_TYPE
+/* define if your kernel has i_size_read() */
+#undef HAVE_LINUX_I_SIZE_READ
+
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
*/
#undef HAVE_SYS_NDIR_H
+/* Define to 1 if you have the <sys/pag.h> header file. */
+#undef HAVE_SYS_PAG_H
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* define if irix has memcpy and friends */
#undef IRIX_HAS_MEM_FUNCS
+/* define if key_alloc takes credentials */
+#undef KEY_ALLOC_NEEDS_CRED
+
/* define if key_alloc takes a struct task * */
#undef KEY_ALLOC_NEEDS_STRUCT_TASK
# undef WORDS_BIGENDIAN
# endif
#endif
+#ifdef UKERNEL
+/*
+ * Always use 64-bit file offsets for UKERNEL code. Needed for UKERNEL stuff to
+ * play nice with some other interfaces like FUSE. We technically only would
+ * need to define this when building for such interfaces, but set it always to
+ * try and reduce potential confusion.
+ */
+#define _FILE_OFFSET_BITS 64
+#endif
+
+#undef AFS_AFSDB_ENV
+#undef AFS_LARGEFILE_ENV
+#undef AFS_NAMEI_ENV
+#undef BITMAP_LATER
+#undef BOS_RESTRICTED_MODE
+#undef BOS_NEW_CONFIG
+#undef FAST_RESTART
+#undef FULL_LISTVOL_SWITCH
+#undef COMPLETION_H_EXISTS
+#undef DEFINED_FOR_EACH_PROCESS
+#undef DEFINED_PREV_TASK
+#undef EXPORTED_KALLSYMS_ADDRESS
+#undef EXPORTED_KALLSYMS_SYMBOL
+#undef EXPORTED_SYS_CALL_TABLE
+#undef EXPORTED_IA32_SYS_CALL_TABLE
+#undef EXPORTED_TASKLIST_LOCK
+#undef INODE_SETATTR_NOT_VOID
+#undef IRIX_HAS_MEM_FUNCS
+#undef RECALC_SIGPENDING_TAKES_VOID
+#undef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+#undef STRUCT_FS_HAS_FS_ROLLED
+#undef STRUCT_INODE_HAS_I_DEVICES
+#undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
+#undef STRUCT_INODE_HAS_I_ALLOC_SEM
+#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
+#undef STRUCT_TASK_STRUCT_HAS_PARENT
+#undef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
+#undef STRUCT_TASK_STRUCT_HAS_SIG
+#undef STRUCT_TASK_STRUCT_HAS_SIGHAND
+#undef STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
+#undef ssize_t
+#undef SIZEOF_TIME_T
+#undef HAVE_STRUCT_BUF
+#undef HAVE_ARPA_NAMESER_COMPAT_H
+/* glue for RedHat kernel bug */
+#undef ENABLE_REDHAT_BUILDSYS
+#if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
+#include "redhat-fix.h"
+#endif
/* define if your recalc_sigpending takes void */
#undef RECALC_SIGPENDING_TAKES_VOID
/* define if your struct super_operations has alloc_inode */
#undef STRUCT_SUPER_HAS_ALLOC_INODE
+/* define if struct task has a cred pointer */
+#undef STRUCT_TASK_HAS_CRED
+
/* define if your struct task_struct has exit_state */
#undef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
-
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 338
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
--- /dev/null
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "amd64_fbsd_70"
+#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_70
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD40_ENV 1
+#define AFS_FBSD42_ENV 1
+#define AFS_FBSD43_ENV 1
+#define AFS_FBSD44_ENV 1
+#define AFS_FBSD45_ENV 1
+#define AFS_FBSD46_ENV 1
+#define AFS_FBSD47_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD40_ENV 1
+#define AFS_X86_FBSD42_ENV 1
+#define AFS_X86_FBSD43_ENV 1
+#define AFS_X86_FBSD46_ENV 1
+#define AFS_X86_FBSD47_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_ENV 1
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD40_ENV 1
+#define AFS_USR_FBSD42_ENV 1
+#define AFS_USR_FBSD43_ENV 1
+#define AFS_USR_FBSD44_ENV 1
+#define AFS_USR_FBSD45_ENV 1
+#define AFS_USR_FBSD46_ENV 1
+#define AFS_USR_FBSD47_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */
--- /dev/null
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "amd64_fbsd_71"
+#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_71
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD40_ENV 1
+#define AFS_FBSD42_ENV 1
+#define AFS_FBSD43_ENV 1
+#define AFS_FBSD44_ENV 1
+#define AFS_FBSD45_ENV 1
+#define AFS_FBSD46_ENV 1
+#define AFS_FBSD47_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD40_ENV 1
+#define AFS_X86_FBSD42_ENV 1
+#define AFS_X86_FBSD43_ENV 1
+#define AFS_X86_FBSD46_ENV 1
+#define AFS_X86_FBSD47_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_ENV 1
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD40_ENV 1
+#define AFS_USR_FBSD42_ENV 1
+#define AFS_USR_FBSD43_ENV 1
+#define AFS_USR_FBSD44_ENV 1
+#define AFS_USR_FBSD45_ENV 1
+#define AFS_USR_FBSD46_ENV 1
+#define AFS_USR_FBSD47_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */
--- /dev/null
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "amd64_fbsd_80"
+#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_80
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD40_ENV 1
+#define AFS_FBSD42_ENV 1
+#define AFS_FBSD43_ENV 1
+#define AFS_FBSD44_ENV 1
+#define AFS_FBSD45_ENV 1
+#define AFS_FBSD46_ENV 1
+#define AFS_FBSD47_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_FBSD80_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD40_ENV 1
+#define AFS_X86_FBSD42_ENV 1
+#define AFS_X86_FBSD43_ENV 1
+#define AFS_X86_FBSD46_ENV 1
+#define AFS_X86_FBSD47_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_FBSD80_ENV 1
+#define AFS_X86_ENV 1
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD40_ENV 1
+#define AFS_USR_FBSD42_ENV 1
+#define AFS_USR_FBSD43_ENV 1
+#define AFS_USR_FBSD44_ENV 1
+#define AFS_USR_FBSD45_ENV 1
+#define AFS_USR_FBSD46_ENV 1
+#define AFS_USR_FBSD47_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD80_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 183
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 183
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
#define AFS_ENV 1
#define AFS_USR_HPUX_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#include <afs/afs_sysnames.h>
#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
#define AFS_ENV 1
#define AFS_USR_HPUX_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#include <afs/afs_sysnames.h>
--- /dev/null
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "i386_fbsd_71"
+#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_71
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD40_ENV 1
+#define AFS_FBSD42_ENV 1
+#define AFS_FBSD43_ENV 1
+#define AFS_FBSD44_ENV 1
+#define AFS_FBSD45_ENV 1
+#define AFS_FBSD46_ENV 1
+#define AFS_FBSD47_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD40_ENV 1
+#define AFS_X86_FBSD42_ENV 1
+#define AFS_X86_FBSD43_ENV 1
+#define AFS_X86_FBSD46_ENV 1
+#define AFS_X86_FBSD47_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_ENV 1
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD40_ENV 1
+#define AFS_USR_FBSD42_ENV 1
+#define AFS_USR_FBSD43_ENV 1
+#define AFS_USR_FBSD44_ENV 1
+#define AFS_USR_FBSD45_ENV 1
+#define AFS_USR_FBSD46_ENV 1
+#define AFS_USR_FBSD47_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */
#define AFS_FBSD61_ENV 1
#define AFS_FBSD62_ENV 1
#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
#define AFS_FBSD80_ENV 1
#define AFS_X86_FBSD_ENV 1
#define AFS_X86_FBSD40_ENV 1
#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
#define AFS_X86_FBSD62_ENV 1
#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
#define AFS_X86_FBSD80_ENV 1
#define AFS_X86_ENV 1
#define AFS_NONFSTRANS 1
#define AFS_USR_FBSD60_ENV 1
#define AFS_USR_FBSD61_ENV 1
#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
#define AFS_USR_FBSD80_ENV 1
#define AFS_USR_FBSD_ENV 1
#define AFS_NONFSTRANS 1
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
+#define AFS_MAXVCOUNT_ENV 1
#ifdef AFS_LARGEFILE_ENV
#define _FILE_OFFSET_BITS 64
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 1141
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#include <linux/init.h>
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 1141
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_PPC_ENV 1
#define AFS_VFSINCL_ENV 1
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 137
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_KERNEL 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_32BIT_USR_ENV 1 /* user level processes are 32bit */
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_CLIENT 1
#define AFS_32BIT_USR_ENV 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 227
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_64BIT_CLIENT 1
#define AFS_32BIT_USR_ENV 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 227
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_SYSCALL 227
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP
#define AFS_64BIT_CLIENT 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_MAXVCOUNT_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 227
#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <afs/afs_sysnames.h>
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
#endif /* AFS_NAMEI_ENV */
+#define AFS_CACHE_VNODE_PATH 1
+
#include <afs/afs_sysnames.h>
#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
#endif /* AFS_NAMEI_ENV */
+#define AFS_CACHE_VNODE_PATH 1
+
#include <afs/afs_sysnames.h>
#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FLOCK_SYSID 1
+#define AFS_CACHE_VNODE_PATH 1
+
#include <afs/afs_sysnames.h>
#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FLOCK_SYSID 1
+#define AFS_CACHE_VNODE_PATH 1
+
#include <afs/afs_sysnames.h>
#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_HAVE_STATVFS64 1 /* System supports statvfs64 */
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
--- /dev/null
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_IOPS_ENV 1
+#if defined(__ppc__)
+#define AFS_PPC_ENV 1
+#elif defined(__i386__)
+#define AFS_X86_ENV 1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_VFSINCL_ENV 1
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_DARWIN_ENV
+#define AFS_DARWIN13_ENV
+#define AFS_DARWIN14_ENV
+#define AFS_DARWIN60_ENV
+#define AFS_DARWIN70_ENV
+#define AFS_DARWIN80_ENV
+#define AFS_DARWIN90_ENV
+#define AFS_DARWIN100_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL 230
+#define AFS_NAMEI_ENV 1
+#define DARWIN_REFBASE 3
+#define AFS_CACHE_VNODE_PATH
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#define sys_ppc_darwin_12 1
+#define sys_ppc_darwin_13 1
+#define sys_ppc_darwin_14 1
+#define sys_ppc_darwin_60 1
+#define sys_ppc_darwin_70 1
+#define sys_ppc_darwin_80 1
+#define sys_ppc_darwin_90 1
+#define sys_ppc_darwin_100 1
+#define SYS_NAME "ppc_darwin_100"
+#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN 1
+#elif defined(__i386__)
+#define sys_x86_darwin_12 1
+#define sys_x86_darwin_13 1
+#define sys_x86_darwin_14 1
+#define sys_x86_darwin_60 1
+#define sys_x86_darwin_70 1
+#define sys_x86_darwin_80 1
+#define sys_x86_darwin_90 1
+#define sys_x86_darwin_100 1
+#define SYS_NAME "x86_darwin_100"
+#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_100
+#define AFSLITTLE_ENDIAN 1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+
+#define AFS_GCPAGS 0
+#define RXK_LISTENER_ENV 1
+
+#ifdef KERNEL
+#undef MACRO_BEGIN
+#undef MACRO_END
+#include <kern/macro_help.h>
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) _MALLOC(x, M_TEMP, M_WAITOK)
+#define AFS_KFREE(x,y) _FREE(x,M_TEMP)
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+
+#define BIND_8_COMPAT
+
+#endif
+#endif /* AFS_PARAM_H */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */
+#define AFS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#if defined(__ppc__)
+#define AFS_PPC_ENV 1
+#elif defined(__i386__)
+#define AFS_X86_ENV 1
+#else
+#error Unsupported architecture
+#endif
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_ENV
+#define AFS_USR_DARWIN_ENV
+#define AFS_USR_DARWIN13_ENV
+#define AFS_USR_DARWIN14_ENV
+#define AFS_USR_DARWIN60_ENV
+#define AFS_USR_DARWIN70_ENV
+#define AFS_USR_DARWIN80_ENV
+#define AFS_USR_DARWIN90_ENV
+#define AFS_USR_DARWIN100_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL 230
+#define DARWIN_REFBASE 0
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#define sys_ppc_darwin_12 1
+#define sys_ppc_darwin_13 1
+#define sys_ppc_darwin_14 1
+#define sys_ppc_darwin_60 1
+#define sys_ppc_darwin_70 1
+#define sys_ppc_darwin_80 1
+#define sys_ppc_darwin_90 1
+#define sys_ppc_darwin_100 1
+#define SYS_NAME "ppc_darwin_100"
+#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN 1
+#elif defined(__i386__)
+#define sys_x86_darwin_12 1
+#define sys_x86_darwin_13 1
+#define sys_x86_darwin_14 1
+#define sys_x86_darwin_60 1
+#define sys_x86_darwin_70 1
+#define sys_x86_darwin_80 1
+#define sys_x86_darwin_100 1
+#define SYS_NAME "x86_darwin_100"
+#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_100
+#define AFSLITTLE_ENDIAN 1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define RXK_LISTENER_ENV 1
+
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#define BIND_8_COMPAT
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
};
typedef struct afsUUID afsUUID;
+/* A macro that can be used when printf'ing 64 bit integers, as Unix and
+ * windows use a different format string
+ */
+#ifdef AFS_NT40_ENV
+#define AFS_INT64_FMT "l64d"
+#else
+#define AFS_INT64_FMT "lld"
+#endif
+
+/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in
+ * printf statemements with %ld and %lu
+ */
+#ifdef AFS_NT40_ENV
+#define static_inline __inline static
+#define hdr_static_inline(x) __inline static x
+#elif defined(AFS_HPUX_ENV) || defined(AFS_USR_HPUX_ENV)
+#define static_inline static __inline
+#define hdr_static_inline(x) static __inline x
+#elif defined(AFS_AIX_ENV) || defined(AFS_USR_AIX_ENV)
+#define static_inline static
+#define hdr_static_inline(x) static x
+#elif defined(AFS_SGI_ENV) || defined(AFS_USR_SGI_ENV)
+#define static_inline static
+#define hdr_static_inline(x) x
+#else
+#define static_inline static inline
+#define hdr_static_inline(x) static inline x
+#endif
+
+#ifdef AFS_64BIT_ENV
+hdr_static_inline(afs_int32) afs_cast_int32(afs_int32 d) { return (afs_int32) d; }
+hdr_static_inline(afs_uint32) afs_cast_uint32(afs_uint32 d) { return (afs_uint32) d; }
+#else
+hdr_static_inline(long) afs_cast_int32(afs_int32 d) { return (long) d; }
+hdr_static_inline(unsigned long) afs_cast_uint32(afs_uint32 d) { return (unsigned long) d; }
+#endif
+
#endif /* OPENAFS_CONFIG_AFS_STDS_H */
#define VIOC_RXSTAT_PEER _VICEIOCTL(54) /* Control peer RX stats */
#define VIOC_GETRXKCRYPT _VICEIOCTL(55) /* Set rxkad enc flag */
#define VIOC_SETRXKCRYPT _VICEIOCTL(56) /* Set rxkad enc flag */
-#define VIOC_PREFETCHTAPE _VICEIOCTL(66) /* MR-AFS prefetch from tape */
-#define VIOC_RESIDENCY_CMD _VICEIOCTL(67) /* generic MR-AFS cmds */
+#define VIOC_PREFETCHTAPE _VICEIOCTL(66) /* osd prefetch from tape */
+#define VIOC_FS_CMD _VICEIOCTL(67) /* fs extensions for osd etc. */
#define VIOC_STATISTICS _VICEIOCTL(68) /* arla: fetch statistics */
#define VIOC_GETVCXSTATUS2 _VICEIOCTL(69) /* vcache statistics */
afs_uint32 Residency4;
};
-struct ResidencyCmdInputs {
+struct FsCmdInputs {
afs_int32 command;
struct AFSFid fid;
afs_int64 int64s[MAXCMDINT64S];
char chars[MAXCMDCHARS];
};
-struct ResidencyCmdOutputs {
+struct FsCmdOutputs {
afs_int32 code;
struct AFSFetchStatus status;
afs_int64 int64s[MAXCMDINT64S];
AFSVolSync *Sync
) = 163;
-ResidencyCmd(
+FsCmd(
IN AFSFid *Fid,
- IN struct ResidencyCmdInputs *Inputs,
- OUT struct ResidencyCmdOutputs *Outputs
+ IN struct FsCmdInputs *Inputs,
+ OUT struct FsCmdOutputs *Outputs
) = 220;
InlineBulkStatus(
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/gtx/windows.c,v 1.6 2003/07/15 23:15:13 shadow Exp $");
+ ("$Header: /cvs/openafs/src/gtx/windows.c,v 1.6.2.1 2009/03/17 02:39:43 shadow Exp $");
/* On DUX "IN" is a variable in curses.h, so this can be a bit of a problem */
#ifdef IN
fprintf(stderr, "[%s:%s] Initializing for the X11 package\n", mn,
rn);
gwinbops = gator_X11_gwinbops;
- code = gator_X11gwin_init(params);
+ code = gator_X11gwin_init(gwin_debug);
if (code) {
fprintf(stderr,
"[%s:%s] Error in X11 initialization routine, gator_X11gwin_init(): %d\n",
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.8 2008/03/10 22:35:35 shadow Exp $");
+ ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.10 2008/12/22 19:23:32 shadow Exp $");
#include <afs/stds.h>
#include <sys/types.h>
lclpath = dbpath;
}
else if (strncmp(arg, "-auditlog", arglen) == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++a];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
} else if (strcmp(arg, "-localfiles") == 0)
lclpath = argv[++a];
else if (strcmp(arg, "-servers") == 0)
else
code =
ubik_ServerInitByInfo(myHost, htons(AFSCONF_KAUTHPORT), &cellinfo,
- &clones, dbpath, &KA_dbase);
+ clones, dbpath, &KA_dbase);
if (code) {
afs_com_err(whoami, code, "Ubik init failed");
AFS_OS_NONFSOBJS = \
osi_vfsops.o
-
# System specific build commands and flags
KSRC = @BSD_KERNEL_PATH@
KBLD = @BSD_KERNEL_BUILD@
+<amd64_fbsd_70 amd64_fbsd_71 amd64_fbsd_80>
+KOPTS = -fPIC
+<all>
+
KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \
- -elf -mpreferred-stack-boundary=2 \
+ -elf \
<i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47>
+ -mpreferred-stack-boundary=2 \
-fformat-extensions \
-<i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47> -include ${KBLD}/opt_global.h
+<i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47>
+ -include ${KBLD}/opt_global.h -mpreferred-stack-boundary=2
<all -i386_fbsd_42 -i386_fbsd_43 -i386_fbsd_44 -i386_fbsd_45 -i386_fbsd_46 -i386_fbsd_47>
-mno-align-long-strings -fformat-extensions -fno-common -ffreestanding \
-I${KBLD} -include opt_global.h -fno-strict-aliasing
DBUG = -O2
#DBUG = -O -g
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
-OPTF=${OPT}
-OPTF2=${OPT2}
CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
-
# Name of directory to hold object files and libraries.
KOBJ = MODLOAD
ln -fs ../Makefile.common $(KOBJ)/Makefile.common
-$(RM) -f h net netinet rpc ufs nfs machine sys vm
-ln -fs ${KSRC}/net net
- -ln -fs ${KSRC}/i386/include machine
+ -ln -fs ${KSRC}/${CPUARCH}/include machine
-ln -fs ${KSRC}/netinet netinet
-ln -fs ${KSRC}/nfs nfs
-<all -i386_fbsd_80>
+<all -fbsd_71 -fbsd_80>
-ln -fs /usr/include/rpc rpc
-<i386_fbsd_80>
+<fbsd_71 fbsd_80>
-ln -fs ${KSRC}/rpc rpc
<all>
-ln -fs ${KSRC}/sys sys
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>afs</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.openafs.filesystems.afs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>8.0</string>
+ <key>CFBundleName</key>
+ <string>afs</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@MACOS_VERSION@</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>@MACOS_VERSION@</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kpi.bsd</key>
+ <string>8.0.0</string>
+ <key>com.apple.kpi.mach</key>
+ <string>8.0.0</string>
+ <key>com.apple.kpi.libkern</key>
+ <string>8.0</string>
+ </dict>
+</dict>
+</plist>
TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD40_ENV
TEST_LDFLAGS=
-<all -i386_fbsd_62 -i386_fbsd_70 -i386_fbsd_80>
+<all -i386_fbsd_62 -i386_fbsd_70 -i386_fbsd_71 -i386_fbsd_80 -amd64_fbsd_62 -amd64_fbsd_70 -amd64_fbsd_71 -amd64_fbsd_80>
TEST_LIBS=-lc_r
-<i386_fbsd_62 i386_fbsd_70 i386_fbsd_80>
+<i386_fbsd_62 i386_fbsd_70 i386_fbsd_71 i386_fbsd_80 amd64_fbsd_62 amd64_fbsd_70 amd64_fbsd_71 amd64_fbsd_80>
TEST_LIBS=-lpthread
<all>
-/* $Id: process.amd64.s,v 1.1.2.1 2005/02/21 01:12:10 shadow Exp $ */
+/* $Id: process.amd64.s,v 1.1.2.2 2008/12/15 20:38:22 shadow Exp $ */
/*
* Copyright (c) 2003,2005 Kungliga Tekniska Högskolan
movq %rsi, area1(%rbp) /* i multiples of 24, so 32 it is) */
movq %rdx, newsp(%rbp) /* and copy them there. */
- movl $1,_C_LABEL(PRE_Block) /* Do not allow any interrupts */
+ movq PRE_Block@GOTPCREL(%rip), %rax
+ movl $1,(%rax) /* Do not allow any interrupts */
pushq %rsp /* Push all registers onto the stack */
pushq %rax /* Probably not _all_ are necessary */
popq %rcx
popq %rax
popq %rsp /* See savecontext */
-
- movl $0,_C_LABEL(PRE_Block) /* clear it up... */
+
+ movq PRE_Block@GOTPCREL(%rip), %rax
+ movl $0,(%rax)
addq $32, %rsp /* We did rsp-32 above, correct that */
popq %rbp
ret
my $resultbase="/tmp/result/";
my $stashbase="/disk/scratch/repository/";
my $mockcommand = "/usr/bin/mock";
+my $resultfile;
my $buildall = 0;
my $ignorerelease = 1;
my @newrpms;
basearch => "x86_64",
updaterepo => "updates-released",
results => "fedora-9/x86_64" },
+ "fedora-10-i386" => { osver => "fc10",
+ kmod => '1',
+ basearch => 'i386',
+ updaterepo => "updates-released",
+ results => 'fedora-10/i386' },
+ "fedora-10-x86_64" => { osver => "fc10",
+ kmod => "1",
+ basearch => "x86_64",
+ updaterepo => "updates-released",
+ results => "fedora-10/x86_64" },
+ "fedora-11-i386" => { osver => "fc11",
+ kmod => '1',
+ basearch => 'i386',
+# updaterepo => "updates-released",
+ results => 'fedora-11/i386' },
+ "fedora-11-x86_64" => { osver => "fc11",
+ kmod => "1",
+ basearch => "x86_64",
+# updaterepo => "updates-released",
+ results => "fedora-11/x86_64" },
"fedora-development-i386" => { osver => "fcd",
kmod => '1',
basearch => 'i386',
my $help;
my $ok = GetOptions("resultdir=s" => \$resultbase,
+ "resultlist=s" => \$resultfile,
"help" => \$help);
my @platforms = @ARGV;
next if ($variant eq "xen0"); # Fedora 5 has some bad xen0 kernel-devels
next if ($variant eq "smp");
}
- if ($platform=~/fedora-8/ || $platform=~/fedora-9/ || $platform=~/fedora-development/) {
+ if ($platform=~/fedora-8/ || $platform=~/fedora-9/ || $platform=~/fedora-10/ || $platform=~/fedora-development/) {
next if ($variant =~/debug$/); # Fedora 8 debug kernels are bad
}
print "$arch : $variant : $version\n";
$osver.".".$oafsrelease.".".$basearch.".rpm ".
$resultdir) == 0
or die "Copy failed with : $!\n";
- push @newrpms, $mockresults."/".$rpm."-".$oafsversion."-".
+ push @newrpms, $resultdir."/".$rpm."-".$oafsversion."-".
$osver.".".$oafsrelease.".".$basearch.".rpm";
}
} else {
}
system("cp ".$mockresults."/kmod-openafs-".$variant.$oafsversion."-".$oafsrelease.".".$kversion.".".$arch.".rpm $resultdir") == 0
or die "Copy failed with : $!\n";
- push @newrpms, $mockresults."/kmod-openafs-".$variant.$oafsversion."-".$oafsrelease.".".$kversion.".".$arch.".rpm";
+ push @newrpms, $resultdir."/kmod-openafs-".$variant.$oafsversion."-".$oafsrelease.".".$kversion.".".$arch.".rpm";
}
} else {
print "All kernel modules already built for $version on $arch\n";
print "=====================================================================\n";
print "All builds complete\nBuilt:\n";
print join("\n",@newrpms);
+if (defined($resultfile)) {
+ my $resultfh=new IO::File $resultfile, 'w';
+ print $resultfh join("\n",@newrpms);
+}
{
verrel=${1:-$(uname -r)}
verrel=${verrel%%$knownvariants}
+ case "$verrel" in
+ *.fc9*) verrel="`echo ${verrel} | sed -e 's/^\(.*.fc9[^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
+ *.fc1?*) verrel="`echo ${verrel} | sed -e 's/^\(.*.fc1[0-9][^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
+ esac
}
print_verrel ()
esac
case "$verrel" in
*.fc9*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
+ *.fc1?*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
*) kname="${verrel}${variant}" ;;
esac
-# Openafs Spec $Revision: 1.1.2.27 $
+# Openafs Spec $Revision: 1.1.2.29 $
+
+# TEMPORARY fix for patch fuzz so we can build on Fedora 10
+%define _default_patch_fuzz 2
%define afsvers @VERSION@
%define pkgvers @LINUX_PKGVER@
Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
-Source20: http://dl.central.org/dl/cellservdb/CellServDB.2008-04-23
+Source20: http://dl.central.org/dl/cellservdb/CellServDB.2008-11-07
Source30: openafs-kernel-version.sh
Source996: openafs-kvers-is.sh
tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
-tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
+tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
# Link kpasswd to kapasswd
ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
# Items below here should not have to change with each driver version
PACKAGE_NAME="%{name}"
-MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; ./configure --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/openafs.ko ."
+MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD"
CLEAN="make -C src/libafs clean"
BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
%dir %{_prefix}/vice
%dir %{_prefix}/vice/cache
%dir %{_prefix}/vice/etc
+%dir %{_prefix}/vice/etc/C
%{_prefix}/vice/etc/CellServDB.dist
%config %{_prefix}/vice/etc/ThisCell
%config %{_prefix}/vice/etc/cacheinfo
%{_bindir}/cmdebug
%{_bindir}/up
%{_prefix}/vice/etc/afsd
+%{_prefix}/vice/etc/C/afszcm.cat
%{pamdir}/pam_afs.krb.so.1
%{pamdir}/pam_afs.krb.so
%{pamdir}/pam_afs.so.1
%{_mandir}/man5/cacheinfo.*
%{_mandir}/man8/afsd.*
%{_mandir}/man5/CellAlias.*
+%{_mandir}/man5/afszcm.cat.*
%files server
%defattr(-,root,root)
#include <stdlib.h>
#ifdef AFS_AIX51_ENV
#include <sys/cred.h>
+#ifdef HAVE_SYS_PAG_H
#include <sys/pag.h>
#endif
+#endif
RCSID
- ("$Header: /cvs/openafs/src/pam/afs_util.c,v 1.12.2.6 2007/12/13 18:54:08 shadow Exp $");
+ ("$Header: /cvs/openafs/src/pam/afs_util.c,v 1.12.2.7 2009/03/20 22:45:38 shadow Exp $");
#include "afs_util.h"
-/* $Id: pt_util.c,v 1.9.2.9 2008/10/27 23:54:10 shadow Exp $ */
+/* $Id: pt_util.c,v 1.9.2.10 2008/11/30 20:25:02 shadow Exp $ */
/*
*
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/com_err.h>
RCSID
- ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9.2.9 2008/10/27 23:54:10 shadow Exp $");
+ ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9.2.10 2008/11/30 20:25:02 shadow Exp $");
#include <afs/cmd.h> /*Command line parsing */
#include <afs/afsutil.h>
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.21.2.9 2007/10/30 15:24:02 shadow Exp $");
+ ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.21.2.10 2009/03/19 03:45:02 shadow Exp $");
#include <afs/stds.h>
#include <ctype.h>
extern afs_int32 Initdb();
extern int pr_noAuth;
extern afs_int32 initd;
+extern char *pr_realmName;
afs_int32 iNewEntry(), newEntry(), whereIsIt(), dumpEntry(), addToGroup(),
nameToID(), Delete(), removeFromGroup();
afs_int32 getCPS(), getCPS2(), getHostCPS(), listMax(), setMax(), listEntry();
if (exp < FT_ApproxTime())
goto done;
#endif
- if (strlen(tcell)) {
- extern char *pr_realmName;
-#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
- static char local_realm[AFS_REALM_SZ] = "";
- if (!local_realm[0]) {
- if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
- strncpy(local_realm, pr_realmName, AFS_REALM_SZ);
- }
-#endif
- if (
-#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
- strcasecmp(local_realm, tcell) &&
-#endif
- strcasecmp(pr_realmName, tcell))
- foreign = 1;
- }
+ if (tcell[0])
+ foreign = afs_is_foreign_ticket_name(name,inst,tcell,pr_realmName);
+
strncpy(vname, name, sizeof(vname));
if (ilen = strlen(inst)) {
if (strlen(vname) + 1 + ilen >= sizeof(vname))
ABORT_WITH(tt, code);
for (i = 0; i < aname->namelist_len; i++) {
- code = NameToID(tt, aname->namelist_val[i], &aid->idlist_val[i]);
+ char vname[256];
+ char *nameinst, *cell;
+
+ strncpy(vname, aname->namelist_val[i], sizeof(vname));
+ vname[sizeof(vname)-1] ='\0';
+
+ nameinst = vname;
+ cell = strchr(vname, '@');
+ if (cell) {
+ *cell = '\0';
+ cell++;
+ }
+
+ if (cell && afs_is_foreign_ticket_name(nameinst,NULL,cell,pr_realmName))
+ code = NameToID(tt, aname->namelist_val[i], &aid->idlist_val[i]);
+ else
+ code = NameToID(tt, nameinst, &aid->idlist_val[i]);
+
if (code != PRSUCCESS)
aid->idlist_val[i] = ANONYMOUSID;
osi_audit(PTS_NmToIdEvent, code, AUD_STR,
}
#endif /* IP_WILDCARDS */
-
afs_int32
WhoIsThisWithName(acall, at, aid, aname)
struct rx_call *acall;
} else if (code == 2) { /* kad class */
int clen;
- extern char *pr_realmName;
if ((code = rxkad_GetServerInfo(acall->conn, NULL, 0 /*was &exp */ ,
name, inst, tcell, NULL)))
goto done;
+
+
strncpy(vname, name, sizeof(vname));
if ((ilen = strlen(inst))) {
if (strlen(vname) + 1 + ilen >= sizeof(vname))
strcat(vname, inst);
}
if ((clen = strlen(tcell))) {
+ int foreign = afs_is_foreign_ticket_name(name,inst,tcell,pr_realmName);
-#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
- static char local_realm[AFS_REALM_SZ] = "";
- if (!local_realm[0]) {
- if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
- strncpy(local_realm, pr_realmName, AFS_REALM_SZ);
- }
-#endif
- if (
-#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
- strcasecmp(local_realm, tcell) &&
-#endif
- strcasecmp(pr_realmName, tcell)) {
+ if (foreign) {
if (strlen(vname) + 1 + clen >= sizeof(vname))
goto done;
strcat(vname, "@");
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.12 2008/08/25 01:15:20 shadow Exp $");
+ ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.14 2008/12/22 19:23:32 shadow Exp $");
#include <afs/stds.h>
#ifdef AFS_AIX32_ENV
}
#endif
else if (strncmp(arg, "-auditlog", alen) == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++a];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- osi_audit(PTS_StartEvent, 0, AUD_END);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
+ osi_audit(PTS_StartEvent, 0, AUD_END);
}
else if (!strncmp(arg, "-rxmaxmtu", alen)) {
if ((a + 1) >= argc) {
}
code =
- ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, &clones,
+ ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, clones,
pr_dbaseName, &dbase);
if (code) {
afs_com_err(whoami, code, "Ubik init failed");
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.53 2008/09/25 17:26:47 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.55 2009/03/07 14:11:01 shadow Exp $");
#ifdef KERNEL
#include "afs/sysincludes.h"
* idle connections) */
conn->lastSendTime = call->lastSendTime = clock_Sec();
/* Don't count keepalives here, so idleness can be tracked. */
- if (p->header.type != RX_PACKET_TYPE_ACK)
+ if ((p->header.type != RX_PACKET_TYPE_ACK) || (((struct rx_ackPacket *)rx_DataOf(p))->reason != RX_ACK_PING))
call->lastSendData = call->lastSendTime;
}
for (i = 0; i < RX_MAXCALLS; i++) {
call = conn->call[i];
if (call) {
+ int code;
havecalls = 1;
- MUTEX_ENTER(&call->lock);
+ code = MUTEX_TRYENTER(&call->lock);
+ if (!code)
+ continue;
#ifdef RX_ENABLE_LOCKS
result = rxi_CheckCall(call, 1);
#else /* RX_ENABLE_LOCKS */
extern void rxi_InitPeerParams(struct rx_peer *pp);
#if defined(AFS_AIX32_ENV) && !defined(KERNEL)
+#ifndef osi_Alloc
extern void *osi_Alloc(afs_int32 x);
+#endif
+#ifndef osi_Free
extern void osi_Free(void *x, afs_int32 size);
+#endif
#endif /* defined(AFS_AIX32_ENV) && !defined(KERNEL) */
extern void rx_GetIFInfo(void);
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.11 2008/10/02 11:55:03 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.13 2009/01/05 23:17:48 jaltman Exp $");
#ifdef KERNEL
#ifndef UKERNEL
osi_rxSleep(&call->rq);
#endif
}
+ /* cp is no longer valid since we may have given up the lock */
+ cp = call->currentPacket;
call->startWait = 0;
#ifdef RX_ENABLE_LOCKS
do {
if (call->nFree == 0) {
if (!call->error && cp) {
+ /* Clear the current packet now so that if
+ * we are forced to wait and drop the lock
+ * the packet we are planning on using
+ * cannot be freed.
+ */
+ call->currentPacket = (struct rx_packet *)0;
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
/* Wait until TQ_BUSY is reset before adding any
* packets to the transmit queue
hadd32(call->bytesSent, cp->length);
rxi_PrepareSendPacket(call, cp, 0);
queue_Append(&call->tq, cp);
- cp = call->currentPacket = NULL;
+ cp = NULL;
if (!
(call->
flags & (RX_CALL_FAST_RECOVER |
int
rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
{
- struct rx_packet *cp = call->currentPacket;
+ struct rx_packet *cp = NULL;
int nextio;
int requestCount;
struct rx_queue tmpq;
#endif /* RX_ENABLE_LOCKS */
}
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
+ /* cp is no longer valid since we may have given up the lock */
+ cp = call->currentPacket;
if (call->error) {
if (cp) {
#endif
call->startWait = 0;
}
+ /* cp is no longer valid since we may have given up the lock */
+ cp = call->currentPacket;
if (call->error) {
if (cp) {
void
rxi_FlushWrite(register struct rx_call *call)
{
- register struct rx_packet *cp = call->currentPacket;
+ register struct rx_packet *cp = NULL;
/* Free any packets from the last call to ReadvProc/WritevProc */
if (queue_IsNotEmpty(&call->iovq)) {
}
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
+ /* cp is no longer valid since we may have given up the lock */
+ cp = call->currentPacket;
+
if (cp) {
/* cp->length is only supposed to be the user's data */
/* cp->length was already set to (then-current)
--- /dev/null
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#include <afsconfig.h>
+#include <afs/param.h>
+
+RCSID
+ ("$Header: /cvs/openafs/src/rxdebug/rxdumptrace.c,v 1.1.4.2 2009/02/17 04:25:42 shadow Exp $");
+
+#ifdef RXDEBUG
+#include <string.h>
+#ifdef AFS_NT40_ENV
+#include <fcntl.h>
+#include <io.h>
+#else
+#include <sys/file.h>
+#include <unistd.h>
+#endif
+#include "rx.h"
+#include "rx_globals.h"
+#include "rx_trace.h"
+
+extern char *rxi_tracename;
+extern int rxi_logfd;
+
+struct rx_trace {
+ afs_uint32 cid;
+ unsigned short call;
+ unsigned short qlen;
+ afs_uint32 now;
+ afs_uint32 waittime;
+ afs_uint32 servicetime;
+ afs_uint32 event;
+};
+
+#include <errno.h>
+#ifdef AFS_NT40_ENV
+#include <afs/afsutil.h>
+#endif
+
+int
+main(argc, argv)
+ char **argv;
+{
+ struct rx_trace ip;
+ int err = 0;
+
+ setlinebuf(stdout);
+ argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ if (strcmp(*argv, "-trace") == 0) {
+ strcpy(rxi_tracename, *(++argv));
+ argc--;
+ } else {
+ err++;
+ break;
+ }
+ argv++, argc--;
+ }
+ if (err || argc != 0) {
+ printf("usage: dumptrace [-trace pathname]");
+ exit(1);
+ }
+
+ rxi_logfd = open(rxi_tracename, O_RDONLY);
+ if (rxi_logfd < 0) {
+ perror("");
+ exit(errno);
+ }
+
+ while (read(rxi_logfd, &ip, sizeof(struct rx_trace))) {
+ printf("%9u ", ip.now);
+ switch (ip.event) {
+ case RX_CALL_END:
+ putchar('E');
+ break;
+ case RX_CALL_START:
+ putchar('S');
+ break;
+ case RX_CALL_ARRIVAL:
+ putchar('A');
+ break;
+ case RX_TRACE_DROP:
+ putchar('D');
+ break;
+ default:
+ putchar('U');
+ break;
+ }
+ printf(" %3u %7u %7u %x.%x\n", ip.qlen, ip.servicetime,
+ ip.waittime, ip.cid, ip.call);
+ }
+ return 0;
+}
+
+#endif
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rxgen/rpc_main.c,v 1.21.2.7 2008/06/30 23:57:46 rra Exp $");
+ ("$Header: /cvs/openafs/src/rxgen/rpc_main.c,v 1.21.2.8 2008/12/21 06:05:22 jaltman Exp $");
#include <limits.h>
#include <stdio.h>
char yflag = 0; /* if set, only emit function name arrays to xdr file */
int debug = 0;
static char *cmdname;
+#ifdef AFS_NT40_ENV
+static char *CPP = NULL;
+#else /* AFS_NT40_ENV */
#ifdef PATH_CPP
static char CPP[] = PATH_CPP;
#else
static char CPP[] = "/lib/cpp";
#endif
+#endif /* AFS_NT40_ENV */
static char CPPFLAGS[] = "-C";
#ifdef AFS_ALPHA_ENV
main(int argc, char *argv[])
{
struct commandline cmd;
-#ifdef AFS_NT40_ENV
- char *ep;
- /* initialize CPP with the correct pre-processor on NT */
- ep = getenv("RXGEN_CPPCMD");
- if (ep)
- strcpy(CPP, ep);
- else
- strcpy(CPP, "cl /EP /C /nologo");
-#endif
+#ifdef AFS_NT40_ENV
+ /* initialize CPP with the correct pre-processor for Windows */
+ CPP = getenv("RXGEN_CPPCMD");
+ if (!CPP)
+ CPP = "cl /EP /C /nologo";
+#endif /* AFS_NT40_ENV */
+
#ifdef AFS_AIX32_ENV
/*
* The following signal action for AIX is necessary so that in case of a
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.2.8 2007/12/13 21:23:42 shadow Exp $");
+ ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.2.9 2009/03/20 22:45:37 shadow Exp $");
#ifdef AFS_AIX32_ENV
#include <signal.h>
#ifdef AFS_AIX51_ENV
#include <sys/cred.h>
+#ifdef HAVE_SYS_PAG_H
#include <sys/pag.h>
+#endif
#include <errno.h>
#endif
#endif
my $self = shift;
my $principal = shift || 'admin';
#run("echo \"Proceeding w/o authentication\"|klog -pipe ${principal}\@$self->{'realm'}");
- run("klog $principal\@$self->{'realm'}");
+ run("klog $principal");
}
1;
#: - id ID of this volume
#: - kind Kind of volume (RW, RO, or BK)
#: - inuse Disk space in use
+#: - state On-line or Off-line
#: - maxquota Maximum disk usage quota
#: - minquota Minimum disk usage quota (optional)
#: - stamp_create Time when volume was originally created
push(@args, '-cell', $cell ? $cell : $AFS_Parms{'cell'});
%result = &wrapper('vos', \@args,
[$vos_err_parse,
- ['^(\S+)\s*(\d+)\s*(RW|RO|BK)\s*(\d+)\s*K', 'name', 'id', 'kind', 'inuse'],
+ ['^(\S+)\s*(\d+)\s*(RW|RO|BK)\s*(\d+)\s*K\s*([-\w]+)', 'name', 'id', 'kind', 'inuse', 'state'],
['MaxQuota\s*(\d+)\s*K', 'maxquota' ],
['MinQuota\s*(\d+)\s*K', 'minquota' ],
['Creation\s*(.*\S+)', 'stamp_create' ],
If specified, the path to be used for the program to execute, instead of
deriving it from the command name. This is useful when we want the
-command's argv[0] (which is always I<$cmd}) to be different from the
+command's argv[0] (which is always I<$cmd>) to be different from the
path to the program.
=item errors_last
unwind($os->command('remove', "$path->{'afsconfdir'}/ThisCell"));
unwind($os->command('remove', "$path->{'afsconfdir'}/CellServDB"));
unwind($os->command('remove', "$path->{'afsconfdir'}/UserList"));
+ unwind($os->command('remove', "$path->{'afsconfdir'}/KeyFile"));
unwind($os->command('remove', "$path->{'afsbosconfigdir'}/BosConfig"));
unwind($os->command('fileserver-stop'));
}
if ($with_dafs) {
run( "$bos create $server dafs dafs ".
"-cmd \"$path->{'afssrvlibexecdir'}/fileserver $options_fileserver\" ".
- "-cmd \"$path->{'afssrvlibexecdir'}/volserver $options_volserver\"".
+ "-cmd \"$path->{'afssrvlibexecdir'}/volserver $options_volserver\" ".
"-cmd \"$path->{'afssrvlibexecdir'}/salvageserver $options_salvageserver\" ".
"-cmd \"$path->{'afssrvlibexecdir'}/salvager $options_salvager\" ".
"-noauth");
aix_ktc_krb.o \
AUTHLIBS= \
- afs_dynamic_auth \
- aklog_dynamic_auth \
- afs_dynamic_kerbauth
+ afs_dynamic_auth afs_dynamic_kerbauth @MAKE_KRB5@ aklog_dynamic_auth
IMPORTS = -bI:/lib/aio.exp -bI:/lib/netinet.exp -bI:/lib/sockets.exp -bI:/lib/statcmd.exp
LDFLAGS = -eafs_initialize ${IMPORTS} -lsys -lcsys -lc
install install.noversion:
clean:
- $(RM) -f $(AUTHLIBS) $(AUTHFILES) so_locations
+ $(RM) -f *.o $(AUTHLIBS) $(AUTHFILES) so_locations
afs_dynamic_auth: ${AUTH_OBJS} ${AFSLIBS} ${AUTHFILES}
$(LD) -o $@ ${AUTH_OBJS} $(AFSLIBS) ${AUTHFILES} ${XLIBS} ${LDFLAGS}
${CC} ${CFLAGS} -c ${srcdir}/aix41_auth.c -o $@ ;; \
rs_aix5*) \
${CC} ${CFLAGS} -c ${srcdir}/aix5_auth.c -o $@ ;; \
+ rs_aix6*) \
+ ${CC} ${CFLAGS} -c ${srcdir}/aix5_auth.c -o $@ ;; \
*) \
echo "not building aix lam binary for ${SYS_NAME}" ;; \
esac
${DEST}/root.client/usr/vice/etc/afs_dynamic_kerbauth: afs_dynamic_kerbauth
${INSTALL} $? $@
+${DEST}/root.client/usr/vice/etc/aklog_dynamic_auth: aklog_dynamic_auth
+ ${INSTALL} $? $@
+
dest: \
- ${DEST}/root.client/usr/vice/etc/afs_dynamic_auth \
- ${DEST}/root.client/usr/vice/etc/afs_dynamic_kerbauth
+ ${DEST}/root.client/usr/vice/etc/afs_dynamic_auth ${DEST}/root.client/usr/vice/etc/afs_dynamic_kerbauth @MAKE_KRB5@ ${DEST}/root.client/usr/vice/etc/aklog_dynamic_auth
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/com_err.h>
RCSID
- ("$Header: /cvs/openafs/src/tsm41/aix_aklog.c,v 1.1.4.6 2008/01/03 18:05:26 shadow Exp $");
+ ("$Header: /cvs/openafs/src/tsm41/aix_aklog.c,v 1.1.4.8 2009/03/20 22:45:38 shadow Exp $");
#if defined(AFS_AIX51_ENV)
#include <sys/types.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/file.h>
+#ifdef HAVE_SYS_PAG_H
#include <sys/pag.h>
+#endif
#include <errno.h>
#include <usersec.h>
#include <syslog.h>
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.13.2.7 2008/10/18 15:24:57 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.13.2.9 2009/03/20 03:49:16 shadow Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
}
#ifndef OLD_URECOVERY
flen = length;
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.TMP", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
if (fd < 0) {
code = errno;
#ifdef OLD_URECOVERY
(*ubik_dbase->sync) (ubik_dbase, 0); /* get data out first */
#else
- afs_snprintf(tbuffer, sizeof(tbuffer), "%s.DB0", ubik_dbase->pathName);
+ afs_snprintf(tbuffer, sizeof(tbuffer), "%s.DB%s%d", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#ifdef AFS_NT40_ENV
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.OLD", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
code = unlink(pbuffer);
if (!code)
code = rename(tbuffer, pbuffer);
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.TMP", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#endif
if (!code)
code = rename(pbuffer, tbuffer);
- if (!code)
- code = (*ubik_dbase->open) (ubik_dbase, 0);
- if (!code)
+ if (!code) {
+ (*ubik_dbase->open) (ubik_dbase, 0);
#endif
- /* after data is good, sync disk with correct label */
- code =
- (*ubik_dbase->setlabel) (ubik_dbase, 0,
- &ubik_dbase->version);
+ /* after data is good, sync disk with correct label */
+ code =
+ (*ubik_dbase->setlabel) (ubik_dbase, 0,
+ &ubik_dbase->version);
#ifndef OLD_URECOVERY
+ }
#ifdef AFS_NT40_ENV
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.OLD", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
unlink(pbuffer);
#endif
#endif
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.12.2.9 2008/10/27 23:54:10 shadow Exp $");
+ ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.12.2.11 2009/03/20 03:49:16 shadow Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
(*dbase->setlabel) (dbase, file, &tversion); /* setlabel does sync */
#ifndef OLD_URECOVERY
flen = length;
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.TMP", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
if (fd < 0) {
code = errno;
#ifdef OLD_URECOVERY
(*ubik_dbase->sync) (dbase, file);
#else
- afs_snprintf(tbuffer, sizeof(tbuffer), "%s.DB0", ubik_dbase->pathName);
+ afs_snprintf(tbuffer, sizeof(tbuffer), "%s.DB%s%d", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#ifdef AFS_NT40_ENV
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.OLD", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
code = unlink(pbuffer);
if (!code)
code = rename(tbuffer, pbuffer);
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.TMP", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#endif
if (!code)
code = rename(pbuffer, tbuffer);
- if (!code)
- code = (*ubik_dbase->open) (ubik_dbase, 0);
- if (!code)
+ if (!code) {
+ (*ubik_dbase->open) (ubik_dbase, 0);
#endif
- code = (*ubik_dbase->setlabel) (dbase, file, avers);
+ code = (*ubik_dbase->setlabel) (dbase, file, avers);
#ifndef OLD_URECOVERY
+ }
#ifdef AFS_NT40_ENV
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB0.OLD", ubik_dbase->pathName);
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
unlink(pbuffer);
#endif
#endif
int (*sync) (struct ubik_dbase * adbase, afs_int32 afile);
int (*stat) (struct ubik_dbase * adbase, afs_int32 afid,
struct ubik_stat * astat);
- int (*open) (struct ubik_dbase * adbase, afs_int32 afid);
+ void (*open) (struct ubik_dbase * adbase, afs_int32 afid);
int (*setlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion); /* set the version label */
int (*getlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion); /* retrieve the version label */
int (*getnfiles) (struct ubik_dbase * adbase); /* find out number of files */
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/update/client.c,v 1.12.2.2 2007/10/30 15:24:08 shadow Exp $");
+ ("$Header: /cvs/openafs/src/update/client.c,v 1.12.2.3 2009/02/03 19:44:51 shadow Exp $");
#include <afs/stds.h>
#ifdef AFS_AIX32_ENV
if (fstat(fd, &status) < 0) {
afs_com_err(whoami, errno, "Could not stat %s", localFile);
close(fd);
- printf("could not stast %s\n", localFile);
+ printf("could not stat %s\n", localFile);
return UPDATE_ERROR;
}
if (update_ReceiveFile(fd, call, &status))
if (errcode) {
printf("failed to fetch file %s \n", filename);
afs_com_err(whoami, errcode, "fetching file");
+ unlink(newfile);
return 1;
}
(unsigned int)mode);
afs_com_err(whoami, errno, "could not change protection on %s to %u",
newfile, mode);
+ unlink(newfile);
return 1;
}
#ifdef AFS_NT40_ENV
afs_com_err(whoami, errno,
"could not change access and modify times on %s to %u %u",
newfile, atime, mtime);
+ unlink(newfile);
return 1;
}
extern void SetLogThreadNumProgram(int (*func) (void) );
/*@printflike@*/ extern void FSLog(const char *format, ...);
-#define ViceLog(level, str) if ((level) <= LogLevel) (FSLog str)
-#define vViceLog(level, str) if ((level) <= LogLevel) (vFSLog str)
+#define ViceLog(level, str) do { if ((level) <= LogLevel) (FSLog str); } while (0)
+#define vViceLog(level, str) do { if ((level) <= LogLevel) (vFSLog str); } while (0)
extern int OpenLog(const char *filename);
extern int ReOpenLog(const char *fileName);
/* get_krbrlm.c */
extern int afs_krb_get_lrealm(char *r, int n);
-
+extern int afs_krb_exclusion(char *name);
+extern int afs_is_foreign_ticket_name(char *tname, char *tinst, char * tcell, char *localrealm);
/* hostparse.c */
extern struct hostent *hostutil_GetHostByName(register char *ahost);
extern char *hostutil_GetNameByINet(afs_uint32 addr);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/util/dirpath.c,v 1.15.2.1 2006/11/20 23:47:24 rra Exp $");
+ ("$Header: /cvs/openafs/src/util/dirpath.c,v 1.15.2.2 2009/03/19 03:45:03 shadow Exp $");
#include <stddef.h>
#include <stdlib.h>
pathp = dirPathArray[AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID];
AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_MIGR_DIR, AFSDIR_MIGRATE_LOGNAME);
+ pathp = dirPathArray[AFSDIR_SERVER_KRB_EXCL_FILEPATH_ID];
+ AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_SERVER_ETC_DIR, AFSDIR_KRB_EXCL_FILE);
/* client file paths */
#ifdef AFS_NT40_ENV
#define AFSDIR_BOSVR_FILE "bosserver"
#define AFSDIR_VOLSERLOG_FILE "VolserLog"
#define AFSDIR_AUDIT_FILE "Audit"
+#define AFSDIR_KRB_EXCL_FILE "krb.excl"
#define AFSDIR_ROOTVOL_FILE "RootVolume"
#define AFSDIR_HOSTDUMP_FILE "hosts.dump"
AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID,
AFSDIR_SERVER_BIN_FILE_DIRPATH_ID,
AFSDIR_CLIENT_CELLALIAS_FILEPATH_ID,
+ AFSDIR_SERVER_KRB_EXCL_FILEPATH_ID,
AFSDIR_PATHSTRING_MAX } afsdir_id_t;
/* getDirPath() returns a pointer to a string from an internal array of path strings
#define AFSDIR_SERVER_WEIGHTING_CONSTANTS_FILEPATH getDirPath(AFSDIR_SERVER_WEIGHTING_CONSTANTS_FILEPATH_ID)
#define AFSDIR_SERVER_THRESHOLD_CONSTANTS_FILEPATH getDirPath(AFSDIR_SERVER_THRESHOLD_CONSTANTS_FILEPATH_ID)
#define AFSDIR_SERVER_MIGRATELOG_FILEPATH getDirPath(AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID)
+#define AFSDIR_SERVER_KRB_EXCL_FILEPATH getDirPath(AFSDIR_SERVER_KRB_EXCL_FILEPATH_ID)
/* client file paths */
#define AFSDIR_CLIENT_THISCELL_FILEPATH getDirPath(AFSDIR_CLIENT_THISCELL_FILEPATH_ID)
#define AFSDIR_BOSVR_FILE "bosserver"
#define AFSDIR_VOLSERLOG_FILE "VolserLog"
#define AFSDIR_AUDIT_FILE "Audit"
+#define AFSDIR_KRB_EXCL_FILE "krb.excl"
#define AFSDIR_ROOTVOL_FILE "RootVolume"
#define AFSDIR_HOSTDUMP_FILE "hosts.dump"
AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID,
AFSDIR_SERVER_BIN_FILE_DIRPATH_ID,
AFSDIR_CLIENT_CELLALIAS_FILEPATH_ID,
+ AFSDIR_SERVER_KRB_EXCL_FILEPATH_ID,
AFSDIR_PATHSTRING_MAX
} afsdir_id_t;
#define AFSDIR_SERVER_WEIGHTING_CONSTANTS_FILEPATH getDirPath(AFSDIR_SERVER_WEIGHTING_CONSTANTS_FILEPATH_ID)
#define AFSDIR_SERVER_THRESHOLD_CONSTANTS_FILEPATH getDirPath(AFSDIR_SERVER_THRESHOLD_CONSTANTS_FILEPATH_ID)
#define AFSDIR_SERVER_MIGRATELOG_FILEPATH getDirPath(AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID)
+#define AFSDIR_SERVER_KRB_EXCL_FILEPATH getDirPath(AFSDIR_SERVER_KRB_EXCL_FILEPATH_ID)
/* client file paths */
#define AFSDIR_CLIENT_THISCELL_FILEPATH getDirPath(AFSDIR_CLIENT_THISCELL_FILEPATH_ID)
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/util/get_krbrlm.c,v 1.6.2.1 2007/10/30 15:24:09 shadow Exp $");
+ ("$Header: /cvs/openafs/src/util/get_krbrlm.c,v 1.6.2.2 2009/03/19 03:45:03 shadow Exp $");
#include <stdio.h>
#include <string.h>
#define KSUCCESS 0
#define KFAILURE (-1)
+static char *
+parse_str(char *buffer, char *result, int size)
+{
+ int n=0;
+
+ if (!buffer)
+ goto cleanup;
+
+ while (*buffer && isspace(*buffer))
+ buffer++;
+ while (*buffer && !isspace(*buffer)) {
+ if (n < size - 1) {
+ *result++=*buffer++;
+ n++;
+ } else {
+ buffer++;
+ }
+ }
+
+ cleanup:
+ *result='\0';
+ return buffer;
+}
+
+
int
afs_krb_get_lrealm(char *r, int n)
{
+ char linebuf[2048];
+ char tr[AFS_REALM_SZ] = "";
+ char *p;
FILE *cnffile/*, *fopen()*/;
+ int i;
+ int rv = KFAILURE;
- if (n > 1)
- return (KFAILURE); /* Temporary restriction */
+ *r = '\0';
if ((cnffile = fopen(AFSDIR_SERVER_KCONF_FILEPATH, "r")) == NULL) {
return (KFAILURE);
}
- if (fscanf(cnffile, "%s", r) != 1) {
- (void)fclose(cnffile);
- return (KFAILURE);
+ if (fgets(linebuf, sizeof(linebuf)-1, cnffile) == NULL) {
+ goto cleanup;
+ }
+ linebuf[sizeof(linebuf)-1] = '\0';
+ for (i=0, p=linebuf; i<=n && *p; i++) {
+ p = parse_str(p, tr, AFS_REALM_SZ);
}
+
+ if (*tr) {
+ strcpy(r,tr);
+ rv = KSUCCESS;
+ }
+
+ cleanup:
(void)fclose(cnffile);
- return (KSUCCESS);
+ return rv;
}
+
+int
+afs_krb_exclusion(char * name)
+{
+ char linebuf[2048];
+ char excl_name[256] = "";
+ FILE *cnffile/*, *fopen()*/;
+ int exclude = 0;
+
+ if ((cnffile = fopen(AFSDIR_SERVER_KRB_EXCL_FILEPATH, "r")) == NULL)
+ return exclude;
+
+ for (;;) {
+ if (fgets(linebuf, sizeof(linebuf)-1, cnffile) == NULL) {
+ goto cleanup;
+ }
+ linebuf[sizeof(linebuf)-1] = '\0';
+ parse_str(linebuf, excl_name, sizeof(excl_name));
+
+ if (!strcmp(name,excl_name)) {
+ exclude = 1;
+ break;
+ }
+ }
+
+ cleanup:
+ (void)fclose(cnffile);
+ return exclude;
+}
+
+int
+afs_is_foreign_ticket_name(char *tname, char *tinst, char * tcell, char *localrealm)
+{
+ int foreign = 0;
+
+ if (localrealm && strcasecmp(localrealm, tcell))
+ foreign = 1;
+
+#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
+ if (foreign) {
+ static char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
+ static int num_lrealms = -1;
+ int lrealm_match, i;
+ char uname[256];
+
+ if (num_lrealms == -1) {
+ for (i=0; i<AFS_NUM_LREALMS; i++) {
+ if (afs_krb_get_lrealm(local_realms[i], i) != 0 /*KSUCCESS*/)
+ break;
+ }
+
+ if (i==0 && localrealm) {
+ strncpy(local_realms[0], localrealm, AFS_REALM_SZ);
+ num_lrealms = 1;
+ } else {
+ num_lrealms = i;
+ }
+ }
+
+ /* See if the ticket cell matches one of the local realms */
+ lrealm_match = 0;
+ for ( i=0;i<num_lrealms;i++ ) {
+ if (!strcasecmp(local_realms[i], tcell)) {
+ lrealm_match = 1;
+ break;
+ }
+ }
+
+ /* If yes, then make sure that the name is not present in
+ * an exclusion list */
+ if (lrealm_match) {
+ if (tinst && tinst[0])
+ snprintf(uname,sizeof(uname),"%s.%s@%s",tname,tinst,tcell);
+ else
+ snprintf(uname,sizeof(uname),"%s@%s",tname,tcell);
+
+ if (afs_krb_exclusion(uname))
+ lrealm_match = 0;
+ }
+
+ foreign = !lrealm_match;
+ }
+#endif
+ return foreign;
+}
+
+
+
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/util/test/dirpath_test.c,v 1.5 2003/07/15 23:17:18 shadow Exp $");
+ ("$Header: /cvs/openafs/src/util/test/dirpath_test.c,v 1.5.2.1 2009/03/19 03:45:03 shadow Exp $");
#include <stdio.h>
#include <afs/afsutil.h>
AFSDIR_SERVER_FILELOG_FILEPATH);
printf("AFSDIR_SERVER_AUDIT_FILEPATH = %s\n",
AFSDIR_SERVER_AUDIT_FILEPATH);
+ printf("AFSDIR_SERVER_KRB_EXCL_FILEPATH = %s\n",
+ AFSDIR_SERVER_KRB_EXCL_FILEPATH);
printf("\n");
printf("\n");
printf("AFSDIR_CLIENT_THISCELL_FILEPATH = %s\n",
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.12 2008/03/08 01:15:36 shadow Exp $");
+ ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.14 2009/02/17 03:59:53 shadow Exp $");
#include <afs/afs_args.h>
#include <rx/xdr.h>
#include <afs/vlserver.h>
#include <afs/cmd.h>
#include <afs/afsutil.h>
+#include <afs/com_err.h>
#include <stdlib.h>
#include <assert.h>
#include <afs/ptclient.h>
Parent(char *apath)
{
char *tp;
- strcpy(tspace, apath);
+ strlcpy(tspace, apath, sizeof(tspace));
tp = strrchr(tspace, '/');
- if (tp) {
- *tp = 0;
- } else
- strcpy(tspace, ".");
+ if (tp == (char *)tspace)
+ tp++;
+ else if (tp == (char *)NULL) {
+ tp = (char *)tspace;
+ *(tp++) = '.';
+ }
+ *tp = '\0';
return tspace;
}
* Find rightmost slash, if any.
*/
last_component = (char *)strrchr(true_name, '/');
- if (last_component) {
+ if (last_component == (char *)true_name) {
+ strcpy(parent_dir, "/");
+ last_component++;
+ }
+ else if (last_component != (char *)NULL) {
/*
* Found it. Designate everything before it as the parent directory,
* everything after it as the final component.
* Find rightmost slash, if any.
*/
last_component = (char *)strrchr(true_name, '/');
- if (last_component) {
+ if (last_component == (char *)true_name) {
+ strcpy(parent_dir, "/");
+ last_component++;
+ }
+ else if (last_component != (char *)NULL) {
/*
* Found it. Designate everything before it as the parent directory,
* everything after it as the final component.
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4.2.3 2008/03/08 01:15:37 shadow Exp $");
+ ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4.2.4 2008/11/30 20:25:03 shadow Exp $");
#include <afs/afs_args.h>
#include <rx/xdr.h>
#include <sys/stat.h>
#include <string.h>
#include <afs/stds.h>
+#include <afs/com_err.h>
#include <afs/vice.h>
#include <afs/venus.h>
#include <afs/com_err.h>
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7.2.3 2008/03/08 01:15:37 shadow Exp $");
+ ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7.2.4 2008/11/30 20:25:03 shadow Exp $");
#include <rx/xdr.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <sys/stat.h>
#include <afs/stds.h>
+#include <afs/com_err.h>
#include <afs/vice.h>
#include <afs/venus.h>
#ifdef AFS_AIX32_ENV
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5.2.2 2007/10/31 04:13:50 shadow Exp $");
+ ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5.2.3 2008/11/30 20:25:03 shadow Exp $");
#include <stdio.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <afs/stds.h>
+#include <afs/com_err.h>
#include <afs/vice.h>
#include <afs/venus.h>
#include "afs/prs_fs.h"
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.50 2008/09/05 16:58:05 shadow Exp $");
+ ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.53 2009/03/25 13:07:27 shadow Exp $");
#include <stdio.h>
#include <stdlib.h>
}
afs_int32
-SRXAFS_ResidencyCmd(struct rx_call * acall, struct AFSFid * Fid,
- struct ResidencyCmdInputs * Inputs,
- struct ResidencyCmdOutputs * Outputs)
+SRXAFS_FsCmd(struct rx_call * acall, struct AFSFid * Fid,
+ struct FsCmdInputs * Inputs,
+ struct FsCmdOutputs * Outputs)
{
- return EINVAL;
+ afs_int32 code = 0;
+ struct AFSCallBack callback;
+ struct AFSVolSync sync;
+
+ switch (Inputs->command) {
+ default:
+ code = EINVAL;
+ }
+ ViceLog(1,("FsCmd: cmd = %d, code=%d\n",
+ Inputs->command, Outputs->code));
+ return code;
}
static struct afs_buffer {
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.27 2008/03/11 17:40:55 shadow Exp $");
+ ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.30 2009/03/19 20:13:23 shadow Exp $");
#include <stdio.h>
#include <stdlib.h> /* for malloc() */
tfirst = CBtime(FT_ApproxTime());
/* N.B. The "-1", below, is because
* FE[0] and CB[0] are not used--and not allocated */
- FE = ((struct FileEntry *)(calloc(nblks, sizeof(struct FileEntry)))) - 1;
+ FE = ((struct FileEntry *)(calloc(nblks, sizeof(struct FileEntry))));
if (!FE) {
ViceLog(0, ("Failed malloc in InitCallBack\n"));
assert(0);
}
+ FE--; /* FE[0] is supposed to point to junk */
cbstuff.nFEs = nblks;
while (cbstuff.nFEs)
FreeFE(&FE[cbstuff.nFEs]); /* This is correct */
- CB = ((struct CallBack *)(calloc(nblks, sizeof(struct CallBack)))) - 1;
+ CB = ((struct CallBack *)(calloc(nblks, sizeof(struct CallBack))));
if (!CB) {
ViceLog(0, ("Failed malloc in InitCallBack\n"));
assert(0);
}
+ CB--; /* CB[0] is supposed to point to junk */
cbstuff.nCBs = nblks;
while (cbstuff.nCBs)
FreeCB(&CB[cbstuff.nCBs]); /* This is correct */
}
#define MAGIC 0x12345678 /* To check byte ordering of dump when it is read in */
+#define MAGICV2 0x12345679 /* To check byte ordering & version of dump when it is read in */
+
#ifndef INTERPRET_DUMP
DumpCallBackState(void)
{
int fd, oflag;
- afs_uint32 magic = MAGIC, now = FT_ApproxTime(), freelisthead;
+ afs_uint32 magic = MAGICV2, now = (afs_int32) FT_ApproxTime(), freelisthead;
oflag = O_WRONLY | O_CREAT | O_TRUNC;
#ifdef AFS_NT40_ENV
/* This is only compiled in for the callback analyzer program */
/* Returns the time of the dump */
time_t
-ReadDump(char *file)
+ReadDump(char *file, int timebits)
{
int fd, oflag;
afs_uint32 magic, freelisthead;
afs_uint32 now;
+#ifdef AFS_64BIT_ENV
+ afs_int64 now64;
+#endif
oflag = O_RDONLY;
#ifdef AFS_NT40_ENV
exit(1);
}
read(fd, &magic, sizeof(magic));
- if (magic != MAGIC) {
- fprintf(stderr,
- "Magic number of %s is invalid. You might be trying to\n",
- file);
- fprintf(stderr,
- "run this program on a machine type with a different byte ordering.\n");
- exit(1);
+ if (magic == MAGICV2) {
+ timebits = 32;
+ } else {
+ if (magic != MAGIC) {
+ fprintf(stderr,
+ "Magic number of %s is invalid. You might be trying to\n",
+ file);
+ fprintf(stderr,
+ "run this program on a machine type with a different byte ordering.\n");
+ exit(1);
+ }
}
- read(fd, &now, sizeof(now));
+#ifdef AFS_64BIT_ENV
+ if (timebits == 64) {
+ read(fd, &now64, sizeof(afs_int64));
+ now = (afs_int32) now64;
+ } else
+#endif
+ read(fd, &now, sizeof(afs_int32));
read(fd, &cbstuff, sizeof(cbstuff));
read(fd, TimeOuts, sizeof(TimeOuts));
read(fd, timeout, sizeof(timeout));
static AFSFid fid;
register struct FileEntry *fe;
register struct CallBack *cb;
- time_t now;
-
+ afs_int32 now;
+ int timebits = 32;
+
memset(&fid, 0, sizeof(fid));
argc--;
argv++;
all = 1;
} else if (!strcmp(*argv, "-raw")) {
raw = 1;
+ } else if (!strcmp(*argv, "-timebits")) {
+ if (argc < 1) {
+ err++;
+ break;
+ }
+ argc--;
+ timebits = atoi(*++argv);
+ if ((timebits != 32)
+#ifdef AFS_64BIT_ENV
+ && (timebits != 64)
+#endif
+ )
+ err++;
} else if (!strcmp(*argv, "-volume")) {
if (argc < 1) {
err++;
}
if (err || argc != 1) {
fprintf(stderr,
- "Usage: cbd [-host cbid] [-fid volume vnode] [-stats] [-all] callbackdumpfile\n");
+ "Usage: cbd [-host cbid] [-fid volume vnode] [-stats] [-all] [-timebits 32"
+#ifdef AFS_64BIT_ENV
+ "|64"
+#endif
+ "] callbackdumpfile\n");
fprintf(stderr,
"[cbid is shown for each host in the hosts.dump file]\n");
exit(1);
}
- now = ReadDump(*argv);
+ now = ReadDump(*argv, timebits);
if (stats || noptions == 0) {
time_t uxtfirst = UXtime(tfirst);
printf("The time of the dump was %u %s", now, ctime(&now));
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.60 2008/10/27 23:54:10 shadow Exp $");
+ ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.64 2009/03/19 03:45:02 shadow Exp $");
#include <stdio.h>
#include <errno.h>
*/
static struct h_AddrHashChain *hostAddrHashTable[h_HASHENTRIES];
static struct h_UuidHashChain *hostUuidHashTable[h_HASHENTRIES];
-#define h_HashIndex(hostip) ((hostip) & (h_HASHENTRIES-1))
+#define h_HashIndex(hostip) (ntohl(hostip) & (h_HASHENTRIES-1))
#define h_UuidHashIndex(uuidp) (((int)(afs_uuid_hash(uuidp))) & (h_HASHENTRIES-1))
struct HTBlock { /* block of HTSPERBLOCK file entries */
char hoststr[16], hoststr2[16];
Capabilities caps;
struct rx_connection *cb_conn = NULL;
+ struct rx_connection *cb_in = NULL;
caps.Capabilities_val = NULL;
haddr = rxr_HostOf(tcon);
hport = rxr_PortOf(tcon);
retry:
+ if (cb_in) {
+ rx_DestroyConnection(cb_in);
+ cb_in = NULL;
+ }
if (caps.Capabilities_val)
free(caps.Capabilities_val);
caps.Capabilities_val = NULL;
}
host->hostFlags |= HWHO_INPROGRESS;
host->hostFlags &= ~ALTADDR;
+
+ /* We received a new connection from an IP address/port
+ * that is associated with 'host' but the address/port of
+ * the callback connection does not have to match it.
+ * If there is a match, we can use the existing callback
+ * connection to verify the UUID. If they do not match
+ * we need to use a new callback connection to verify the
+ * UUID of the incoming caller and perhaps use the old
+ * callback connection to verify that the old address/port
+ * is still valid.
+ */
+
cb_conn = host->callback_rxcon;
rx_GetConnection(cb_conn);
H_UNLOCK;
- code =
- RXAFSCB_TellMeAboutYourself(cb_conn, &interf, &caps);
- if (code == RXGEN_OPCODE)
- code = RXAFSCB_WhoAreYou(cb_conn, &interf);
+ if (haddr == host->host && hport == host->port) {
+ /* The existing callback connection matches the
+ * incoming connection so just use it.
+ */
+ code =
+ RXAFSCB_TellMeAboutYourself(cb_conn, &interf, &caps);
+ if (code == RXGEN_OPCODE)
+ code = RXAFSCB_WhoAreYou(cb_conn, &interf);
+ } else {
+ /* We do not have a match. Create a new connection
+ * for the new addr/port and use multi_Rx to probe
+ * both of them simultaneously.
+ */
+ if (!sc)
+ sc = rxnull_NewClientSecurityObject();
+ cb_in = rx_NewConnection(haddr, hport, 1, sc, 0);
+ rx_SetConnDeadTime(cb_in, 50);
+ rx_SetConnHardDeadTime(cb_in, AFS_HARDDEADTIME);
+
+ code =
+ RXAFSCB_TellMeAboutYourself(cb_in, &interf, &caps);
+ if (code == RXGEN_OPCODE)
+ code = RXAFSCB_WhoAreYou(cb_in, &interf);
+ }
rx_PutConnection(cb_conn);
cb_conn=NULL;
H_LOCK;
}
identP->valid = 0;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
- /* The host on this connection was unable to respond to
- * the WhoAreYou. We will treat this as a new connection
- * from the existing host. The worst that can happen is
- * that we maintain some extra callback state information */
- if (host->interface) {
- ViceLog(0,
- ("Host %s:%d used to support WhoAreYou, deleting.\n",
- afs_inet_ntoa_r(host->host, hoststr),
- ntohs(host->port)));
- host->hostFlags |= HOSTDELETED;
- host->hostFlags &= ~HWHO_INPROGRESS;
- h_Unlock_r(host);
+ if (cb_in == NULL) {
+ /* The host on this connection was unable to respond to
+ * the WhoAreYou. We will treat this as a new connection
+ * from the existing host. The worst that can happen is
+ * that we maintain some extra callback state information */
+ if (host->interface) {
+ ViceLog(0,
+ ("Host %x (%s:%d) used to support WhoAreYou, deleting.\n",
+ host,
+ afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port)));
+ host->hostFlags |= HOSTDELETED;
+ host->hostFlags &= ~HWHO_INPROGRESS;
+ host->hostFlags |= ALTADDR;
+ h_Unlock_r(host);
+ if (!held)
+ h_Release_r(host);
+ host = NULL;
+ goto retry;
+ }
+ } else {
+ /* The incoming connection does not support WhoAreYou but
+ * the original one might have. Use removeAddress_r() to
+ * remove this addr/port from the host that was found.
+ * If there are no more addresses left for the host it
+ * will be deleted. Then we retry.
+ */
+ removeAddress_r(host, haddr, hport);
+ host->hostFlags &= ~HWHO_INPROGRESS;
+ host->hostFlags |= ALTADDR;
+ h_Unlock_r(host);
if (!held)
h_Release_r(host);
host = NULL;
* then this is not the same host as before. */
if (!host->interface
|| !afs_uuid_equal(&interf.uuid, &host->interface->uuid)) {
- ViceLog(25,
- ("Uuid doesn't match host %x (%s:%d). Host deleted.\n",
- host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
- host->hostFlags |= HOSTDELETED;
+ if (cb_in) {
+ ViceLog(25,
+ ("Uuid doesn't match connection (%s:%d).\n",
+ afs_inet_ntoa_r(haddr, hoststr), ntohs(hport)));
+
+ removeAddress_r(host, haddr, hport);
+ } else {
+ ViceLog(25,
+ ("Uuid doesn't match host %x (%s:%d).\n",
+ host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
+
+ removeAddress_r(host, host->host, host->port);
+ }
host->hostFlags &= ~HWHO_INPROGRESS;
+ host->hostFlags |= ALTADDR;
h_Unlock_r(host);
if (!held)
h_Release_r(host);
host = NULL;
goto retry;
+ } else if (cb_in) {
+ /* the UUID matched the client at the incoming addr/port
+ * but this is not the address of the active callback
+ * connection. Try that connection and see if the client
+ * is still there and if the reported UUID is the same.
+ */
+ int code2;
+ afsUUID uuid = host->interface->uuid;
+ cb_conn = host->callback_rxcon;
+ rx_GetConnection(cb_conn);
+ rx_SetConnDeadTime(cb_conn, 2);
+ rx_SetConnHardDeadTime(cb_conn, AFS_HARDDEADTIME);
+ H_UNLOCK;
+ code2 = RXAFSCB_ProbeUuid(cb_conn, &uuid);
+ H_LOCK;
+ rx_SetConnDeadTime(cb_conn, 50);
+ rx_SetConnHardDeadTime(cb_conn, AFS_HARDDEADTIME);
+ rx_PutConnection(cb_conn);
+ cb_conn=NULL;
+ if (code2) {
+ /* The primary address is either not responding or
+ * is not the client we are looking for. Need to
+ * remove the primary address and add swap in the new
+ * callback connection, and destroy the old one.
+ */
+ struct rx_connection *rxconn;
+ ViceLog(0,("CB: ProbeUuid for host %x (%s:%d) failed %d\n",
+ host,
+ afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port),code2));
+
+ removeInterfaceAddr_r(host, host->host, host->port);
+ addInterfaceAddr_r(host, haddr, hport);
+ host->host = haddr;
+ host->port = hport;
+ rxconn = host->callback_rxcon;
+ host->callback_rxcon = cb_in;
+ cb_in = NULL;
+
+ if (rxconn) {
+ struct client *client;
+ /*
+ * If rx_DestroyConnection calls h_FreeConnection we will
+ * deadlock on the host_glock_mutex. Work around the problem
+ * by unhooking the client from the connection before
+ * destroying the connection.
+ */
+ client = rx_GetSpecific(rxconn, rxcon_client_key);
+ rx_SetSpecific(rxconn, rxcon_client_key, (void *)0);
+ rx_DestroyConnection(rxconn);
+ }
+ }
}
} else {
- ViceLog(0,
- ("CB: WhoAreYou failed for host %x (%s:%d), error %d\n",
- host, afs_inet_ntoa_r(host->host, hoststr),
- ntohs(host->port), code));
- host->hostFlags |= VENUSDOWN;
+ if (cb_in) {
+ /* A callback to the incoming connection address is failing.
+ * Assume that the addr/port is no longer associated with the host
+ * returned by h_Lookup_r.
+ */
+ ViceLog(0,
+ ("CB: WhoAreYou failed for connection (%s:%d) , error %d\n",
+ afs_inet_ntoa_r(haddr, hoststr), ntohs(hport), code));
+ removeAddress_r(host, haddr, hport);
+ host->hostFlags &= ~HWHO_INPROGRESS;
+ host->hostFlags |= ALTADDR;
+ h_Unlock_r(host);
+ if (!held)
+ h_Release_r(host);
+ host = NULL;
+ rx_DestroyConnection(cb_in);
+ return 0;
+ } else {
+ ViceLog(0,
+ ("CB: WhoAreYou failed for host %x (%s:%d), error %d\n",
+ host, afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port), code));
+ host->hostFlags |= VENUSDOWN;
+ }
}
if (caps.Capabilities_val
&& (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS))
static char localcellname[PR_MAXNAMELEN + 1];
-char local_realm[AFS_REALM_SZ] = "";
+char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
+int num_lrealms = -1;
/* not reentrant */
void
{
memset(&nulluuid, 0, sizeof(afsUUID));
afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
- if (!local_realm[0]) {
- if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/) {
+ if (num_lrealms == -1) {
+ int i;
+ for (i=0; i<AFS_NUM_LREALMS; i++) {
+ if (afs_krb_get_lrealm(local_realms[i], i) != 0 /*KSUCCESS*/)
+ break;
+ }
+
+ if (i == 0) {
ViceLog(0,
("afs_krb_get_lrealm failed, using %s.\n",
localcellname));
- strcpy(local_realm, localcellname);
+ strncpy(local_realms[0], localcellname, AFS_REALM_SZ);
+ num_lrealms = i =1;
+ } else {
+ num_lrealms = i;
}
+
+ /* initialize the rest of the local realms to nullstring for debugging */
+ for (; i<AFS_NUM_LREALMS; i++)
+ local_realms[i][0] = '\0';
}
rxcon_ident_key = rx_KeyCreate((rx_destructor_t) free);
rxcon_client_key = rx_KeyCreate((rx_destructor_t) 0);
cnamelen = strlen(acell);
if (cnamelen) {
- if (strcasecmp(local_realm, acell)
- && strcasecmp(localcellname, acell)) {
+ if (afs_is_foreign_ticket_name(aname, NULL, acell, localcellname)) {
ViceLog(2,
- ("MapName: cell is foreign. cell=%s, localcell=%s, localrealm=%s\n",
- acell, localcellname, local_realm));
+ ("MapName: cell is foreign. cell=%s, localcell=%s, localrealms={%s,%s,%s,%s}\n",
+ acell, localcellname, local_realms[0],local_realms[1],local_realms[2],local_realms[3]));
if ((anamelen + cnamelen + 1) >= PR_MAXNAMELEN) {
ViceLog(2,
("MapName: Name too long, using AnonymousID for %s@%s\n",
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.30 2008/08/25 01:15:21 shadow Exp $");
+ ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.36 2009/03/25 13:07:27 shadow Exp $");
#include <stdio.h>
#include <stdlib.h>
}
#if defined(AFS_PTHREAD_ENV)
-char *
+int
threadNum(void)
{
- return pthread_getspecific(rx_thread_id_key);
+ return (int)pthread_getspecific(rx_thread_id_key);
}
#endif
/* proc called by rxkad module to get a key */
static int
-get_key(char *arock, register afs_int32 akvno, char *akey)
+get_key(void *arock, register afs_int32 akvno, char *akey)
{
/* find the key */
static struct afsconf_key tkey;
return -1;
}
} else if (!strcmp(argv[i], "-realm")) {
- extern char local_realm[AFS_REALM_SZ];
+ extern char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
+ extern int num_lrealms;
if ((i + 1) >= argc) {
fprintf(stderr, "missing argument for -realm\n");
return -1;
AFS_REALM_SZ);
return -1;
}
- strncpy(local_realm, argv[i], AFS_REALM_SZ);
+ if (num_lrealms == -1)
+ num_lrealms = 0;
+ if (num_lrealms >= AFS_NUM_LREALMS) {
+ printf
+ ("a maximum of %d -realm arguments can be specified.\n",
+ AFS_NUM_LREALMS);
+ return -1;
+ }
+ strncpy(local_realms[num_lrealms++], argv[i], AFS_REALM_SZ);
} else if (!strcmp(argv[i], "-udpsize")) {
if ((i + 1) >= argc) {
printf("You have to specify -udpsize <integer value>\n");
rx_enableProcessRPCStats();
}
else if (strcmp(argv[i], "-auditlog") == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++i];
-
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+
+ osi_audit_file(fileName);
}
#ifndef AFS_NT40_ENV
else if (strcmp(argv[i], "-syslog") == 0) {
#define MAX_FILESERVER_THREAD 128 /* max number of threads in fileserver, subject to system limits. match to FD_HANDLE_SETASIDE */
-#define FILESERVER_HELPER_THREADS 7 /* Listner, IOMGR, FiveMinute,
+#define FILESERVER_HELPER_THREADS 8 /* Listner, IOMGR, FiveMinute, FsyncCk
* HostCheck, Signal, min 2 for RXSTATS */
#ifdef AFS_PTHREAD_ENV
#include <pthread.h>
#define MISBKH 0x400000 /* mischained (BK) */
#define MISNH 0x800000 /* mischained (name) */
+#define VLDB_CHECK_NO_VLDB_CHECK_ERROR 0
+#define VLDB_CHECK_WARNING 1
+#define VLDB_CHECK_ERROR 2
+#define VLDB_CHECK_FATAL 4
#define vldbread(x,y,z) vldbio(x,y,z,0)
#define vldbwrite(x,y,z) vldbio(x,y,z,1)
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11.2.7 2008/10/27 23:54:11 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11.2.9 2009/02/17 14:34:41 shadow Exp $");
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define ADDR(x) (x/sizeof(struct nvlentry))
int fd;
-int listentries, listservers, listheader, listuheader, verbose;
+int listentries, listservers, listheader, listuheader, verbose, quiet;
int fix = 0;
int fixed = 0;
int passes = 0;
+/* if quiet, don't send anything to stdout */
+int quiet = 0;
+/* error level. 0 = no error, 1 = warning, 2 = error, 4 = fatal */
+int error_level = 0;
struct er {
long addr;
} *record;
int serveraddrs[MAXSERVERID + 2];
+/* Used to control what goes to stdout based on quiet flag */
+void
+quiet_println(const char *fmt,...) {
+ va_list args;
+ if (!quiet) {
+ va_start(args, fmt);
+ vfprintf(stdout, fmt, args);
+ va_end(args);
+ }
+}
+
+/* Used to set the error level and ship messages to stderr */
+void
+log_error(int eval, const char *fmt, ...)
+{
+ va_list args;
+ if (error_level < eval) error_level = eval ; /* bump up the severity */
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+
+ if (error_level == VLDB_CHECK_FATAL) exit(VLDB_CHECK_FATAL);
+}
+
+
#if 0
int
writeUbikHeader()
offset = lseek(fd, 0, 0);
if (offset != 0) {
- printf("error: lseek to 0 failed: %d %d\n", offset, errno);
- return (-1);
+ log_error(VLDB_CHECK_FATAL,"error: lseek to 0 failed: %d %d\n", offset, errno);
+ return (VLDB_CHECK_FATAL);
}
/* now read the info */
r = read(fd, &uheader, sizeof(uheader));
if (r != sizeof(uheader)) {
- printf("error: read of %d bytes failed: %d %d\n", sizeof(uheader), r,
+ log_error(VLDB_CHECK_FATAL,"error: read of %d bytes failed: %d %d\n", sizeof(uheader), r,
errno);
- return (-1);
+ return (VLDB_CHECK_FATAL);
}
uheader.magic = ntohl(uheader.magic);
uheader.version.counter = ntohl(uheader.version.counter);
if (listuheader) {
- printf("Ubik Header\n");
- printf(" Magic = 0x%x\n", uheader.magic);
- printf(" Size = %u\n", uheader.size);
- printf(" Version.epoch = %u\n", uheader.version.epoch);
- printf(" Version.counter = %u\n", uheader.version.counter);
+ quiet_println("Ubik Header\n");
+ quiet_println(" Magic = 0x%x\n", uheader.magic);
+ quiet_println(" Size = %u\n", uheader.size);
+ quiet_println(" Version.epoch = %u\n", uheader.version.epoch);
+ quiet_println(" Version.counter = %u\n", uheader.version.counter);
}
if (uheader.size != HDRSIZE)
- printf("Ubik header size is %u (should be %u)\n", uheader.size,
+ log_error(VLDB_CHECK_WARNING,"VLDB_CHECK_WARNING: Ubik header size is %u (should be %u)\n", uheader.size,
HDRSIZE);
if (uheader.magic != UBIK_MAGIC)
- printf("Ubik header magic is 0x%x (should be 0x%x)\n", uheader.magic,
+ log_error(VLDB_CHECK_ERROR,"Ubik header magic is 0x%x (should be 0x%x)\n", uheader.magic,
UBIK_MAGIC);
return (0);
p = position + HDRSIZE;
offset = lseek(fd, p, 0);
if (offset != p) {
- printf("error: lseek to %d failed: %d %d\n", p, offset, errno);
+ log_error(VLDB_CHECK_FATAL,"error: lseek to %d failed: %d %d\n", p, offset, errno);
return (-1);
}
r = read(fd, buffer, size);
if (r != size) {
- printf("error: %s of %d bytes failed: %d %d\n", rdwr==1?"write":"read",
+ log_error(VLDB_CHECK_FATAL,"error: %s of %d bytes failed: %d %d\n", rdwr==1?"write":"read",
size, r, errno);
return (-1);
}
{
int i, j;
- vldbread(0, headerp, sizeof(*headerp));
+ vldbread(0, (char *)headerp, sizeof(*headerp));
headerp->vital_header.vldbversion =
ntohl(headerp->vital_header.vldbversion);
headerp->VolidHash[i][j] = ntohl(headerp->VolidHash[i][j]);
if (listheader) {
- printf("vldb header\n");
- printf(" vldbversion = %u\n",
+ quiet_println("vldb header\n");
+ quiet_println(" vldbversion = %u\n",
headerp->vital_header.vldbversion);
- printf(" headersize = %u [actual=%u]\n",
+ quiet_println(" headersize = %u [actual=%u]\n",
headerp->vital_header.headersize, sizeof(*headerp));
- printf(" freePtr = 0x%x\n", headerp->vital_header.freePtr);
- printf(" eofPtr = %u\n", headerp->vital_header.eofPtr);
- printf(" allocblock calls = %10u\n", headerp->vital_header.allocs);
- printf(" freeblock calls = %10u\n", headerp->vital_header.frees);
- printf(" MaxVolumeId = %u\n",
+ quiet_println(" freePtr = 0x%x\n", headerp->vital_header.freePtr);
+ quiet_println(" eofPtr = %u\n", headerp->vital_header.eofPtr);
+ quiet_println(" allocblock calls = %10u\n", headerp->vital_header.allocs);
+ quiet_println(" freeblock calls = %10u\n", headerp->vital_header.frees);
+ quiet_println(" MaxVolumeId = %u\n",
headerp->vital_header.MaxVolumeId);
- printf(" rw vol entries = %u\n",
+ quiet_println(" rw vol entries = %u\n",
headerp->vital_header.totalEntries[0]);
- printf(" ro vol entries = %u\n",
+ quiet_println(" ro vol entries = %u\n",
headerp->vital_header.totalEntries[1]);
- printf(" bk vol entries = %u\n",
+ quiet_println(" bk vol entries = %u\n",
headerp->vital_header.totalEntries[2]);
- printf(" multihome info = 0x%x (%u)\n", headerp->SIT,
+ quiet_println(" multihome info = 0x%x (%u)\n", headerp->SIT,
headerp->SIT);
- printf(" server ip addr table: size = %d entries\n",
+ quiet_println(" server ip addr table: size = %d entries\n",
MAXSERVERID + 1);
- printf(" volume name hash table: size = %d buckets\n", HASHSIZE);
- printf(" volume id hash table: %d tables with %d buckets each\n",
+ quiet_println(" volume name hash table: size = %d buckets\n", HASHSIZE);
+ quiet_println(" volume id hash table: %d tables with %d buckets each\n",
MAXTYPES, HASHSIZE);
}
/* Check the header size */
if (headerp->vital_header.headersize != sizeof(*headerp))
- printf("Header reports its size as %d (should be %d)\n",
+ log_error(VLDB_CHECK_WARNING,"Header reports its size as %d (should be %d)\n",
headerp->vital_header.headersize, sizeof(*headerp));
return;
}
for (j = 0; j < HASHSIZE; j++)
headerp->VolidHash[i][j] = htonl(headerp->VolidHash[i][j]);
- vldbwrite(0, headerp, sizeof(*headerp));
+ vldbwrite(0, (char *)headerp, sizeof(*headerp));
}
void
int i, j;
struct extentaddr *e;
- vldbread(addr, mhblockP, VL_ADDREXTBLK_SIZE);
+ vldbread(addr, (char *)mhblockP, VL_ADDREXTBLK_SIZE);
mhblockP->ex_count = ntohl(mhblockP->ex_count);
mhblockP->ex_flags = ntohl(mhblockP->ex_flags);
{
int i;
- vldbread(addr, vlentryp, sizeof(*vlentryp));
+ vldbread(addr, (char *)vlentryp, sizeof(*vlentryp));
for (i = 0; i < MAXTYPES; i++)
vlentryp->volumeId[i] = ntohl(vlentryp->volumeId[i]);
}
if (listentries) {
- printf("address %u: ", addr);
+ quiet_println("address %u: ", addr);
if (vlentryp->flags == VLCONTBLOCK) {
- printf("mh extension block\n");
+ quiet_println("mh extension block\n");
} else if (vlentryp->flags == VLFREE) {
- printf("free vlentry\n");
+ quiet_println("free vlentry\n");
} else {
- printf("vlentry %s\n", vlentryp->name);
- printf(" rw id = %u ; ro id = %u ; bk id = %u\n",
+ quiet_println("vlentry %s\n", vlentryp->name);
+ quiet_println(" rw id = %u ; ro id = %u ; bk id = %u\n",
vlentryp->volumeId[0], vlentryp->volumeId[1],
vlentryp->volumeId[2]);
- printf(" flags =");
+ quiet_println(" flags =");
if (vlentryp->flags & VLF_RWEXISTS)
- printf(" rw");
+ quiet_println(" rw");
if (vlentryp->flags & VLF_ROEXISTS)
- printf(" ro");
+ quiet_println(" ro");
if (vlentryp->flags & VLF_BACKEXISTS)
- printf(" bk");
+ quiet_println(" bk");
if (vlentryp->flags & 0xffff8fff)
- printf(" errorflag(0x%x)", vlentryp->flags);
- printf("\n");
- printf(" LockAfsId = %d\n", vlentryp->LockAfsId);
- printf(" LockTimestamp = %d\n", vlentryp->LockTimestamp);
- printf(" cloneId = %u\n", vlentryp->cloneId);
- printf
+ quiet_println(" errorflag(0x%x)", vlentryp->flags);
+ quiet_println("\n");
+ quiet_println(" LockAfsId = %d\n", vlentryp->LockAfsId);
+ quiet_println(" LockTimestamp = %d\n", vlentryp->LockTimestamp);
+ quiet_println(" cloneId = %u\n", vlentryp->cloneId);
+ quiet_println
(" next hash for rw = %u ; ro = %u ; bk = %u ; name = %u\n",
vlentryp->nextIdHash[0], vlentryp->nextIdHash[1],
vlentryp->nextIdHash[2], vlentryp->nextNameHash);
for (i = 0; i < NMAXNSERVERS; i++) {
if (vlentryp->serverNumber[i] != 255) {
- printf(" server %d ; partition %d ; flags =",
+ quiet_println(" server %d ; partition %d ; flags =",
vlentryp->serverNumber[i],
vlentryp->serverPartition[i]);
if (vlentryp->serverFlags[i] & VLSF_RWVOL)
- printf(" rw");
+ quiet_println(" rw");
if (vlentryp->serverFlags[i] & VLSF_ROVOL)
- printf(" ro");
+ quiet_println(" ro");
if (vlentryp->serverFlags[i] & VLSF_BACKVOL)
- printf(" bk");
+ quiet_println(" bk");
if (vlentryp->serverFlags[i] & VLSF_NEWREPSITE)
- printf(" newro");
- printf("\n");
+ quiet_println(" newro");
+ quiet_println("\n");
}
}
}
{
int i;
- if (verbose)
- printf("Writing back entry at addr %u\n", addr);
+ if (verbose) quiet_println("Writing back entry at addr %u\n", addr);
fixed++;
for (i = 0; i < MAXTYPES; i++)
vlentryp->volumeId[i] = htonl(vlentryp->volumeId[i]);
vlentryp->serverPartition[i] = htonl(vlentryp->serverPartition[i]);
vlentryp->serverFlags[i] = htonl(vlentryp->serverFlags[i]);
}
- vldbwrite(addr, vlentryp, sizeof(*vlentryp));
+ vldbwrite(addr, (char *)vlentryp, sizeof(*vlentryp));
}
void
vldbread(addr, sitbuf, VL_ADDREXTBLK_SIZE);
extent = (struct extentaddr *)sitbuf;
- printf("multihome info block: base %d\n", base);
+ quiet_println("multihome info block: base %d\n", base);
if (base == 0) {
- printf(" count = %u\n", ntohl(extent->ex_count));
- printf(" flags = %u\n", ntohl(extent->ex_flags));
+ quiet_println(" count = %u\n", ntohl(extent->ex_count));
+ quiet_println(" flags = %u\n", ntohl(extent->ex_flags));
for (i = 0; i < VL_MAX_ADDREXTBLKS; i++) {
- printf(" contaddrs[%d] = %u\n", i,
+ quiet_println(" contaddrs[%d] = %u\n", i,
ntohl(extent->ex_contaddrs[i]));
}
}
if (j >= VL_MAX_ADDREXTBLKS)
continue;
- printf(" base %d index %d:\n", base, i);
+ quiet_println(" base %d index %d:\n", base, i);
- printf(" afsuuid = (%x %x %x /%d/%d/ /%x/%x/%x/%x/%x/%x/)\n",
+ quiet_println(" afsuuid = (%x %x %x /%d/%d/ /%x/%x/%x/%x/%x/%x/)\n",
ntohl(extent[i].ex_hostuuid.time_low),
ntohl(extent[i].ex_hostuuid.time_mid),
ntohl(extent[i].ex_hostuuid.time_hi_and_version),
ntohl(extent[i].ex_hostuuid.node[3]),
ntohl(extent[i].ex_hostuuid.node[4]),
ntohl(extent[i].ex_hostuuid.node[5]));
- printf(" uniquifier = %u\n", ntohl(extent[i].ex_uniquifier));
+ quiet_println(" uniquifier = %u\n", ntohl(extent[i].ex_uniquifier));
for (j = 0; j < VL_MAXIPADDRS_PERMH; j++) {
a = ntohl(extent[i].ex_addrs[j]);
if (a) {
- printf(" %d.%d.%d.%d\n", (a >> 24) & 0xff,
+ quiet_println(" %d.%d.%d.%d\n", (a >> 24) & 0xff,
(a >> 16) & 0xff, (a >> 8) & 0xff, (a) & 0xff);
}
}
afs_uint32 entrysize = 0;
afs_uint32 maxvolid = 0;
- if (verbose)
- printf("Read each entry in the database\n");
+ if (verbose) quiet_println("Read each entry in the database\n");
for (addr = header->vital_header.headersize;
addr < header->vital_header.eofPtr; addr += entrysize) {
readentry(addr, &vlentry, &type);
if (type == VL) {
if (!(vlentry.flags & VLF_RWEXISTS))
- printf("WARNING: VLDB entry '%s' has no RW volume\n",
+ log_error(VLDB_CHECK_WARNING,"VLDB_CHECK_WARNING: VLDB entry '%s' has no RW volume\n",
vlentry.name);
for (i = 0; i < MAXTYPES; i++)
continue;
}
if (e) {
- printf
- ("VLDB entry '%s' contains an unknown RW/RO index serverFlag\n",
+ log_error
+ (VLDB_CHECK_ERROR,"VLDB entry '%s' contains an unknown RW/RO index serverFlag\n",
vlentry.name);
e = 0;
}
- printf
+ quiet_println
(" index %d : serverNumber %d : serverPartition %d : serverFlag %d\n",
j, vlentry.serverNumber[j], vlentry.serverPartition[j],
vlentry.serverFlags[j]);
rindex = addr / sizeof(vlentry);
if (record[rindex].type) {
- printf("INTERNAL ERROR: record holder %d already in use\n",
+ log_error(VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: record holder %d already in use\n",
rindex);
return;
}
entrysize = VL_ADDREXTBLK_SIZE;
mhcount++;
} else {
- printf("Unknown entry at %u. Aborting\n", addr);
+ log_error(VLDB_CHECK_ERROR, "Unknown entry at %u. Aborting\n", addr);
break;
}
}
if (verbose) {
- printf("Found %d entries, %d free entries, %d multihomed blocks\n",
+ quiet_println("Found %d entries, %d free entries, %d multihomed blocks\n",
vlcount, freecount, mhcount);
- printf("Found %d RW volumes, %d BK volumes, %d RO volumes\n", rwcount,
+ quiet_println("Found %d RW volumes, %d BK volumes, %d RO volumes\n", rwcount,
bkcount, rocount);
}
/* Check the maxmimum volume id in the header */
if (maxvolid != header->vital_header.MaxVolumeId - 1)
- printf
+ quiet_println
("Header's maximum volume id is %u and largest id found in VLDB is %u\n",
header->vital_header.MaxVolumeId, maxvolid);
}
if (next < 1) {
switch(type & 0xf0) {
case RWH:
- if (vlentry.nextIdHash[0] != 0) {printf("bwoop\n");}
+ if (vlentry.nextIdHash[0] != 0) {quiet_println("bwoop\n");}
vlentry.nextIdHash[0] = new;
break;
case ROH:
- if (vlentry.nextIdHash[1] != 0) {printf("bwoop\n");}
+ if (vlentry.nextIdHash[1] != 0) {quiet_println("bwoop\n");}
vlentry.nextIdHash[1] = new;
break;
case BKH:
- if (vlentry.nextIdHash[2] != 0) {printf("bwoop\n");}
+ if (vlentry.nextIdHash[2] != 0) {quiet_println("bwoop\n");}
vlentry.nextIdHash[2] = new;
break;
case NH:
- if (vlentry.nextNameHash != 0) {printf("bwoop\n");}
+ if (vlentry.nextNameHash != 0) {quiet_println("bwoop\n");}
vlentry.nextNameHash = new;
break;
}
afs_int32 i, type, rindex;
/* Now follow the Name Hash Table */
- if (verbose)
- printf("Check Volume Name Hash\n");
+ if (verbose) quiet_println("Check Volume Name Hash\n");
for (i = 0; i < HASHSIZE; i++) {
chainlength = 0;
for (addr = header->VolnameHash[i]; addr; addr = vlentry.nextNameHash) {
readentry(addr, &vlentry, &type);
if (type != VL) {
- printf("Name Hash %d: Bad entry at %u: Not a valid vlentry\n",
+ log_error(VLDB_CHECK_ERROR,"Name Hash %d: Bad entry at %u: Not a valid vlentry\n",
i, addr);
continue;
}
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
- printf
- ("INTERNAL ERROR: addresses %u and %u use same record slot %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & NH) {
- printf
- ("Name Hash %d: Bad entry '%s': Already in the name hash\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Name Hash %d: Bad entry '%s': Already in the name hash\n",
i, vlentry.name);
record[rindex].type |= MULTN;
break;
/* Hash the name and check if in correct hash table */
if (NameHash(vlentry.name) != i) {
- printf
- ("Name Hash %d: Bad entry '%s': Incorrect name hash chain (should be in %d)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Name Hash %d: Bad entry '%s': Incorrect name hash chain (should be in %d)\n",
i, vlentry.name, NameHash(vlentry.name));
record[rindex].type |= MULTN;
}
shortest = chainlength;
}
if (verbose) {
- printf
+ quiet_println
("%d entries in name hash, longest is %d, shortest is %d, average length is %f\n",
count, longest, shortest, ((float)count / (float)HASHSIZE));
}
afs_int32 i, j, hash, type, rindex, ref, badref, badhash;
/* Now follow the RW, RO, and BK Hash Tables */
- if (verbose)
- printf("Check RW, RO, and BK id Hashes\n");
+ if (verbose) quiet_println("Check RW, RO, and BK id Hashes\n");
for (i = 0; i < MAXTYPES; i++) {
hash = ((i == 0) ? RWH : ((i == 1) ? ROH : BKH));
ref = ((i == 0) ? REFRW : ((i == 1) ? REFRO : REFBK));
addr = vlentry.nextIdHash[i]) {
readentry(addr, &vlentry, &type);
if (type != VL) {
- printf
- ("%s Id Hash %d: Bad entry at %u: Not a valid vlentry\n",
+ log_error
+ (VLDB_CHECK_ERROR,"%s Id Hash %d: Bad entry at %u: Not a valid vlentry\n",
vtype(i), j, addr);
continue;
}
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
- printf
- ("INTERNAL ERROR: addresses %u and %u use same record slot %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & hash) {
- printf
- ("%s Id Hash %d: Bad entry '%s': Already in the hash table\n",
+ log_error
+ (VLDB_CHECK_ERROR,"%s Id Hash %d: Bad entry '%s': Already in the hash table\n",
vtype(i), j, vlentry.name);
record[rindex].type |= badref;
break;
/* Hash the id and check if in correct hash table */
if (IdHash(vlentry.volumeId[i]) != j) {
- printf
- ("%s Id Hash %d: Bad entry '%s': Incorrect Id hash chain (should be in %d)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"%s Id Hash %d: Bad entry '%s': Incorrect Id hash chain (should be in %d)\n",
vtype(i), j, vlentry.name,
IdHash(vlentry.volumeId[i]));
record[rindex].type |= badhash;
shortest = chainlength;
}
if (verbose) {
- printf
+ quiet_println
("%d entries in %s hash, longest is %d, shortest is %d, average length is %f\n",
- count, vtype(i), longest, shortest,
- ((float)count / (float)HASHSIZE));
+ count, vtype(i), longest, shortest,((float)count / (float)HASHSIZE));
}
}
return;
afs_int32 type, rindex;
/* Now follow the Free Chain */
- if (verbose)
- printf("Check Volume Free Chain\n");
+ if (verbose) quiet_println("Check Volume Free Chain\n");
for (addr = header->vital_header.freePtr; addr;
addr = vlentry.nextIdHash[0]) {
readentry(addr, &vlentry, &type);
if (type != FR) {
- printf
- ("Free Chain %d: Bad entry at %u: Not a valid free vlentry (0x%x)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Free Chain %d: Bad entry at %u: Not a valid free vlentry (0x%x)\n",
count, addr, type);
continue;
}
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
- printf
- ("INTERNAL ERROR: addresses %u and %u use same record slot %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & FRC) {
- printf("Free Chain: Bad entry at %u: Already in the free chain\n",
+ log_error(VLDB_CHECK_ERROR,"Free Chain: Bad entry at %u: Already in the free chain\n",
addr);
break;
}
count++;
}
if (verbose)
- printf("%d entries on free chain\n", count);
+ quiet_println("%d entries on free chain\n", count);
return;
}
memset(&nulluuid, 0, sizeof(nulluuid));
if (verbose)
- printf("Check Multihomed blocks\n");
+ quiet_println("Check Multihomed blocks\n");
if (header->SIT) {
/* Read the first MH block and from it, gather the
*/
readMH(header->SIT, MHblock);
if (MHblock->ex_flags != VLCONTBLOCK) {
- printf
- ("Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
header->SIT);
}
}
if (header->SIT != caddrs[0]) {
- printf
- ("MH block does not point to self %u in header, %u in block\n",
+ log_error
+ (VLDB_CHECK_ERROR,"MH block does not point to self %u in header, %u in block\n",
header->SIT, caddrs[0]);
}
readMH(caddrs[i], MHblock);
if (MHblock->ex_flags != VLCONTBLOCK) {
- printf
- ("Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
header->SIT);
}
rindex = caddrs[i] / sizeof(vlentry);
if (record[rindex].addr != caddrs[i] && record[rindex].addr) {
- printf
- ("INTERNAL ERROR: addresses %u and %u use same record slot %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
record[rindex].addr, caddrs[i], rindex);
}
if (record[rindex].type & FRC) {
- printf
- ("MH Blocks Chain %d: Bad entry at %u: Already a MH block\n",
+ log_error
+ (VLDB_CHECK_ERROR,"MH Blocks Chain %d: Bad entry at %u: Already a MH block\n",
i, record[rindex].addr);
break;
}
if (memcmp(&e->ex_hostuuid, &nulluuid, sizeof(afsUUID)) == 0) {
if (ipindex != -1) {
- printf
- ("Server Addrs index %d references null MH block %d, index %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Server Addrs index %d references null MH block %d, index %d\n",
ipindex, i, j);
serveraddrs[ipindex] = 0; /* avoids printing 2nd error below */
}
if (ipaddrs) {
mhentries++;
if (ipindex == -1) {
- printf
- ("MH block %d, index %d: Not referenced by server addrs\n",
+ log_error
+ (VLDB_CHECK_ERROR,"MH block %d, index %d: Not referenced by server addrs\n",
i, j);
} else {
serveraddrs[ipindex] = ipaddrs; /* It is good */
}
if (listservers && ipaddrs) {
- printf("MH block %d, index %d:", i, j);
+ quiet_println("MH block %d, index %d:", i, j);
for (m = 0; m < VL_MAXIPADDRS_PERMH; m++) {
if (!e->ex_addrs[m])
continue;
- printf(" %d.%d.%d.%d",
+ quiet_println(" %d.%d.%d.%d",
(e->ex_addrs[m] & 0xff000000) >> 24,
(e->ex_addrs[m] & 0x00ff0000) >> 16,
(e->ex_addrs[m] & 0x0000ff00) >> 8,
(e->ex_addrs[m] & 0x000000ff));
}
- printf("\n");
+ quiet_println("\n");
}
}
/*
* if (mhentries != MHblock->ex_count) {
- * printf("MH blocks says it has %d entries (found %d)\n",
+ * quiet_println("MH blocks says it has %d entries (found %d)\n",
* MHblock->ex_count, mhentries);
* }
*/
}
}
if (verbose)
- printf("%d multihomed blocks\n", mhblocks);
+ quiet_println("%d multihomed blocks\n", mhblocks);
/* Check the server addresses */
if (verbose)
- printf("Check server addresses\n");
+ quiet_println("Check server addresses\n");
mhentries = regentries = 0;
for (i = 0; i <= MAXSERVERID; i++) {
if (header->IpMappedAddr[i]) {
mhentries++;
if (((header->IpMappedAddr[i] & 0x00ff0000) >> 16) >
VL_MAX_ADDREXTBLKS)
- printf
- ("IP Addr for entry %d: Multihome block is bad (%d)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"IP Addr for entry %d: Multihome block is bad (%d)\n",
i, ((header->IpMappedAddr[i] & 0x00ff0000) >> 16));
if (((header->IpMappedAddr[i] & 0x0000ffff) > VL_MHSRV_PERBLK)
|| ((header->IpMappedAddr[i] & 0x0000ffff) < 1))
- printf
- ("IP Addr for entry %d: Multihome index is bad (%d)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"IP Addr for entry %d: Multihome index is bad (%d)\n",
i, (header->IpMappedAddr[i] & 0x0000ffff));
if (serveraddrs[i] == -1) {
- printf
- ("warning: IP Addr for entry %d: Multihome entry has no ip addresses\n",
+ log_error
+ (VLDB_CHECK_WARNING,"warning: IP Addr for entry %d: Multihome entry has no ip addresses\n",
i);
serveraddrs[i] = 0;
}
if (listservers) {
- printf(" Server ip addr %d = MH block %d, index %d\n",
+ quiet_println(" Server ip addr %d = MH block %d, index %d\n",
i, (header->IpMappedAddr[i] & 0x00ff0000) >> 16,
(header->IpMappedAddr[i] & 0x0000ffff));
}
regentries++;
serveraddrs[i] = 1; /* It is good */
if (listservers) {
- printf(" Server ip addr %d = %d.%d.%d.%d\n", i,
+ quiet_println(" Server ip addr %d = %d.%d.%d.%d\n", i,
(header->IpMappedAddr[i] & 0xff000000) >> 24,
(header->IpMappedAddr[i] & 0x00ff0000) >> 16,
(header->IpMappedAddr[i] & 0x0000ff00) >> 8,
}
}
if (verbose) {
- printf("%d simple entries, %d multihomed entries, Total = %d\n",
+ quiet_println("%d simple entries, %d multihomed entries, Total = %d\n",
regentries, mhentries, mhentries + regentries);
}
return;
FixBad(afs_uint32 idx, afs_uint32 addr, afs_uint32 type, afs_uint32 tmp,
struct nvlentry *vlentry, afs_uint32 hash) {
SetHashEnd(addr, type, tmp);
- printf("linked unlinked chain %u (index %d) to end of chain %d for %s hash\n",
+ quiet_println("linked unlinked chain %u (index %d) to end of chain %d for %s hash\n",
tmp, ADDR(tmp), hash, type==NH?"Name":(type==RWH?"RW":(type==ROH?"RO":"BK")));
}
struct nvlentry vlentry, vlentry2;
int i, j, help = 0;
+ error_level = 0; /* start clean with no error status */
dbfile = as->parms[0].items->data; /* -database */
listuheader = (as->parms[1].items ? 1 : 0); /* -uheader */
listheader = (as->parms[2].items ? 1 : 0); /* -vheader */
listservers = (as->parms[3].items ? 1 : 0); /* -servers */
listentries = (as->parms[4].items ? 1 : 0); /* -entries */
verbose = (as->parms[5].items ? 1 : 0); /* -verbose */
- fix = (as->parms[6].items ? 1 : 0); /* -fix */
+ quiet = (as->parms[6].items ? 1 : 0); /* -quiet */
+ fix = (as->parms[7].items ? 1 : 0); /* -fix */
+
+ /* sanity check */
+ if (quiet && (verbose || listuheader || listheader ||listservers \
+ || listentries)) {
+ log_error(VLDB_CHECK_FATAL," -quiet cannot be used other display flags\n");
+ return VLDB_CHECK_FATAL;
+ }
restart:
/* open the vldb database file */
fd = open(dbfile, (fix > 0)?O_RDWR:O_RDONLY, 0);
if (fd < 0) {
- printf("can't open file '%s'. error = %d\n", dbfile, errno);
+ log_error(VLDB_CHECK_FATAL,"can't open file '%s'. error = %d\n", dbfile, errno);
return 0;
}
readUbikHeader();
readheader(&header);
if (header.vital_header.vldbversion < 3) {
- printf("does not support vldb with version less than 3\n");
- return 0;
+ log_error(VLDB_CHECK_FATAL,"does not support vldb with version less than 3\n");
+ return VLDB_CHECK_FATAL;
}
maxentries = (header.vital_header.eofPtr / sizeof(vlentry)) + 1;
* valid (the serveraddrs array).
*/
if (verbose)
- printf("Verify each volume entry\n");
+ quiet_println("Verify each volume entry\n");
for (i = 0; i < maxentries; i++) {
int nextp = 0;
int reft = 0;
readentry(record[i].addr, &vlentry, &type);
if (InvalidVolname(vlentry.name))
- printf("Volume '%s' at addr %u has an invalid name\n",
+ log_error(VLDB_CHECK_ERROR,"Volume '%s' at addr %u has an invalid name\n",
vlentry.name, record[i].addr);
if (!(record[i].type & NH)) {
}
if (foundbad) {
- printf("%d: Volume '%s' %snot found in %s hash %d", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Volume '%s' %snot found in %s hash %d", i,
vlentry.name, volidbuf, which, hash);
if (nextp) {
- printf(" (next %d", nextp);
+ log_error(VLDB_CHECK_ERROR," (next %d", nextp);
if (!(record[nextp].type & reft)) {
- printf(" not in chain ");
+ log_error(VLDB_CHECK_ERROR," not in chain ");
record[nextp].type |= reft;
} else if (nextp != 0) {
- printf(" next in chain");
+ log_error(VLDB_CHECK_ERROR," next in chain");
if (fix) {
- printf(", unchaining");
+ log_error(VLDB_CHECK_ERROR,", unchaining");
*nextpp = 0;
writeentry(record[i].addr, &vlentry);
}
}
- printf(")");
+ log_error(VLDB_CHECK_ERROR,")");
}
- printf("\n");
+ log_error(VLDB_CHECK_ERROR,"\n");
}
for (j = 0; j < NMAXNSERVERS; j++) {
if ((vlentry.serverNumber[j] != 255)
&& (serveraddrs[vlentry.serverNumber[j]] == 0)) {
- printf
- ("Volume '%s', index %d points to empty server entry %d\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Volume '%s', index %d points to empty server entry %d\n",
vlentry.name, j, vlentry.serverNumber[j]);
}
}
if (record[i].type & 0xffff0f00)
- printf
- ("Volume '%s' id %u also found on other chains (0x%x)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Volume '%s' id %u also found on other chains (0x%x)\n",
vlentry.name, vlentry.volumeId[0], record[i].type);
/* A free entry */
} else if (record[i].type & FR) {
if (!(record[i].type & FRC))
- printf("Free vlentry at %u not on free chain\n",
+ log_error(VLDB_CHECK_ERROR,"Free vlentry at %u not on free chain\n",
record[i].addr);
if (record[i].type & 0xfffffdf0)
- printf
- ("Free vlentry at %u also found on other chains (0x%x)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Free vlentry at %u also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
/* A multihomed entry */
} else if (record[i].type & MH) {
if (!(record[i].type & MHC))
- printf("Multihomed block at %u is orphaned\n",
+ log_error(VLDB_CHECK_ERROR,"Multihomed block at %u is orphaned\n",
record[i].addr);
if (record[i].type & 0xfffffef0)
- printf
- ("Multihomed block at %u also found on other chains (0x%x)\n",
+ log_error
+ (VLDB_CHECK_ERROR,"Multihomed block at %u also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
} else {
- printf("Unknown entry type at %u (0x%x)\n", record[i].addr,
+ log_error(VLDB_CHECK_ERROR,"Unknown entry type at %u (0x%x)\n", record[i].addr,
record[i].type);
}
}
- if (verbose)
- printf("Verify each chain head\n");
-
+ if (verbose) quiet_println("Verify each chain head\n");
{
afs_uint32 addr;
int hash;
}
}
for (i = 0; i <= 2; i++) {
- for (j = 0; j < HASHSIZE; j++) {
- addr = header.VolidHash[i][j];
+ for (j = 0, addr = header.VolidHash[i][j]; j < HASHSIZE; j++) {
+ if (verbose) quiet_println("got %d %d %d\n", i, j, ADDR(addr));
if (i == 0 && (record[ADDR(addr)].type & MULTRW)) {
hash = IdHash(vlentry.volumeId[i]);
if (hash != j) {
header.VolidHash[i][j] = vlentry.nextIdHash[i];
vlentry.nextIdHash[i] = 0;
- if (fix)
+ if (fix) {
+ quiet_println("fix %d %d %d\n", i, j, ADDR(addr));
writeentry(record[i].addr, &vlentry);
}
}
+ }
if (i == 1 && (record[ADDR(addr)].type & MULTRO)) {
hash = IdHash(vlentry.volumeId[i]);
if (hash != j) {
header.VolidHash[i][j] = vlentry.nextIdHash[i];
vlentry.nextIdHash[i] = 0;
- if (fix)
+ if (fix) {
+ quiet_println("fix %d %d %d\n", i, j, addr);
writeentry(record[i].addr, &vlentry);
}
}
+ }
if (i == 2 && (record[ADDR(addr)].type & MULTBK)) {
hash = IdHash(vlentry.volumeId[i]);
if (hash != j) {
header.VolidHash[i][j] = vlentry.nextIdHash[i];
vlentry.nextIdHash[i] = 0;
- if (fix)
+ if (fix) {
+ quiet_println("fix %d %d %d\n", i, j, addr);
writeentry(record[i].addr, &vlentry);
}
}
}
}
}
+ }
/* By the time we get here, unchained entries are really unchained */
- printf("Scanning %u entries for possible repairs\n", maxentries);
+ quiet_println("Scanning %u entries for possible repairs\n", maxentries);
for (i = 0; i < maxentries; i++) {
int *nextpp;
if (record[i].type & VL) {
readentry(record[i].addr, &vlentry, &type);
if (!(record[i].type & REFN)) {
- printf("%d: Record %u (type 0x%x) not in a name chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a name chain\n", i,
record[i].addr, record[i].type);
if (strlen(vlentry.name)>0) {
if (fix) {
}
}
if (vlentry.volumeId[0] && !(record[i].type & REFRW)) {
- printf("%d: Record %u (type 0x%x) not in a RW chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a RW chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[0][IdHash(vlentry.volumeId[0])] == 0)
}
}
if (vlentry.volumeId[1] && !(record[i].type & REFRO)) {
- printf("%d: Record %u (type 0x%x) not in a RO chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a RO chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[1][IdHash(vlentry.volumeId[1])] == 0)
}
}
if (vlentry.volumeId[2] && !(record[i].type & REFBK)) {
- printf("%d: Record %u (type 0x%x) not in a BK chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a BK chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[2][IdHash(vlentry.volumeId[2])] == 0)
else
return 1;
}
- return 0;
+ return error_level;
}
int
"Display server list");
cmd_AddParm(ts, "-entries", CMD_FLAG, CMD_OPTIONAL, "Display entries");
cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "verbose");
+ cmd_AddParm(ts, "-quiet", CMD_FLAG, CMD_OPTIONAL, "quiet");
cmd_AddParm(ts, "-fix", CMD_FLAG, CMD_OPTIONAL, "attempt to patch the database (potentially dangerous)");
return cmd_Dispatch(argc, argv);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.18.2.14 2008/10/18 15:10:57 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.18.2.16 2008/12/22 19:23:32 shadow Exp $");
#include <afs/stds.h>
#include <sys/types.h>
strcpy(rxi_tracename, argv[++index]);
} else if (strcmp(argv[index], "-auditlog") == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++index];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
} else if (strcmp(argv[index], "-enable_peer_stats") == 0) {
rx_enablePeerRPCStats();
} else if (strcmp(argv[index], "-enable_process_stats") == 0) {
ubik_CheckRXSecurityProc = afsconf_CheckAuth;
ubik_CheckRXSecurityRock = (char *)tdir;
code =
- ubik_ServerInitByInfo(myHost, htons(AFSCONF_VLDBPORT), &info, &clones,
+ ubik_ServerInitByInfo(myHost, htons(AFSCONF_VLDBPORT), &info, clones,
vl_dbaseName, &VL_dbase);
if (code) {
printf("vlserver: Ubik init failed with code %d\n", code);
#include <afs/afsutil.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/Attic/fssync.c,v 1.26.2.10 2008/04/01 20:05:47 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/Attic/fssync.c,v 1.26.2.12 2009/03/23 18:19:57 shadow Exp $");
#include <sys/types.h>
#include <stdio.h>
-#include <unistd.h>
#ifdef AFS_NT40_ENV
#include <winsock2.h>
#include <time.h>
#else
+#include <unistd.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
if (v)
v->volumeID = 0;
tvolName[0] = '/';
- sprintf(&tvolName[1], VFORMAT, command.volume);
+ sprintf(&tvolName[1], VFORMAT, afs_cast_uint32(command.volume));
vp = VAttachVolumeByName_r(&error, command.partName, tvolName,
V_VOLUPD);
Volume *vp;
tvolName[0] = '/';
- sprintf(&tvolName[1], VFORMAT, p[i].volumeID);
+ sprintf(&tvolName[1], VFORMAT, afs_cast_uint32(p[i].volumeID));
vp = VAttachVolumeByName_r(&error, p[i].partName, tvolName,
V_VOLUPD);
if (vp)
#include <string.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.13.2.7 2008/08/16 19:15:48 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.13.2.8 2009/03/23 18:19:57 shadow Exp $");
#ifndef AFS_NAMEI_ENV
#if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
memset(&specinos, 0, sizeof(specinos));
- (void)afs_snprintf(headername, sizeof headername, VFORMAT, volumeId);
+ (void)afs_snprintf(headername, sizeof headername, VFORMAT, afs_cast_uint32(volumeId));
(void)afs_snprintf(oldpath, sizeof oldpath, "%s/%s", pname, headername);
fd = open(oldpath, O_RDONLY);
if (fd < 0) {
}
#endif
- (void)afs_snprintf(headername, sizeof headername, VFORMAT, h.id);
+ (void)afs_snprintf(headername, sizeof headername, VFORMAT, afs_cast_uint32(h.id));
(void)afs_snprintf(newpath, sizeof newpath, "%s/%s", pname, headername);
fd = open(newpath, O_CREAT | O_EXCL | O_RDWR, 0644);
if (fd < 0) {
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.21.2.18 2008/10/10 14:43:02 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.21.2.19 2009/03/23 18:19:57 shadow Exp $");
#ifdef AFS_NAMEI_ENV
#include <stdio.h>
char headername[16];
afs_int32 error = 0;
- (void)afs_snprintf(headername, sizeof headername, VFORMAT, volumeId);
+ (void)afs_snprintf(headername, sizeof headername, VFORMAT, afs_cast_uint32(volumeId));
(void)afs_snprintf(oldpath, sizeof oldpath, "%s/%s", pname, headername);
fd = open(oldpath, O_RDONLY);
if (fd < 0) {
h.smallVnodeIndex_hi = h.id;
h.largeVnodeIndex_hi = h.id;
h.linkTable_hi = h.id;
- (void)afs_snprintf(headername, sizeof headername, VFORMAT, h.id);
+ (void)afs_snprintf(headername, sizeof headername, VFORMAT, afs_cast_uint32(h.id));
(void)afs_snprintf(newpath, sizeof newpath, "%s/%s", pname, headername);
fd = open(newpath, O_CREAT | O_EXCL | O_RDWR, 0644);
if (fd < 0) {
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.6 2007/12/28 22:16:51 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.7 2009/02/17 04:37:59 shadow Exp $");
#include <errno.h>
#include <stdio.h>
for (vnp = VnodeHashTable[i]; vnp; vnp = vnp->hashNext) {
if (vnp->volumePtr == vp) {
IH_REALLYCLOSE(vnp->handle);
+ IH_RELEASE(vnp->handle);
}
}
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/vol-info.c,v 1.18.2.5 2008/08/16 19:15:49 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/vol-info.c,v 1.18.2.6 2009/03/23 18:19:57 shadow Exp $");
#include <ctype.h>
#include <errno.h>
}
}
(void)afs_snprintf(name1, sizeof name1, VFORMAT,
- (unsigned long)volumeId);
+ afs_cast_uint32(volumeId));
if (dsizeOnly && !saveinodes)
printf
("Volume-Id\t Volsize Auxsize Inodesize AVolsize SizeDiff (VolName)\n");
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.41.2.19 2008/10/27 23:54:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.41.2.20 2009/03/23 18:19:57 shadow Exp $");
#include <stdlib.h>
#include <stdio.h>
|| (vsp->header.id == singleVolumeNumber
|| vsp->header.parent == singleVolumeNumber)) {
(void)afs_snprintf(nameShouldBe, sizeof nameShouldBe,
- VFORMAT, vsp->header.id);
+ VFORMAT, afs_cast_uint32(vsp->header.id));
if (singleVolumeNumber
&& vsp->header.id != singleVolumeNumber)
AskOffline(vsp->header.id);
if (isp->volSummary == NULL) {
char name[64];
- (void)afs_snprintf(name, sizeof name, VFORMAT, isp->volumeId);
+ (void)afs_snprintf(name, sizeof name, VFORMAT, afs_cast_uint32(isp->volumeId));
if (check) {
Log("No header file for volume %u\n", isp->volumeId);
return -1;
if (isp->volSummary->fileName) {
strcpy(name, isp->volSummary->fileName);
} else {
- (void)afs_snprintf(name, sizeof name, VFORMAT, isp->volumeId);
+ (void)afs_snprintf(name, sizeof name, VFORMAT, afs_cast_uint32(isp->volumeId));
isp->volSummary->fileName = ToString(name);
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.15 2008/10/28 00:54:49 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.16 2009/03/23 18:19:57 shadow Exp $");
#include <rx/xdr.h>
#include <afs/afsint.h>
*ec = 0;
name[0] = '/';
- (void)afs_snprintf(&name[1], (sizeof name) - 1, VFORMAT, volumeId);
+ (void)afs_snprintf(&name[1], (sizeof name) - 1, VFORMAT, afs_cast_uint32(volumeId));
for (dp = DiskPartitionList; dp; dp = dp->next) {
struct afs_stat status;
strcpy(path, VPartitionPath(dp));
VolumeExternalName(VolumeId volumeId)
{
static char name[VMAXPATHLEN];
- (void)afs_snprintf(name, sizeof name, VFORMAT, volumeId);
+ (void)afs_snprintf(name, sizeof name, VFORMAT, afs_cast_uint32(volumeId));
return name;
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/vutil.c,v 1.15.2.3 2008/09/04 18:17:23 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/vutil.c,v 1.15.2.4 2009/03/23 18:19:57 shadow Exp $");
#include <stdio.h>
#include <sys/types.h>
vol.stamp.magic = VOLUMEINFOMAGIC;
vol.stamp.version = VOLUMEINFOVERSION;
vol.destroyMe = DESTROY_ME;
- (void)afs_snprintf(headerName, sizeof headerName, VFORMAT, vol.id);
+ (void)afs_snprintf(headerName, sizeof headerName, VFORMAT, afs_cast_uint32(vol.id));
(void)afs_snprintf(volumePath, sizeof volumePath, "%s/%s",
VPartitionPath(partition), headerName);
fd = afs_open(volumePath, O_CREAT | O_EXCL | O_WRONLY, 0600);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/vol-dump.c,v 1.1.2.2 2008/08/16 19:15:49 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/vol-dump.c,v 1.1.2.4 2009/03/23 18:19:57 shadow Exp $");
#include <ctype.h>
#include <errno.h>
int verbose = 0;
/* Forward Declarations */
-void HandleVolume(struct DiskPartition64 *partP, char *name, char *filename);
+void HandleVolume(struct DiskPartition64 *partP, char *name, char *filename, int fromtime);
Volume *AttachVolume(struct DiskPartition64 *dp, char *volname,
register struct VolumeHeader *header);
static void DoMyVolDump(Volume * vp, struct DiskPartition64 *dp,
- char *dumpfile);
+ char *dumpfile, int fromtime);
#ifndef AFS_NT40_ENV
#include "AFS_component_version_number.c"
struct DiskPartition64 *partP = NULL;
char name1[128];
char tmpPartName[20];
+ int fromtime = 0;
+ afs_int32 code;
#ifndef AFS_NT40_ENV
fileName = ti->data;
if ((ti = as->parms[3].items))
verbose = 1;
+ if (as->parms[4].items && strcmp(as->parms[4].items->data, "0")) {
+ code = ktime_DateToInt32(as->parms[4].items->data, &fromtime);
+ if (code) {
+ fprintf(STDERR, "failed to parse date '%s' (error=%d))\n",
+ as->parms[4].items->data, code);
+ return code;
+ }
+ }
DInit(10);
exit(1);
}
- (void)afs_snprintf(name1, sizeof name1, VFORMAT, (unsigned long)volumeId);
- HandleVolume(partP, name1, fileName);
+ (void)afs_snprintf(name1, sizeof name1, VFORMAT, afs_cast_uint32(volumeId));
+ HandleVolume(partP, name1, fileName, fromtime);
return 0;
}
void
-HandleVolume(struct DiskPartition64 *dp, char *name, char *filename)
+HandleVolume(struct DiskPartition64 *dp, char *name, char *filename, int fromtime)
{
struct VolumeHeader header;
struct VolumeDiskHeader diskHeader;
exit(1);
}
- DoMyVolDump(vp, dp, filename);
+ DoMyVolDump(vp, dp, filename, fromtime);
}
cmd_AddParm(ts, "-file", CMD_LIST, CMD_OPTIONAL, "Dump filename");
cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL,
"Trace dump progress (very verbose)");
+ cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_OPTIONAL, "dump from time");
code = cmd_Dispatch(argc, argv);
return code;
}
static void
-DoMyVolDump(Volume * vp, struct DiskPartition64 *dp, char *dumpfile)
+DoMyVolDump(Volume * vp, struct DiskPartition64 *dp, char *dumpfile, int fromtime)
{
int code = 0;
- int fromtime = 0;
int dumpAllDirs = 0;
int dumpfd = 0;
if (dumpfile) {
unlink(dumpfile);
dumpfd =
- open(dumpfile, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR);
+ afs_open(dumpfile, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR);
if (dumpfd < 0) {
fprintf(stderr, "Failed to open dump file! Exiting.\n");
exit(1);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.15 2008/08/25 01:15:18 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.16 2008/12/17 18:16:28 shadow Exp $");
#include <sys/types.h>
#include <string.h>
lwps = MAXLWP;
}
} else if (strcmp(argv[code], "-auditlog") == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++code];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- osi_audit(VS_StartEvent, 0, AUD_END);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
+ osi_audit(VS_StartEvent, 0, AUD_END);
} else if (strcmp(argv[code], "-nojumbo") == 0) {
rxJumbograms = 0;
} else if (strcmp(argv[code], "-jumbo") == 0) {
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.17 2008/08/16 20:07:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.18 2009/03/23 18:19:57 shadow Exp $");
#include <stdio.h>
#include <sys/types.h>
if (asize < 18)
return -1;
/* It's better using the Generic VFORMAT since otherwise we have to make changes to too many places... The 14 char limitation in names hits us again in AIX; print in field of 9 digits (still 10 for the rest), right justified with 0 padding */
- (void)afs_snprintf(aname, asize, VFORMAT, (unsigned long)avol);
+ (void)afs_snprintf(aname, asize, VFORMAT, afs_cast_uint32(avol));
return 0;
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.27 2008/08/16 19:56:25 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.29 2009/03/23 18:19:57 shadow Exp $");
#include <sys/types.h>
#include <string.h>
*totalOK += 1;
} else {
fprintf(STDOUT, "Off-line");
- *totalNotOK++;
+ *totalNotOK += 1;
}
if (pntr->needsSalvaged == 1)
fprintf(STDOUT, "**needs salvage**");
qPut(&busyHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
} else {
*totalNotOK += 1;
qPut(¬okHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
}
fprintf(STDOUT, "\n");
} else { /* default listing */
qPut(&busyHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
} else {
*totalNotOK += 1;
qPut(¬okHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
}
}
}
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
fprintf(STDOUT, "\n");
} /*Long listing */
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Default listing */
} /*XDisplayFormat */
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "BUSY_VOL\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "COULD_NOT_ATTACH\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Long listing */
else {
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "VOLUME_BUSY\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "COULD_NOT_ATTACH_VOLUME\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Default listing */
} /*XDisplayFormat */
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (!quiet) {
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "BUSY_VOL\t%lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "COULD_NOT_ATTACH\t%lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (verbose) {
fprintf(STDOUT, "Fetching VLDB entry for %lu .. ",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
fflush(STDOUT);
}
vcode = VLDB_GetEntryByID(volid, -1, &entry);
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume number %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (vcode);
}
if (verbose)
if (code) {
fprintf(STDERR,
"Could not fetch the entry for volume number %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (code);
}
MapHostToNetwork(&entry);
if (code)
fprintf(STDERR,
"Could not update volume info fields for volume number %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (code);
}
}
MapPartIdIntoName(pnum, part);
fprintf(STDOUT, "Volume %lu created on partition %s of %s\n",
- (unsigned long)volid, part, as->parms[0].items->data);
+ afs_cast_uint32(volid), part, as->parms[0].items->data);
return 0;
}
if (code) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("", code);
return (code);
}
MapPartIdIntoName(partition, pname);
fprintf(STDOUT, "Volume %lu on partition %s server %s deleted\n",
- (unsigned long)volid, pname, hostutil_GetNameByINet(server));
+ afs_cast_uint32(volid), pname, hostutil_GetNameByINet(server));
return 0;
}
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
if (TESTM)
- fprintf(STDOUT, "volume %lu size %d\n", (unsigned long)volid,
+ fprintf(STDOUT, "volume %lu size %d\n", afs_cast_uint32(volid),
p->size);
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to move volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
exit(1);
}
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu moved from %s %s to %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
as->parms[3].items->data, toPartName);
return 0;
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to copy volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
exit(1);
}
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu copied from %s %s to %s on %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
tovolume, as->parms[4].items->data, toPartName);
return 0;
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
strcpy(toVolName, p->name);
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
}
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to copy volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
if (q) free(q);
exit(1);
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu shadowed from %s %s to %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
as->parms[3].items->data, toPartName);
return 0;
if (!code) {
fprintf(STDERR,
"FATAL ERROR: backup volume %lu exists on server %lu\n",
- (unsigned long)buvolid, (unsigned long)buserver);
+ afs_cast_uint32(buvolid), (unsigned long)buserver);
exit(1);
}
}
if (vol_elsewhere) {
fprintf(STDERR,
"%s volume %lu already exists on a different server/part; not allowed\n",
- readonly ? "RO" : "RW", (unsigned long)avolid);
+ readonly ? "RO" : "RW", afs_cast_uint32(avolid));
exit(1);
}
}
backupid = entry.volumeId[BACKVOL];
fprintf(STDERR,
"Warning: Entry for volume number %lu exists in VLDB (but we're zapping it anyway!)\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
if (zapbackupid) {
volintInfo *pntr = (volintInfo *) 0;
exit(1);
}
fprintf(STDOUT, "Backup Volume %lu deleted\n",
- (unsigned long)backupid);
+ afs_cast_uint32(backupid));
}
}
code = UV_VolumeZap(server, part, volid);
PrintDiagnostics("zap", code);
exit(1);
}
- fprintf(STDOUT, "Volume %lu deleted\n", (unsigned long)volid);
+ fprintf(STDOUT, "Volume %lu deleted\n", afs_cast_uint32(volid));
return 0;
}
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("", vcode);
return (vcode);
}
if (index == -1) {
fprintf(STDERR,
"RO volume is not found in VLDB entry for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (index == -1) {
fprintf(STDERR,
"RW Volume is not found in VLDB entry for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (volid == rentry->volumeId[RWVOL]) {
}
fprintf(STDERR,
"unexpected volume type for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (totalE)
fprintf(STDOUT,
"Could not lock %lu VLDB entries of %lu locked entries\n",
- (unsigned long)totalE, (unsigned long)nentries);
+ afs_cast_uint32(totalE), (unsigned long)nentries);
else {
if (as->parms[0].items) {
fprintf(STDOUT,
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("convertROtoRW", code);
return vcode;
}
if (code) {
fprintf(STDERR,
"Converting RO volume %lu to RW volume failed with code %d\n",
- (unsigned long)volid, code);
+ afs_cast_uint32(volid), code);
PrintError("convertROtoRW ", code);
return -1;
}