From a75274d87435e0a085fa3a48541acc98170f07df Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 31 Mar 2009 18:19:46 -0700 Subject: [PATCH] Imported Upstream version 1.4.9~pre2+dfsg1 --- Makefile-libafs.in | 7 + README | 2 +- acinclude.m4 | 36 +- config.guess | 67 +- configure | 920 +++++++++++++++++++++---- configure-libafs | 919 ++++++++++++++++++++---- configure-libafs.in | 10 +- configure.in | 12 +- doc/man-pages/README | 1 - doc/man-pages/man1/pts_membership.1 | 44 +- doc/man-pages/man1/vos.1 | 14 +- doc/man-pages/man1/vos_examine.1 | 18 +- doc/man-pages/man1/vos_setfields.1 | 332 +++++++++ doc/man-pages/man5/NetRestrict.5 | 7 +- doc/man-pages/man8/afsd.8 | 10 +- doc/man-pages/man8/fileserver.8 | 47 +- doc/man-pages/man8/salvager.8 | 16 +- doc/man-pages/man8/vldb_check.8 | 21 +- doc/man-pages/pod1/pts_membership.pod | 42 +- doc/man-pages/pod1/vos.pod | 12 + doc/man-pages/pod1/vos_examine.pod | 12 +- doc/man-pages/pod1/vos_setfields.pod | 142 ++++ doc/man-pages/pod5/NetRestrict.pod | 5 +- doc/man-pages/pod8/afsd.pod | 8 + doc/man-pages/pod8/fileserver.pod | 45 +- doc/man-pages/pod8/salvager.pod | 14 +- doc/man-pages/pod8/vldb_check.pod | 19 +- src/JAVA/libjafs/File.c | 1 + src/afs/FBSD/osi_vnodeops.c | 5 +- src/afs/LINUX/osi_cred.c | 30 +- src/afs/LINUX/osi_file.c | 14 +- src/afs/LINUX/osi_groups.c | 45 +- src/afs/LINUX/osi_machdep.h | 30 +- src/afs/LINUX/osi_module.c | 13 +- src/afs/LINUX/osi_probe.c | 4 +- src/afs/LINUX/osi_vfs.hin | 5 + src/afs/LINUX/osi_vfsops.c | 10 +- src/afs/LINUX/osi_vm.c | 12 +- src/afs/LINUX/osi_vnodeops.c | 18 +- src/afs/SOLARIS/osi_file.c | 69 +- src/afs/SOLARIS/osi_vnodeops.c | 4 +- src/afs/UKERNEL/afs_usrops.c | 54 +- src/afs/UKERNEL/afs_usrops.h | 8 +- src/afs/UKERNEL/sysincludes.h | 26 +- src/afs/VNOPS/afs_vnop_attrs.c | 25 +- src/afs/VNOPS/afs_vnop_create.c | 4 +- src/afs/afs.h | 58 +- src/afs/afs_call.c | 5 +- src/afs/afs_cbqueue.c | 4 +- src/afs/afs_daemons.c | 22 +- src/afs/afs_init.c | 14 +- src/afs/afs_nfsdisp.c | 178 ++--- src/afs/afs_osi.c | 9 +- src/afs/afs_pioctl.c | 24 +- src/afs/afs_prototypes.h | 3 +- src/afs/afs_trace.et | 4 +- src/afs/afs_vcache.c | 239 ++++--- src/afsd/afs.rc.linux | 2 +- src/afsd/afsd.c | 27 +- src/aklog/Makefile.in | 9 +- src/aklog/aklog_main.c | 27 +- src/audit/audit.c | 100 ++- src/audit/audit.h | 2 +- src/auth/ktc.c | 4 +- src/auth/userok.c | 46 +- src/bozo/bnode.c | 4 +- src/bozo/bosserver.c | 29 +- src/bucoord/ubik_db_if.c | 6 +- src/budb/server.c | 30 +- src/butc/afsxbsa.c | 2 + src/butc/dump.c | 9 +- src/cf/kerberos.m4 | 7 +- src/cf/linux-test1.m4 | 2 +- src/cf/linux-test4.m4 | 85 ++- src/cf/osconf.m4 | 16 +- src/cf/socklen.m4 | 18 + src/config/afs_args.h | 1 + src/config/afs_sysnames.h | 8 +- src/config/afsconfig.h.in | 68 ++ src/config/param.alpha_linux_22.h | 1 + src/config/param.alpha_linux_24.h | 1 + src/config/param.alpha_linux_26.h | 3 +- src/config/param.amd64_fbsd_70.h | 213 ++++++ src/config/param.amd64_fbsd_71.h | 216 ++++++ src/config/param.amd64_fbsd_80.h | 219 ++++++ src/config/param.amd64_linux24.h | 2 + src/config/param.amd64_linux26.h | 2 + src/config/param.arm_linux24.h | 1 + src/config/param.arm_linux26.h | 1 + src/config/param.hp_ux110.h | 1 + src/config/param.hp_ux11i.h | 1 + src/config/param.i386_fbsd_71.h | 214 ++++++ src/config/param.i386_fbsd_80.h | 3 + src/config/param.i386_linux22.h | 1 + src/config/param.i386_linux24.h | 2 + src/config/param.i386_linux26.h | 2 + src/config/param.i386_umlinux22.h | 1 + src/config/param.i386_umlinux24.h | 2 + src/config/param.i386_umlinux26.h | 2 + src/config/param.ia64_linux24.h | 2 + src/config/param.ia64_linux26.h | 2 + src/config/param.parisc_linux24.h | 2 + src/config/param.ppc64_linux24.h | 2 + src/config/param.ppc64_linux26.h | 2 + src/config/param.ppc_darwin_70.h | 1 - src/config/param.ppc_linux22.h | 1 + src/config/param.ppc_linux24.h | 2 + src/config/param.ppc_linux26.h | 2 + src/config/param.s390_linux22.h | 1 + src/config/param.s390_linux24.h | 2 + src/config/param.s390_linux26.h | 2 + src/config/param.s390x_linux24.h | 1 + src/config/param.s390x_linux26.h | 1 + src/config/param.sparc64_linux22.h | 1 + src/config/param.sparc64_linux24.h | 2 + src/config/param.sparc64_linux26.h | 2 + src/config/param.sparc_linux22.h | 1 + src/config/param.sparc_linux24.h | 2 + src/config/param.sun4x_510.h | 3 + src/config/param.sun4x_511.h | 3 + src/config/param.sun4x_58.h | 1 + src/config/param.sun4x_59.h | 1 + src/config/param.sunx86_510.h | 3 + src/config/param.sunx86_511.h | 3 + src/config/param.sunx86_58.h | 1 + src/config/param.sunx86_59.h | 1 + src/config/param.x86_darwin_100.h | 190 +++++ src/config/stds.h | 37 + src/config/venus.h | 4 +- src/fsint/afsint.xg | 10 +- src/gtx/windows.c | 4 +- src/kauth/kaserver.c | 31 +- src/libafs/MakefileProto.FBSD.in | 20 +- src/libafs/afs.x86_darwin_100.plist.in | 33 + src/libuafs/MakefileProto.FBSD.in | 4 +- src/lwp/process.amd64.s | 10 +- src/packaging/RedHat/mockbuild.pl | 32 +- src/packaging/RedHat/openafs-kmodtool | 5 + src/packaging/RedHat/openafs.spec.in | 14 +- src/pam/afs_util.c | 4 +- src/ptserver/pt_util.c | 5 +- src/ptserver/ptprocs.c | 59 +- src/ptserver/ptserver.c | 33 +- src/rx/rx.c | 9 +- src/rx/rx_prototypes.h | 4 + src/rx/rx_rdwr.c | 23 +- src/rxdebug/rxdumptrace.c | 103 +++ src/rxgen/rpc_main.c | 22 +- src/sys/pagsh.c | 4 +- src/tests/OpenAFS/Auth.pm | 2 +- src/tests/OpenAFS/vos.pm | 3 +- src/tests/OpenAFS/wrapper.pm | 2 +- src/tests/afs-newcell.pl | 3 +- src/tsm41/Makefile.in | 14 +- src/tsm41/aix_aklog.c | 5 +- src/ubik/recovery.c | 26 +- src/ubik/remote.c | 20 +- src/ubik/ubik.p.h | 2 +- src/update/client.c | 7 +- src/util/afsutil.h | 4 +- src/util/afsutil_prototypes.h | 3 +- src/util/dirpath.c | 4 +- src/util/dirpath.hin | 3 + src/util/dirpath_nt.h | 3 + src/util/get_krbrlm.c | 141 +++- src/util/test/dirpath_test.c | 4 +- src/venus/fs.c | 28 +- src/venus/livesys.c | 3 +- src/venus/twiddle.c | 3 +- src/venus/whatfid.c | 3 +- src/viced/afsfileprocs.c | 20 +- src/viced/callback.c | 69 +- src/viced/host.c | 220 +++++- src/viced/viced.c | 50 +- src/viced/viced.h | 2 +- src/vlserver/vldb_check.c | 406 ++++++----- src/vlserver/vlserver.c | 31 +- src/vol/fssync.c | 8 +- src/vol/listinodes.c | 6 +- src/vol/namei_ops.c | 6 +- src/vol/vnode.c | 3 +- src/vol/vol-info.c | 4 +- src/vol/vol-salvage.c | 8 +- src/vol/volume.c | 6 +- src/vol/vutil.c | 4 +- src/volser/vol-dump.c | 30 +- src/volser/volmain.c | 31 +- src/volser/volprocs.c | 4 +- src/volser/vos.c | 100 +-- 189 files changed, 5594 insertions(+), 1513 deletions(-) create mode 100644 doc/man-pages/man1/vos_setfields.1 create mode 100644 doc/man-pages/pod1/vos_setfields.pod create mode 100644 src/cf/socklen.m4 create mode 100644 src/config/param.amd64_fbsd_70.h create mode 100644 src/config/param.amd64_fbsd_71.h create mode 100644 src/config/param.amd64_fbsd_80.h create mode 100644 src/config/param.i386_fbsd_71.h create mode 100644 src/config/param.x86_darwin_100.h create mode 100644 src/libafs/afs.x86_darwin_100.plist.in create mode 100644 src/rxdebug/rxdumptrace.c diff --git a/Makefile-libafs.in b/Makefile-libafs.in index 64f78845b..8ef8abaf3 100644 --- a/Makefile-libafs.in +++ b/Makefile-libafs.in @@ -7,3 +7,10 @@ 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 diff --git a/README b/README index b3864724c..4d8d8d82b 100644 --- a/README +++ b/README @@ -231,7 +231,7 @@ G FreeBSD Notes 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. diff --git a/acinclude.m4 b/acinclude.m4 index 40205442b..9402d8592 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -41,7 +41,16 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } # 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 @@ -82,7 +91,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } #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` @@ -320,10 +329,14 @@ case $system in 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) @@ -354,6 +367,12 @@ else 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" @@ -378,11 +397,11 @@ else 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" ;; @@ -694,7 +713,10 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) 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 @@ -760,12 +782,14 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) 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 @@ -1302,7 +1326,7 @@ AC_HEADER_DIRENT 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) diff --git a/config.guess b/config.guess index 22906b339..f32079abd 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /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 @@ -56,8 +56,8 @@ version="\ 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." @@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 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 @@ -211,7 +212,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 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} @@ -329,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 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*:*) @@ -531,7 +532,7 @@ EOF 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 @@ -771,6 +772,8 @@ EOF 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 @@ -778,7 +781,7 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -788,12 +791,18 @@ EOF 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 ;; @@ -827,6 +836,16 @@ EOF 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:*:*) @@ -945,6 +964,9 @@ EOF 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 @@ -987,7 +1009,7 @@ EOF 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 @@ -1203,6 +1225,15 @@ EOF 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 ;; @@ -1453,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize 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 diff --git a/configure b/configure index 8e0ca30d7..812580f39 100755 --- a/configure +++ b/configure @@ -788,6 +788,7 @@ XLIBKVM XLIBS KRB5_CONFIG BUILD_KRB5 +MAKE_KRB5 KRB5CFLAGS KRB5LIBS HELPER_SPLINT @@ -2182,7 +2183,7 @@ fi # Define the identity of the package. PACKAGE=openafs - VERSION=1.4.8 + VERSION=1.4.9pre2 cat >>confdefs.h <<_ACEOF @@ -2330,10 +2331,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' 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 @@ -3558,6 +3559,7 @@ fi test -n "$PATH_CPP" && break done +test -n "$PATH_CPP" || PATH_CPP="${CC-cc} -E" # Make sure we can run config.sub. @@ -4650,47 +4652,6 @@ fi -#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 @@ -6215,11 +6176,16 @@ echo "${ECHO_T}ppc_darwin" >&6; } { 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 @@ -6254,6 +6220,12 @@ echo $ECHO_N "checking your AFS sysname... $ECHO_C" >&6; } 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" @@ -6278,11 +6250,11 @@ echo $ECHO_N "checking your AFS sysname... $ECHO_C" >&6; } 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" ;; @@ -7070,7 +7042,7 @@ 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_linux_kbuild_requires_extra_cflags=no else sed '/^ *+/d' conftest.err >&5 @@ -7184,7 +7156,7 @@ 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 : else sed '/^ *+/d' conftest.err >&5 @@ -7313,7 +7285,7 @@ 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_linux_exports_find_task_by_pid=yes else sed '/^ *+/d' conftest.err >&5 @@ -7438,7 +7410,7 @@ 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_linux_exports_proc_root_fs=yes else sed '/^ *+/d' conftest.err >&5 @@ -7562,7 +7534,7 @@ 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_linux_have_current_kernel_time=yes else sed '/^ *+/d' conftest.err >&5 @@ -7679,7 +7651,7 @@ 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_linux_write_begin=yes else sed '/^ *+/d' conftest.err >&5 @@ -7767,6 +7739,260 @@ _ACEOF 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 +#include + +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 +#include +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 +#include +#include + +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 +#include +#include +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 @@ -7806,7 +8032,7 @@ 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_linux_kmem_cache_init=yes else sed '/^ *+/d' conftest.err >&5 @@ -7874,12 +8100,129 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +#include + +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 +#include +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 @@ -7887,8 +8230,15 @@ 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; } @@ -7926,7 +8276,7 @@ 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_linux_have_kmem_cache_t=yes else sed '/^ *+/d' conftest.err >&5 @@ -8043,7 +8393,7 @@ 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_linux_kmem_cache_create_takes_dtor=yes else sed '/^ *+/d' conftest.err >&5 @@ -8160,7 +8510,7 @@ 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_linux_config_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8288,7 +8638,7 @@ 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_linux_completion_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8409,7 +8759,7 @@ 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_linux_semaphore_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8535,7 +8885,7 @@ 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_linux_defines_for_each_process=yes else sed '/^ *+/d' conftest.err >&5 @@ -8656,7 +9006,7 @@ 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_linux_defines_prev_task=yes else sed '/^ *+/d' conftest.err >&5 @@ -8776,7 +9126,7 @@ 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_linux_fs_struct_super_has_alloc_inode=yes else sed '/^ *+/d' conftest.err >&5 @@ -8895,7 +9245,7 @@ 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_linux_fs_struct_address_space_has_page_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -9014,7 +9364,7 @@ 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_linux_fs_struct_address_space_has_gfp_mask=yes else sed '/^ *+/d' conftest.err >&5 @@ -9133,7 +9483,7 @@ 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_linux_fs_struct_inode_has_i_alloc_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -9252,7 +9602,7 @@ 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_linux_fs_struct_inode_has_i_blkbits=yes else sed '/^ *+/d' conftest.err >&5 @@ -9378,7 +9728,7 @@ 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_linux_fs_struct_inode_has_i_blksize=yes else sed '/^ *+/d' conftest.err >&5 @@ -9497,7 +9847,7 @@ 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_linux_fs_struct_inode_has_i_truncate_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -9616,7 +9966,7 @@ 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_linux_fs_struct_inode_has_i_dirty_data_buffers=yes else sed '/^ *+/d' conftest.err >&5 @@ -9735,7 +10085,7 @@ 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_linux_fs_struct_inode_has_i_devices=yes else sed '/^ *+/d' conftest.err >&5 @@ -9854,7 +10204,7 @@ 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_linux_fs_struct_inode_has_i_mmap_shared=yes else sed '/^ *+/d' conftest.err >&5 @@ -9973,7 +10323,7 @@ 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_linux_fs_struct_inode_has_i_mutex=yes else sed '/^ *+/d' conftest.err >&5 @@ -10092,7 +10442,7 @@ 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_linux_fs_struct_inode_has_i_sb_list=yes else sed '/^ *+/d' conftest.err >&5 @@ -10211,7 +10561,7 @@ 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_linux_fs_struct_inode_has_i_security=yes else sed '/^ *+/d' conftest.err >&5 @@ -10330,7 +10680,7 @@ 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_linux_fs_struct_inode_has_inotify_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -10449,7 +10799,7 @@ 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_linux_fs_struct_inode_has_inotify_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -10570,7 +10920,7 @@ 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_linux_func_inode_setattr_returns_int=yes else sed '/^ *+/d' conftest.err >&5 @@ -10693,7 +11043,7 @@ 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_linux_func_write_inode_returns_int=yes else sed '/^ *+/d' conftest.err >&5 @@ -10817,7 +11167,7 @@ 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_linux_func_i_create_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -10942,7 +11292,7 @@ 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_linux_func_i_lookup_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11067,7 +11417,7 @@ 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_linux_func_i_permission_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11193,7 +11543,7 @@ 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_linux_func_i_put_link_takes_cookie=yes else sed '/^ *+/d' conftest.err >&5 @@ -11318,7 +11668,7 @@ 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_linux_func_d_revalidate_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11441,7 +11791,7 @@ 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_linux_func_f_flush_takes_fl_owner_t=yes else sed '/^ *+/d' conftest.err >&5 @@ -11566,7 +11916,7 @@ 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_linux_func_a_writepage_takes_writeback_control=yes else sed '/^ *+/d' conftest.err >&5 @@ -11689,7 +12039,7 @@ 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_linux_fs_struct_fop_has_flock=yes else sed '/^ *+/d' conftest.err >&5 @@ -11808,7 +12158,7 @@ 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_linux_fs_struct_fop_has_sendfile=yes else sed '/^ *+/d' conftest.err >&5 @@ -11928,7 +12278,7 @@ 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_linux_fs_struct_fop_has_splice=yes else sed '/^ *+/d' conftest.err >&5 @@ -12073,7 +12423,7 @@ 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_linux_kernel_posix_lock_file_wait_arg=yes else sed '/^ *+/d' conftest.err >&5 @@ -12264,7 +12614,7 @@ 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_linux_kernel_sock_create_v=yes else sed '/^ *+/d' conftest.err >&5 @@ -12383,7 +12733,7 @@ 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_linux_kernel_page_follow_link=yes else sed '/^ *+/d' conftest.err >&5 @@ -12503,7 +12853,7 @@ 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_linux_kernel_hlist_unhashed=yes else sed '/^ *+/d' conftest.err >&5 @@ -12621,7 +12971,7 @@ 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_linux_key_type_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -12773,7 +13123,7 @@ 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_linux_func_recalc_sigpending_takes_void=yes else sed '/^ *+/d' conftest.err >&5 @@ -12891,7 +13241,7 @@ 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_linux_sched_struct_task_struct_has_parent=yes else sed '/^ *+/d' conftest.err >&5 @@ -13010,7 +13360,7 @@ 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_linux_sched_struct_task_struct_has_real_parent=yes else sed '/^ *+/d' conftest.err >&5 @@ -13129,7 +13479,7 @@ 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_linux_sched_struct_task_struct_has_sig=yes else sed '/^ *+/d' conftest.err >&5 @@ -13248,7 +13598,7 @@ 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_linux_sched_struct_task_struct_has_sighand=yes else sed '/^ *+/d' conftest.err >&5 @@ -13367,7 +13717,7 @@ 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_linux_sched_struct_task_struct_has_sigmask_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -13486,7 +13836,7 @@ 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_linux_sched_struct_task_struct_has_rlim=yes else sed '/^ *+/d' conftest.err >&5 @@ -13605,7 +13955,7 @@ 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_linux_sched_struct_task_struct_has_signal_rlim=yes else sed '/^ *+/d' conftest.err >&5 @@ -13724,7 +14074,7 @@ 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_linux_sched_struct_task_struct_has_exit_state=yes else sed '/^ *+/d' conftest.err >&5 @@ -13843,7 +14193,7 @@ 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_linux_sched_struct_task_struct_has_tgid=yes else sed '/^ *+/d' conftest.err >&5 @@ -13962,7 +14312,7 @@ 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_linux_sched_struct_task_struct_has_todo=yes else sed '/^ *+/d' conftest.err >&5 @@ -14081,7 +14431,7 @@ 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_linux_sched_struct_task_struct_has_thread_info=yes else sed '/^ *+/d' conftest.err >&5 @@ -14203,7 +14553,7 @@ 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_linux_exports_tasklist_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -14324,7 +14674,7 @@ 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_linux_get_sb_has_struct_vfsmount=yes else sed '/^ *+/d' conftest.err >&5 @@ -14444,7 +14794,7 @@ 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_linux_statfs_takes_dentry=yes else sed '/^ *+/d' conftest.err >&5 @@ -14564,7 +14914,7 @@ 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_linux_freezer_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -14698,7 +15048,7 @@ 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_linux_func_refrigerator_takes_pf_freeze=yes else sed '/^ *+/d' conftest.err >&5 @@ -14830,7 +15180,7 @@ 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_linux_keyring_support=yes else sed '/^ *+/d' conftest.err >&5 @@ -14936,6 +15286,8 @@ echo $ECHO_N "checking if key_alloc() takes a struct task *... $ECHO_C" >&6; } 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 @@ -14961,14 +15313,15 @@ _ACEOF 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 @@ -14996,7 +15349,8 @@ cat >>conftest.$ac_ext <<_ACEOF 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; } @@ -15046,6 +15400,7 @@ 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_struct_task" >&5 @@ -15058,6 +15413,139 @@ _ACEOF 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 +#include +#include + + +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 +#include +#include + +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 @@ -15096,7 +15584,7 @@ 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_linux_do_sync_read=yes else sed '/^ *+/d' conftest.err >&5 @@ -15223,7 +15711,7 @@ 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_linux_generic_file_aio_read=yes else sed '/^ *+/d' conftest.err >&5 @@ -15353,7 +15841,7 @@ 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_linux_init_work_has_data=yes else sed '/^ *+/d' conftest.err >&5 @@ -15476,7 +15964,7 @@ 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_linux_register_sysctl_table_noflag=yes else sed '/^ *+/d' conftest.err >&5 @@ -15595,7 +16083,7 @@ 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_linux_sysctl_table_checking=no else sed '/^ *+/d' conftest.err >&5 @@ -15715,7 +16203,7 @@ 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_linux_have_iget=yes else sed '/^ *+/d' conftest.err >&5 @@ -15797,6 +16285,133 @@ fi { 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 +#include + +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 +#include +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 @@ -15834,7 +16449,7 @@ 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_linux_struct_nameidata_has_path=yes else sed '/^ *+/d' conftest.err >&5 @@ -15953,7 +16568,7 @@ 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_linux_exports_init_mm=yes else sed '/^ *+/d' conftest.err >&5 @@ -16072,7 +16687,7 @@ 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_linux_exports_sys_chdir=yes else sed '/^ *+/d' conftest.err >&5 @@ -16191,7 +16806,7 @@ 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_linux_exports_sys_close=yes else sed '/^ *+/d' conftest.err >&5 @@ -16310,7 +16925,7 @@ 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_linux_exports_sys_open=yes else sed '/^ *+/d' conftest.err >&5 @@ -16429,7 +17044,7 @@ 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_linux_exports_sys_wait4=yes else sed '/^ *+/d' conftest.err >&5 @@ -16547,7 +17162,7 @@ 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_linux_exports_rcu_read_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -16688,7 +17303,7 @@ 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_linux_config_smp=yes else sed '/^ *+/d' conftest.err >&5 @@ -16831,7 +17446,7 @@ 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_linux_exports_kallsyms_address=yes else sed '/^ *+/d' conftest.err >&5 @@ -16952,7 +17567,7 @@ 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_linux_exports_kallsyms_symbol=yes else sed '/^ *+/d' conftest.err >&5 @@ -17073,7 +17688,7 @@ 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_linux_exports_sys_call_table=yes else sed '/^ *+/d' conftest.err >&5 @@ -17194,7 +17809,7 @@ 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_linux_exports_ia32_sys_call_table=yes else sed '/^ *+/d' conftest.err >&5 @@ -20570,7 +21185,8 @@ done -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 @@ -23354,7 +23970,7 @@ case $AFS_SYSNAME in SHLIB_LINKER="ld -b" ;; - *fbsd_*) + i386_fbsd_*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-pthread" @@ -23366,6 +23982,18 @@ case $AFS_SYSNAME in 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 ' @@ -23594,7 +24222,7 @@ case $AFS_SYSNAME in ;; 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= @@ -24451,7 +25079,7 @@ if test "${with_krb5+set}" = set; then 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;} @@ -24469,10 +25097,12 @@ echo "$as_me: WARNING: KRB5LIBS is not set" >&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" @@ -25485,6 +26115,7 @@ fi + TOP_SRCDIR="${srcdir}/src" case $TOP_SRCDIR in /*) @@ -26496,10 +27127,10 @@ XLIBKVM!$XLIBKVM$ac_delim 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 @@ -26541,11 +27172,12 @@ _ACEOF 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 diff --git a/configure-libafs b/configure-libafs index 68793c092..e6b68539e 100755 --- a/configure-libafs +++ b/configure-libafs @@ -787,6 +787,7 @@ XLIBKVM XLIBS KRB5_CONFIG BUILD_KRB5 +MAKE_KRB5 KRB5CFLAGS KRB5LIBS HELPER_SPLINT @@ -2181,7 +2182,7 @@ fi # Define the identity of the package. PACKAGE=openafs-libafs - VERSION=1.4.8 + VERSION=1.4.9pre2 cat >>confdefs.h <<_ACEOF @@ -2329,10 +2330,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' 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 @@ -4603,47 +4604,6 @@ fi -#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 @@ -6168,11 +6128,16 @@ echo "${ECHO_T}ppc_darwin" >&6; } { 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 @@ -6207,6 +6172,12 @@ echo $ECHO_N "checking your AFS sysname... $ECHO_C" >&6; } 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" @@ -6231,11 +6202,11 @@ echo $ECHO_N "checking your AFS sysname... $ECHO_C" >&6; } 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" ;; @@ -7022,7 +6993,7 @@ 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_linux_kbuild_requires_extra_cflags=no else sed '/^ *+/d' conftest.err >&5 @@ -7136,7 +7107,7 @@ 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 : else sed '/^ *+/d' conftest.err >&5 @@ -7265,7 +7236,7 @@ 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_linux_exports_find_task_by_pid=yes else sed '/^ *+/d' conftest.err >&5 @@ -7390,7 +7361,7 @@ 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_linux_exports_proc_root_fs=yes else sed '/^ *+/d' conftest.err >&5 @@ -7514,7 +7485,7 @@ 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_linux_have_current_kernel_time=yes else sed '/^ *+/d' conftest.err >&5 @@ -7631,7 +7602,7 @@ 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_linux_write_begin=yes else sed '/^ *+/d' conftest.err >&5 @@ -7719,6 +7690,260 @@ _ACEOF 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 +#include + +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 +#include +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 +#include +#include + +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 +#include +#include +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 @@ -7758,7 +7983,7 @@ 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_linux_kmem_cache_init=yes else sed '/^ *+/d' conftest.err >&5 @@ -7826,12 +8051,129 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +#include + +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 +#include +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 @@ -7839,8 +8181,15 @@ 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; } @@ -7878,7 +8227,7 @@ 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_linux_have_kmem_cache_t=yes else sed '/^ *+/d' conftest.err >&5 @@ -7995,7 +8344,7 @@ 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_linux_kmem_cache_create_takes_dtor=yes else sed '/^ *+/d' conftest.err >&5 @@ -8112,7 +8461,7 @@ 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_linux_config_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8240,7 +8589,7 @@ 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_linux_completion_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8361,7 +8710,7 @@ 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_linux_semaphore_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -8487,7 +8836,7 @@ 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_linux_defines_for_each_process=yes else sed '/^ *+/d' conftest.err >&5 @@ -8608,7 +8957,7 @@ 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_linux_defines_prev_task=yes else sed '/^ *+/d' conftest.err >&5 @@ -8728,7 +9077,7 @@ 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_linux_fs_struct_super_has_alloc_inode=yes else sed '/^ *+/d' conftest.err >&5 @@ -8847,7 +9196,7 @@ 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_linux_fs_struct_address_space_has_page_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -8966,7 +9315,7 @@ 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_linux_fs_struct_address_space_has_gfp_mask=yes else sed '/^ *+/d' conftest.err >&5 @@ -9085,7 +9434,7 @@ 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_linux_fs_struct_inode_has_i_alloc_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -9204,7 +9553,7 @@ 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_linux_fs_struct_inode_has_i_blkbits=yes else sed '/^ *+/d' conftest.err >&5 @@ -9330,7 +9679,7 @@ 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_linux_fs_struct_inode_has_i_blksize=yes else sed '/^ *+/d' conftest.err >&5 @@ -9449,7 +9798,7 @@ 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_linux_fs_struct_inode_has_i_truncate_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -9568,7 +9917,7 @@ 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_linux_fs_struct_inode_has_i_dirty_data_buffers=yes else sed '/^ *+/d' conftest.err >&5 @@ -9687,7 +10036,7 @@ 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_linux_fs_struct_inode_has_i_devices=yes else sed '/^ *+/d' conftest.err >&5 @@ -9806,7 +10155,7 @@ 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_linux_fs_struct_inode_has_i_mmap_shared=yes else sed '/^ *+/d' conftest.err >&5 @@ -9925,7 +10274,7 @@ 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_linux_fs_struct_inode_has_i_mutex=yes else sed '/^ *+/d' conftest.err >&5 @@ -10044,7 +10393,7 @@ 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_linux_fs_struct_inode_has_i_sb_list=yes else sed '/^ *+/d' conftest.err >&5 @@ -10163,7 +10512,7 @@ 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_linux_fs_struct_inode_has_i_security=yes else sed '/^ *+/d' conftest.err >&5 @@ -10282,7 +10631,7 @@ 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_linux_fs_struct_inode_has_inotify_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -10401,7 +10750,7 @@ 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_linux_fs_struct_inode_has_inotify_sem=yes else sed '/^ *+/d' conftest.err >&5 @@ -10522,7 +10871,7 @@ 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_linux_func_inode_setattr_returns_int=yes else sed '/^ *+/d' conftest.err >&5 @@ -10645,7 +10994,7 @@ 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_linux_func_write_inode_returns_int=yes else sed '/^ *+/d' conftest.err >&5 @@ -10769,7 +11118,7 @@ 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_linux_func_i_create_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -10894,7 +11243,7 @@ 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_linux_func_i_lookup_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11019,7 +11368,7 @@ 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_linux_func_i_permission_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11145,7 +11494,7 @@ 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_linux_func_i_put_link_takes_cookie=yes else sed '/^ *+/d' conftest.err >&5 @@ -11270,7 +11619,7 @@ 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_linux_func_d_revalidate_takes_nameidata=yes else sed '/^ *+/d' conftest.err >&5 @@ -11393,7 +11742,7 @@ 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_linux_func_f_flush_takes_fl_owner_t=yes else sed '/^ *+/d' conftest.err >&5 @@ -11518,7 +11867,7 @@ 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_linux_func_a_writepage_takes_writeback_control=yes else sed '/^ *+/d' conftest.err >&5 @@ -11641,7 +11990,7 @@ 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_linux_fs_struct_fop_has_flock=yes else sed '/^ *+/d' conftest.err >&5 @@ -11760,7 +12109,7 @@ 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_linux_fs_struct_fop_has_sendfile=yes else sed '/^ *+/d' conftest.err >&5 @@ -11880,7 +12229,7 @@ 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_linux_fs_struct_fop_has_splice=yes else sed '/^ *+/d' conftest.err >&5 @@ -12025,7 +12374,7 @@ 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_linux_kernel_posix_lock_file_wait_arg=yes else sed '/^ *+/d' conftest.err >&5 @@ -12216,7 +12565,7 @@ 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_linux_kernel_sock_create_v=yes else sed '/^ *+/d' conftest.err >&5 @@ -12335,7 +12684,7 @@ 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_linux_kernel_page_follow_link=yes else sed '/^ *+/d' conftest.err >&5 @@ -12455,7 +12804,7 @@ 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_linux_kernel_hlist_unhashed=yes else sed '/^ *+/d' conftest.err >&5 @@ -12573,7 +12922,7 @@ 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_linux_key_type_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -12725,7 +13074,7 @@ 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_linux_func_recalc_sigpending_takes_void=yes else sed '/^ *+/d' conftest.err >&5 @@ -12843,7 +13192,7 @@ 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_linux_sched_struct_task_struct_has_parent=yes else sed '/^ *+/d' conftest.err >&5 @@ -12962,7 +13311,7 @@ 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_linux_sched_struct_task_struct_has_real_parent=yes else sed '/^ *+/d' conftest.err >&5 @@ -13081,7 +13430,7 @@ 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_linux_sched_struct_task_struct_has_sig=yes else sed '/^ *+/d' conftest.err >&5 @@ -13200,7 +13549,7 @@ 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_linux_sched_struct_task_struct_has_sighand=yes else sed '/^ *+/d' conftest.err >&5 @@ -13319,7 +13668,7 @@ 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_linux_sched_struct_task_struct_has_sigmask_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -13438,7 +13787,7 @@ 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_linux_sched_struct_task_struct_has_rlim=yes else sed '/^ *+/d' conftest.err >&5 @@ -13557,7 +13906,7 @@ 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_linux_sched_struct_task_struct_has_signal_rlim=yes else sed '/^ *+/d' conftest.err >&5 @@ -13676,7 +14025,7 @@ 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_linux_sched_struct_task_struct_has_exit_state=yes else sed '/^ *+/d' conftest.err >&5 @@ -13795,7 +14144,7 @@ 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_linux_sched_struct_task_struct_has_tgid=yes else sed '/^ *+/d' conftest.err >&5 @@ -13914,7 +14263,7 @@ 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_linux_sched_struct_task_struct_has_todo=yes else sed '/^ *+/d' conftest.err >&5 @@ -14033,7 +14382,7 @@ 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_linux_sched_struct_task_struct_has_thread_info=yes else sed '/^ *+/d' conftest.err >&5 @@ -14155,7 +14504,7 @@ 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_linux_exports_tasklist_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -14276,7 +14625,7 @@ 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_linux_get_sb_has_struct_vfsmount=yes else sed '/^ *+/d' conftest.err >&5 @@ -14396,7 +14745,7 @@ 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_linux_statfs_takes_dentry=yes else sed '/^ *+/d' conftest.err >&5 @@ -14516,7 +14865,7 @@ 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_linux_freezer_h_exists=yes else sed '/^ *+/d' conftest.err >&5 @@ -14650,7 +14999,7 @@ 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_linux_func_refrigerator_takes_pf_freeze=yes else sed '/^ *+/d' conftest.err >&5 @@ -14782,7 +15131,7 @@ 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_linux_keyring_support=yes else sed '/^ *+/d' conftest.err >&5 @@ -14888,6 +15237,8 @@ echo $ECHO_N "checking if key_alloc() takes a struct task *... $ECHO_C" >&6; } 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 @@ -14913,14 +15264,15 @@ _ACEOF 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 @@ -14948,7 +15300,8 @@ cat >>conftest.$ac_ext <<_ACEOF 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; } @@ -14998,6 +15351,7 @@ 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_struct_task" >&5 @@ -15010,6 +15364,139 @@ _ACEOF 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 +#include +#include + + +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 +#include +#include + +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 @@ -15048,7 +15535,7 @@ 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_linux_do_sync_read=yes else sed '/^ *+/d' conftest.err >&5 @@ -15175,7 +15662,7 @@ 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_linux_generic_file_aio_read=yes else sed '/^ *+/d' conftest.err >&5 @@ -15305,7 +15792,7 @@ 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_linux_init_work_has_data=yes else sed '/^ *+/d' conftest.err >&5 @@ -15428,7 +15915,7 @@ 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_linux_register_sysctl_table_noflag=yes else sed '/^ *+/d' conftest.err >&5 @@ -15547,7 +16034,7 @@ 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_linux_sysctl_table_checking=no else sed '/^ *+/d' conftest.err >&5 @@ -15667,7 +16154,7 @@ 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_linux_have_iget=yes else sed '/^ *+/d' conftest.err >&5 @@ -15749,6 +16236,133 @@ fi { 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 +#include + +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 +#include +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 @@ -15786,7 +16400,7 @@ 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_linux_struct_nameidata_has_path=yes else sed '/^ *+/d' conftest.err >&5 @@ -15905,7 +16519,7 @@ 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_linux_exports_init_mm=yes else sed '/^ *+/d' conftest.err >&5 @@ -16024,7 +16638,7 @@ 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_linux_exports_sys_chdir=yes else sed '/^ *+/d' conftest.err >&5 @@ -16143,7 +16757,7 @@ 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_linux_exports_sys_close=yes else sed '/^ *+/d' conftest.err >&5 @@ -16262,7 +16876,7 @@ 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_linux_exports_sys_open=yes else sed '/^ *+/d' conftest.err >&5 @@ -16381,7 +16995,7 @@ 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_linux_exports_sys_wait4=yes else sed '/^ *+/d' conftest.err >&5 @@ -16499,7 +17113,7 @@ 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_linux_exports_rcu_read_lock=yes else sed '/^ *+/d' conftest.err >&5 @@ -16640,7 +17254,7 @@ 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_linux_config_smp=yes else sed '/^ *+/d' conftest.err >&5 @@ -16783,7 +17397,7 @@ 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_linux_exports_kallsyms_address=yes else sed '/^ *+/d' conftest.err >&5 @@ -16904,7 +17518,7 @@ 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_linux_exports_kallsyms_symbol=yes else sed '/^ *+/d' conftest.err >&5 @@ -17025,7 +17639,7 @@ 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_linux_exports_sys_call_table=yes else sed '/^ *+/d' conftest.err >&5 @@ -17146,7 +17760,7 @@ 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_linux_exports_ia32_sys_call_table=yes else sed '/^ *+/d' conftest.err >&5 @@ -20522,7 +21136,8 @@ done -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 @@ -23306,7 +23921,7 @@ case $AFS_SYSNAME in SHLIB_LINKER="ld -b" ;; - *fbsd_*) + i386_fbsd_*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-pthread" @@ -23318,6 +23933,18 @@ case $AFS_SYSNAME in 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 ' @@ -23546,7 +24173,7 @@ case $AFS_SYSNAME in ;; 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= @@ -24403,7 +25030,7 @@ if test "${with_krb5+set}" = set; then 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;} @@ -24421,10 +25048,12 @@ echo "$as_me: WARNING: KRB5LIBS is not set" >&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" @@ -25437,6 +26066,7 @@ fi + TOP_SRCDIR="${srcdir}/src" case $TOP_SRCDIR in /*) @@ -26326,11 +26956,11 @@ XLIBKVM!$XLIBKVM$ac_delim 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 @@ -26372,10 +27002,11 @@ _ACEOF 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 diff --git a/configure-libafs.in b/configure-libafs.in index 16cdd4a07..8c50833f5 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -1,10 +1,10 @@ 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) diff --git a/configure.in b/configure.in index 532ac52b2..75b37f512 100644 --- a/configure.in +++ b/configure.in @@ -1,17 +1,17 @@ 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 diff --git a/doc/man-pages/README b/doc/man-pages/README index 0f86c651e..546c1ac97 100644 --- a/doc/man-pages/README +++ b/doc/man-pages/README @@ -247,7 +247,6 @@ Known Problems restorevol rmtsysd tokens.krb - vos setfields vsys * Add -noresolve to the documentation of all the vos commands. diff --git a/doc/man-pages/man1/pts_membership.1 b/doc/man-pages/man1/pts_membership.1 index 331a9b0eb..e2d82f359 100644 --- a/doc/man-pages/man1/pts_membership.1 +++ b/doc/man-pages/man1/pts_membership.1 @@ -93,7 +93,7 @@ .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 @@ -212,7 +212,7 @@ It is not possible to list the members of the system:anyuser or 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 @@ -272,31 +272,27 @@ non-administrative user to obtain this listing. \& 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, @@ -346,12 +342,6 @@ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .IX Item "\(bu" -.IX Item "\(bu" - -.IX Item "\(bu" - -.IX Item "\(bu" - .IX Header "SEE ALSO" .IX Header "COPYRIGHT" diff --git a/doc/man-pages/man1/vos.1 b/doc/man-pages/man1/vos.1 index 524b32902..ea31d104b 100644 --- a/doc/man-pages/man1/vos.1 +++ b/doc/man-pages/man1/vos.1 @@ -93,7 +93,7 @@ .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 @@ -252,6 +252,8 @@ Commands to lock and unlock \s-1VLDB\s0 entries: \fBvos lock\fR, \fBvos unlock\f .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) @@ -354,6 +356,11 @@ command is issued. .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 @@ -397,6 +404,7 @@ the \fIvos_remove(1)\fR manpage, 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, @@ -442,6 +450,8 @@ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .IX Item "\(bu" +.IX Item "\(bu" + .IX Header "CAUTIONS" .IX Header "OPTIONS" @@ -462,6 +472,8 @@ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .IX Item "\fB\-server\fR <\fImachine name\fR>" +.IX Item "\fB\-noresolve\fR" + .IX Item "\fB\-verbose\fR" .IX Header "PRIVILEGE REQUIRED" diff --git a/doc/man-pages/man1/vos_examine.1 b/doc/man-pages/man1/vos_examine.1 index dec7dac9b..305336508 100644 --- a/doc/man-pages/man1/vos_examine.1 +++ b/doc/man-pages/man1/vos_examine.1 @@ -93,7 +93,7 @@ .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 @@ -294,7 +294,13 @@ expressed in kilobyte blocks in the \f(CWMaxQuota\fR field. .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 @@ -377,13 +383,14 @@ The following example shows output for the ABC Corporation volume called \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 @@ -396,13 +403,14 @@ shows the volume as locked. 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 @@ -529,6 +537,8 @@ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .IX Item "\(bu" +.IX Item "\(bu" + .IX Item "Not released" .IX Item "Old release" diff --git a/doc/man-pages/man1/vos_setfields.1 b/doc/man-pages/man1/vos_setfields.1 new file mode 100644 index 000000000..1563a28f7 --- /dev/null +++ b/doc/man-pages/man1/vos_setfields.1 @@ -0,0 +1,332 @@ +.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 +.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" + diff --git a/doc/man-pages/man5/NetRestrict.5 b/doc/man-pages/man5/NetRestrict.5 index f6fabf615..4874fccad 100644 --- a/doc/man-pages/man5/NetRestrict.5 +++ b/doc/man-pages/man5/NetRestrict.5 @@ -93,7 +93,7 @@ .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 @@ -243,10 +243,7 @@ the peer processes on other database machines in the cell. .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. diff --git a/doc/man-pages/man8/afsd.8 b/doc/man-pages/man8/afsd.8 index 2c3de8581..eefccf66d 100644 --- a/doc/man-pages/man8/afsd.8 +++ b/doc/man-pages/man8/afsd.8 @@ -93,7 +93,7 @@ .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 @@ -212,6 +212,7 @@ afsd \- Initializes the Cache Manager and starts related daemons [\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" @@ -683,6 +684,11 @@ standard output stream. .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 @@ -874,6 +880,8 @@ Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .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" diff --git a/doc/man-pages/man8/fileserver.8 b/doc/man-pages/man8/fileserver.8 index 0d3835919..c3915cece 100644 --- a/doc/man-pages/man8/fileserver.8 +++ b/doc/man-pages/man8/fileserver.8 @@ -93,7 +93,7 @@ .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 @@ -323,13 +323,13 @@ effective. To change this frequency, use the \fB\-hr\fR argument. .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: @@ -356,21 +356,18 @@ and \fB\-lock\fR options, appear in the output generated by the \fB\-help\fR 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 @@ -390,8 +387,8 @@ the number specified (but if this argument specifies the maximum possible 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 diff --git a/doc/man-pages/man8/salvager.8 b/doc/man-pages/man8/salvager.8 index 49b373386..157e40f60 100644 --- a/doc/man-pages/man8/salvager.8 +++ b/doc/man-pages/man8/salvager.8 @@ -93,7 +93,7 @@ .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 @@ -262,11 +262,13 @@ Salvager by default salvages them serially to avoid the inefficiency of 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, @@ -353,7 +355,7 @@ volumes. Use this value only with such logical volumes. 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 diff --git a/doc/man-pages/man8/vldb_check.8 b/doc/man-pages/man8/vldb_check.8 index 39a2e2f09..675c9eafe 100644 --- a/doc/man-pages/man8/vldb_check.8 +++ b/doc/man-pages/man8/vldb_check.8 @@ -93,7 +93,7 @@ .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 @@ -191,7 +191,7 @@ 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] @@ -222,9 +222,12 @@ registered for each file server machine in the cell. .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. @@ -235,6 +238,16 @@ are provided, the output written to the standard output stream includes 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" @@ -272,6 +285,8 @@ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. .IX Item "\fB\-entries\fR" +.IX Item "\fB\-quiet\fR" + .IX Item "\fB\-verbose\fR" .IX Item "\fB\-help\fR" diff --git a/doc/man-pages/pod1/pts_membership.pod b/doc/man-pages/pod1/pts_membership.pod index e5cbdc48e..0154bb234 100644 --- a/doc/man-pages/pod1/pts_membership.pod +++ b/doc/man-pages/pod1/pts_membership.pod @@ -34,7 +34,7 @@ It is not possible to list the members of the system:anyuser or 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 command; to remove them, use the B command. =head1 OPTIONS @@ -112,45 +112,35 @@ non-administrative user to obtain this listing. =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 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 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 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 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 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, 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 diff --git a/doc/man-pages/pod1/vos.pod b/doc/man-pages/pod1/vos.pod index 68d44358b..feef451d6 100644 --- a/doc/man-pages/pod1/vos.pod +++ b/doc/man-pages/pod1/vos.pod @@ -90,6 +90,10 @@ A command to report Volume Server status: B. =item * +A command to change volume fields: B. + +=item * + Commands to obtain help: B and B. =back @@ -218,6 +222,13 @@ command is issued. The B<-fromserver> and B<-toserver> arguments to the B 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 @@ -268,6 +279,7 @@ L, L, L, L, +L, L, L, L, diff --git a/doc/man-pages/pod1/vos_examine.pod b/doc/man-pages/pod1/vos_examine.pod index d1cebcae5..cea4c870e 100644 --- a/doc/man-pages/pod1/vos_examine.pod +++ b/doc/man-pages/pod1/vos_examine.pod @@ -177,7 +177,15 @@ expressed in kilobyte blocks in the C field. The date and time the volume was created, in the C field. If the volume has been restored with the B, B, or B command, this is the restore time. +volrestore>, or B 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 +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 * @@ -312,6 +320,7 @@ shows the volume as locked. 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 @@ -330,6 +339,7 @@ the B<-extended> flag. The volume has no read-only replication sites. 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 diff --git a/doc/man-pages/pod1/vos_setfields.pod b/doc/man-pages/pod1/vos_setfields.pod new file mode 100644 index 000000000..14931a9dc --- /dev/null +++ b/doc/man-pages/pod1/vos_setfields.pod @@ -0,0 +1,142 @@ +=head1 NAME + +vos_setfields - Sets the quota or clear the access counter on a volume. + +=head1 SYNOPSIS + +=for html +
+ +B S<<< B<-id> > >>> + S<<< B<-maxquota> > >>> [B<-clearuse>] + S<<< [B<-cell> >] >>> [B<-noauth>] [B<-localauth>] + [B<-verbose>] [B<-encrypt>] [b<-noresolve>] [B<-help>] + +B S<<< B<-id> > >>> + S<<< B<-maxquota> > >>> [B<-clearuse>] + S<<< [B<-cell> >] >>> [B<-noauth>] [B<-localauth>] + [B<-verbose>] [B<-encrypt>] [b<-noresolve>] [B<-help>] + +=for html +
+ +=head1 DESCRIPTION + +The B command can set the quota on a volume, and it can +clear the access counter on a volume. This command differs from +B because only the volume name is needed to set the quota, +whereas the path to the volume is needed with B. + +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> > + +Identifies the volume on which to operate, either by its complete name or +volume ID number. + +=item B<-maxquota> > + +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 in the B output. + +=item B<-cell> > + +Names the cell in which to run the command. Do not combine this argument +with the B<-localauth> flag. For more details, see L. + +=item B<-noauth> + +Assigns the unprivileged identity C to the issuer. Do not +combine this flag with the B<-localauth> flag. For more details, see +L. + +=item B<-localauth> + +Constructs a server ticket using a key from the local +F file. The B 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. + +=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 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. + +=head1 SEE ALSO + +L, +L, +L + +=head1 COPYRIGHT + +Copyright 2009 Jason Edgecombe + +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. diff --git a/doc/man-pages/pod5/NetRestrict.pod b/doc/man-pages/pod5/NetRestrict.pod index 50c2df450..e69b5792b 100644 --- a/doc/man-pages/pod5/NetRestrict.pod +++ b/doc/man-pages/pod5/NetRestrict.pod @@ -69,10 +69,7 @@ the peer processes on other database machines in the cell. The F 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 command. diff --git a/doc/man-pages/pod8/afsd.pod b/doc/man-pages/pod8/afsd.pod index 8d0f54ebb..d46c35e2d 100644 --- a/doc/man-pages/pod8/afsd.pod +++ b/doc/man-pages/pod8/afsd.pod @@ -29,6 +29,7 @@ B [B<-afsdb>] [B<-backuptree>] [B<-settime>] [B<-shutdown>] S<<< [B<-splitcache> >] >>> S<<< [B<-stat> >] >>> [B<-verbose>] + [B<-disable-dynamic-vcaches>] S<<< [B<-volumes> >] >>> [B<-waitclose>] @@ -669,6 +670,13 @@ standard output stream. 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 diff --git a/doc/man-pages/pod8/fileserver.pod b/doc/man-pages/pod8/fileserver.pod index 64964e8c2..32b4f3e36 100644 --- a/doc/man-pages/pod8/fileserver.pod +++ b/doc/man-pages/pod8/fileserver.pod @@ -170,13 +170,13 @@ effective. To change this frequency, use the B<-hr> argument. The File Server stores volumes in partitions. A partition is a filesystem or directory on the server machine that is named C -or C 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 exists. The data in the partition is a -special format that can only be access using OpenAFS commands or an -OpenAFS client. +or C 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 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: @@ -204,21 +204,18 @@ and B<-lock> options, appear in the output generated by the B<-help> 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 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 @@ -247,8 +244,8 @@ the number specified (but if this argument specifies the maximum possible 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 for the current release. +The maximum number of threads can differ in each release of OpenAFS. +Consult the I for the current release. =item B<-spare> > diff --git a/doc/man-pages/pod8/salvager.pod b/doc/man-pages/pod8/salvager.pod index 2057e1502..f7009c653 100644 --- a/doc/man-pages/pod8/salvager.pod +++ b/doc/man-pages/pod8/salvager.pod @@ -102,11 +102,13 @@ Salvager by default salvages them serially to avoid the inefficiency of 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 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 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. 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, @@ -230,7 +232,7 @@ volumes. Use this value only with such logical volumes. 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> > diff --git a/doc/man-pages/pod8/vldb_check.pod b/doc/man-pages/pod8/vldb_check.pod index ce8394956..0726101a8 100644 --- a/doc/man-pages/pod8/vldb_check.pod +++ b/doc/man-pages/pod8/vldb_check.pod @@ -8,7 +8,7 @@ vldb_check - Checks the integrity of the VLDB
B S<<< B<-database> > >>> [B<-uheader>] [B<-vheader>] - [B<-servers>] [B<-entries>] [B<-verbose>] [B<-help>] + [B<-servers>] [B<-entries>] [B<-quiet> | B<-verbose>] [B<-help>] B S<<< B<-d> > >>> [B<-u>] [B<-vh>] [B<-s>] [B<-e>] [B<-ve>] [B<-h>] @@ -60,10 +60,15 @@ registered for each file server machine in the cell. 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> @@ -81,6 +86,16 @@ additional information as described for each option in L. The 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. diff --git a/src/JAVA/libjafs/File.c b/src/JAVA/libjafs/File.c index a2eb8ae48..734b6db4e 100644 --- a/src/JAVA/libjafs/File.c +++ b/src/JAVA/libjafs/File.c @@ -20,6 +20,7 @@ */ #include +#include #include #include "Internal.h" diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c index 05fd280b4..595e8991d 100644 --- a/src/afs/FBSD/osi_vnodeops.c +++ b/src/afs/FBSD/osi_vnodeops.c @@ -48,7 +48,7 @@ #include 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 /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -1044,8 +1044,7 @@ afs_vop_ioctl(ap) 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 { diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c index 73c2b5d13..bf4845d6d 100644 --- a/src/afs/LINUX/osi_cred.c +++ b/src/afs/LINUX/osi_cred.c @@ -15,7 +15,7 @@ #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" @@ -79,15 +79,15 @@ crref(void) { 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)); @@ -101,10 +101,20 @@ crref(void) 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; @@ -113,8 +123,14 @@ crset(cred_t * cr) 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); diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 268917130..a09a0670e 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -11,7 +11,7 @@ #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 */ @@ -78,11 +78,15 @@ osi_UFSOpen(afs_int32 ainode) #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; @@ -133,7 +137,7 @@ osi_UFSOpen(afs_int32 ainode) 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; @@ -148,7 +152,7 @@ afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat) 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; @@ -238,7 +242,7 @@ osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize) 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); } diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index 612d05838..3c5988522 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -20,7 +20,7 @@ #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" @@ -50,7 +50,7 @@ afs_setgroups(cred_t **cr, struct group_info *group_info, int change_parent) 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); @@ -244,14 +244,19 @@ install_session_keyring(struct task_struct *task, struct key *keyring) 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 @@ -269,9 +274,9 @@ install_session_keyring(struct task_struct *task, struct key *keyring) /* 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) @@ -337,22 +342,24 @@ setpag(cred_t **cr, afs_uint32 pagvalue, afs_uint32 *newpag, (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); } } @@ -549,26 +556,28 @@ static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen { 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 @@ -584,7 +593,7 @@ static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen code = 0; error: - put_group_info(current->group_info); + put_group_info(current_group_info()); return code; } @@ -651,8 +660,8 @@ void osi_keyring_init(void) #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); diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index d398c7e85..11e70308c 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -155,7 +155,7 @@ static inline long copyinstr(char *from, char *to, int count, int *length) { #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 */ @@ -167,10 +167,34 @@ typedef struct cred { /* maps to task field: */ 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 */ diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index 4fbde1e55..1fc790af0 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -15,7 +15,7 @@ #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 /* early to avoid printf->printk mapping */ #include "afs/sysincludes.h" @@ -83,6 +83,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) 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); @@ -91,8 +92,9 @@ static void *c_start(struct seq_file *m, loff_t *pos) break; } if (cq == &CellLRU) - return NULL; + cq = NULL; + AFS_GUNLOCK(); return cq; } @@ -100,18 +102,23 @@ static void *c_next(struct seq_file *m, void *p, loff_t *pos) { 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) diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c index f661e9ea3..91b95f6fe 100644 --- a/src/afs/LINUX/osi_probe.c +++ b/src/afs/LINUX/osi_probe.c @@ -1210,14 +1210,14 @@ static void *try_harder(probectl *P, PROBETYPE *ptr, unsigned long datalen) 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); \ } \ diff --git a/src/afs/LINUX/osi_vfs.hin b/src/afs/LINUX/osi_vfs.hin index b94a2ca02..bd6de5364 100644 --- a/src/afs/LINUX/osi_vfs.hin +++ b/src/afs/LINUX/osi_vfs.hin @@ -78,4 +78,9 @@ typedef struct vattr { #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_ */ diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index d7fc11911..879a27009 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -16,7 +16,7 @@ #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 /* early to avoid printf->printk mapping */ @@ -143,6 +143,9 @@ afs_read_super(struct super_block *sb, void *data, int silent) 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) @@ -394,6 +397,9 @@ afs_put_super(struct super_block *sbp) #endif osi_linux_verify_alloced_memory(); +#if defined(HAVE_BDI_INIT) + bdi_destroy(&afs_backing_dev_info); +#endif AFS_GUNLOCK(); sbp->s_dev = 0; @@ -532,7 +538,7 @@ vattr2inode(struct inode *ip, struct vattr *vp) 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; diff --git a/src/afs/LINUX/osi_vm.c b/src/afs/LINUX/osi_vm.c index 9764d44b5..cc35ffaf2 100644 --- a/src/afs/LINUX/osi_vm.c +++ b/src/afs/LINUX/osi_vm.c @@ -11,7 +11,7 @@ #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 */ @@ -52,7 +52,7 @@ osi_VM_FlushVCache(struct vcache *avc, int *slept) 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 @@ -131,9 +131,7 @@ void 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); @@ -153,9 +151,7 @@ void 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); diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 45fb5c866..804977dbb 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -22,7 +22,7 @@ #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" @@ -47,6 +47,7 @@ RCSID #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; @@ -1581,7 +1582,7 @@ afs_linux_writepage_sync(struct inode *ip, struct page *pp, 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) { @@ -1635,13 +1636,13 @@ afs_linux_writepage(struct page *pp) #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; @@ -1684,7 +1685,7 @@ afs_linux_updatepage(struct file *fp, struct page *pp, unsigned long offset, 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) { @@ -1791,7 +1792,11 @@ afs_linux_write_begin(struct file *file, struct address_space *mapping, { 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; @@ -1925,6 +1930,9 @@ afs_fill_inode(struct inode *ip, struct vattr *vattr) 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; diff --git a/src/afs/SOLARIS/osi_file.c b/src/afs/SOLARIS/osi_file.c index 44a4d1432..ecc88f07d 100644 --- a/src/afs/SOLARIS/osi_file.c +++ b/src/afs/SOLARIS/osi_file.c @@ -11,7 +11,7 @@ #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 */ @@ -175,22 +175,85 @@ void * 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 */ @@ -304,12 +367,14 @@ void 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 } } diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index 03be3cb91..39ddbfcb9 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -11,7 +11,7 @@ #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 @@ -363,7 +363,7 @@ afs_GetOnePage(vp, off, alen, protp, pl, plsz, seg, addr, rw, acred) 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); diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index b4dcf21ca..608704dd9 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -15,7 +15,7 @@ #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 @@ -56,7 +56,7 @@ char afs_LclCellName[64]; 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 @@ -107,8 +107,8 @@ int usr_udpcksum = 0; 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 @@ -1562,7 +1562,7 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam, cacheStatEntries = cacheStatEntriesParam; } strcpy(cacheBaseDir, cacheBaseDirParam); - if (nDaemons != 0) { + if (nDaemonsParam != 0) { nDaemons = nDaemonsParam; } else { nDaemons = 3; @@ -1847,7 +1847,11 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam, (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 */ @@ -2692,6 +2696,7 @@ uafs_open_r(char *path, int flags, int mode) errno = code; return -1; } + fileP = AFSTOV(vc); } else { fileP = NULL; code = uafs_LookupName(nameP, dirP, &fileP, 1, 0); @@ -2764,6 +2769,7 @@ uafs_open_r(char *path, int flags, int mode) */ 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) { @@ -2835,13 +2841,23 @@ uafs_write(int fd, char *buf, int len) { 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; @@ -2864,7 +2880,7 @@ uafs_write_r(int fd, char *buf, int len) 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; @@ -2891,13 +2907,23 @@ uafs_read(int fd, char *buf, int 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; @@ -2921,7 +2947,7 @@ uafs_read_r(int fd, char *buf, int len) 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; @@ -3105,6 +3131,7 @@ uafs_chmod_r(char *path, int mode) 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); @@ -3141,6 +3168,7 @@ uafs_fchmod_r(int fd, int mode) 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) { @@ -3176,6 +3204,7 @@ uafs_truncate_r(char *path, int length) 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); @@ -3212,6 +3241,7 @@ uafs_ftruncate_r(int fd, int length) 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) { diff --git a/src/afs/UKERNEL/afs_usrops.h b/src/afs/UKERNEL/afs_usrops.h index a806e5a09..d475fe5dd 100644 --- a/src/afs/UKERNEL/afs_usrops.h +++ b/src/afs/UKERNEL/afs_usrops.h @@ -61,7 +61,7 @@ extern struct usr_vnode *afs_RootVnode; 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; @@ -90,9 +90,11 @@ extern int uafs_open_r(char *path, int flags, int mode); 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); diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index ab6d449af..ebe576ee8 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -1017,22 +1017,28 @@ struct usr_statfs { 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; }; diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c index cc430ec84..74f8ca3db 100644 --- a/src/afs/VNOPS/afs_vnop_attrs.c +++ b/src/afs/VNOPS/afs_vnop_attrs.c @@ -24,7 +24,7 @@ #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 */ @@ -344,7 +344,7 @@ afs_VAttrToAS(register struct vcache *avc, register struct vattr *av, #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) { @@ -363,7 +363,7 @@ afs_VAttrToAS(register struct vcache *avc, register struct vattr *av, } #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) { @@ -383,7 +383,7 @@ afs_VAttrToAS(register struct vcache *avc, register struct vattr *av, } #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) { @@ -403,7 +403,7 @@ afs_VAttrToAS(register struct vcache *avc, register struct vattr *av, } #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) { @@ -482,7 +482,7 @@ afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs, */ #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) { @@ -515,19 +515,28 @@ afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs, #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)) { diff --git a/src/afs/VNOPS/afs_vnop_create.c b/src/afs/VNOPS/afs_vnop_create.c index b9b5cb392..3fd21586d 100644 --- a/src/afs/VNOPS/afs_vnop_create.c +++ b/src/afs/VNOPS/afs_vnop_create.c @@ -17,7 +17,7 @@ #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 */ @@ -217,6 +217,8 @@ afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 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 diff --git a/src/afs/afs.h b/src/afs/afs.h index 032c9c279..4cefbc404 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -170,15 +170,44 @@ struct SmallFid { /* 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 */ @@ -318,29 +347,6 @@ struct conn { (!(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 */ diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index eead36787..a88fff1cc 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -11,7 +11,7 @@ #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 */ @@ -825,7 +825,8 @@ afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6) 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; diff --git a/src/afs/afs_cbqueue.c b/src/afs/afs_cbqueue.c index b3289c498..a20e76756 100644 --- a/src/afs/afs_cbqueue.c +++ b/src/afs/afs_cbqueue.c @@ -75,7 +75,7 @@ #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 */ @@ -180,7 +180,7 @@ afs_DequeueCallback(struct vcache *avc) */ /* 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) diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index 1cc6c11ad..b192bc996 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -11,7 +11,7 @@ #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 @@ -40,6 +40,8 @@ static int rxepoch_checked = 0; #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; @@ -116,13 +118,13 @@ afs_Daemon(void) 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) @@ -150,6 +152,7 @@ afs_Daemon(void) 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) */ @@ -191,6 +194,19 @@ afs_Daemon(void) * 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) { diff --git a/src/afs/afs_init.c b/src/afs/afs_init.c index 5eee3e39b..f4b9a53ff 100644 --- a/src/afs/afs_init.c +++ b/src/afs/afs_init.c @@ -17,7 +17,7 @@ #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 */ @@ -45,6 +45,9 @@ int afs_memvolumes = 0; 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 @@ -81,7 +84,7 @@ static int afs_cacheinit_flag = 0; 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; @@ -98,6 +101,13 @@ afs_CacheInit(afs_int32 astatSize, afs_int32 afiles, afs_int32 ablocks, 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; diff --git a/src/afs/afs_nfsdisp.c b/src/afs/afs_nfsdisp.c index aaacf3762..c527b9041 100644 --- a/src/afs/afs_nfsdisp.c +++ b/src/afs/afs_nfsdisp.c @@ -11,7 +11,7 @@ #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__ @@ -378,8 +378,8 @@ void 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); @@ -393,8 +393,8 @@ void 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); @@ -408,8 +408,8 @@ void 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); @@ -426,8 +426,8 @@ void 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); @@ -441,8 +441,8 @@ void 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); @@ -456,8 +456,8 @@ void 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); @@ -471,8 +471,8 @@ void 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); @@ -489,8 +489,8 @@ void 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); @@ -504,8 +504,8 @@ void 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); @@ -519,8 +519,8 @@ void 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); @@ -534,8 +534,8 @@ void 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); @@ -549,8 +549,8 @@ void 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); @@ -567,8 +567,8 @@ void 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); @@ -582,8 +582,8 @@ void 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); @@ -597,8 +597,8 @@ void 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); @@ -633,8 +633,8 @@ void 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) @@ -650,8 +650,8 @@ void 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) @@ -667,8 +667,8 @@ void 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) @@ -684,8 +684,8 @@ void 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) @@ -702,8 +702,8 @@ void 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) @@ -1140,8 +1140,8 @@ afs_nfs3_getattr(char *args, char *xp, char *exp, char *rp, char *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_GETATTR, (char *)args, &exp, rp, crp); if (call > 1) @@ -1158,8 +1158,8 @@ afs_nfs3_setattr(char *args, char *xp, char *exp, char *rp, char *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_SETATTR, (char *)args, &exp, rp, crp); if (call > 1) @@ -1176,8 +1176,8 @@ afs_nfs3_lookup(char *args, char *xp, char *exp, char *rp, char *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_LOOKUP, (char *)args, &exp, rp, crp); if (call > 1) @@ -1199,8 +1199,8 @@ afs_nfs3_access(char *args, char *xp, char *exp, char *rp, char *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_ACCESS, (char *)args, &exp, rp, crp); if (call > 1) @@ -1217,8 +1217,8 @@ afs_nfs3_readlink(char *args, char *xp, char *exp, char *rp, char *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_READLINK, (char *)args, &exp, rp, crp); @@ -1236,8 +1236,8 @@ afs_nfs3_read(char *args, char *xp, char *exp, char *rp, char *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); @@ -1253,8 +1253,8 @@ afs_nfs3_write(char *args, char *xp, char *exp, char *rp, char *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_WRITE, (char *)args, &exp, rp, crp); if (call > 1) @@ -1271,8 +1271,8 @@ afs_nfs3_create(char *args, char *xp, char *exp, char *rp, char *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_CREATE, (char *)args, &exp, rp, crp); if (call > 1) @@ -1294,8 +1294,8 @@ afs_nfs3_mkdir(char *args, char *xp, char *exp, char *rp, char *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_MKDIR, (char *)args, &exp, rp, crp); if (call > 1) @@ -1317,8 +1317,8 @@ afs_nfs3_symlink(char *args, char *xp, char *exp, char *rp, char *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_SYMLINK, (char *)args, &exp, rp, crp); if (call > 1) @@ -1340,8 +1340,8 @@ afs_nfs3_mknod(char *args, char *xp, char *exp, char *rp, char *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_MKNOD, (char *)args, &exp, rp, crp); if (call > 1) @@ -1363,8 +1363,8 @@ afs_nfs3_remove(char *args, char *xp, char *exp, char *rp, char *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_REMOVE, (char *)args, &exp, rp, crp); if (call > 1) @@ -1381,8 +1381,8 @@ afs_nfs3_rmdir(char *args, char *xp, char *exp, char *rp, char *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_RMDIR, (char *)args, &exp, rp, crp); if (call > 1) @@ -1399,8 +1399,8 @@ afs_nfs3_rename(char *args, char *xp, char *exp, char *rp, char *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_RENAME, (char *)args, &exp, rp, crp); if (call > 1) @@ -1417,8 +1417,8 @@ afs_nfs3_link(char *args, char *xp, char *exp, char *rp, char *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_LINK, (char *)args, &exp, rp, crp); if (call > 1) afs_nfs3_noaccess((struct afs_nfs3_resp *)xp); @@ -1434,8 +1434,8 @@ afs_nfs3_readdir(char *args, char *xp, char *exp, char *rp, char *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_READDIR, (char *)args, &exp, rp, crp); if (call > 1) @@ -1452,8 +1452,8 @@ afs_nfs3_readdirplus(char *args, char *xp, char *exp, char *rp, char *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_READDIRPLUS, (char *)args, &exp, rp, crp); @@ -1473,8 +1473,8 @@ afs_nfs3_fsstat(char *args, char *xp, char *exp, char *rp, char *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) @@ -1491,8 +1491,8 @@ afs_nfs3_fsinfo(char *args, char *xp, char *exp, char *rp, char *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_FSINFO, (char *)args, &exp, rp, crp); if (call > 1) @@ -1509,8 +1509,8 @@ afs_nfs3_pathconf(char *args, char *xp, char *exp, char *rp, char *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_PATHCONF, (char *)args, &exp, rp, crp); @@ -1528,8 +1528,8 @@ afs_nfs3_commit(char *args, char *xp, char *exp, char *rp, char *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) @@ -1570,8 +1570,8 @@ void 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) @@ -1587,8 +1587,8 @@ void 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) @@ -1605,8 +1605,8 @@ void 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) diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index 0ebb9130e..5bbf8c9bc 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -11,7 +11,7 @@ #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 */ @@ -1120,10 +1120,15 @@ afs_osi_proc2cred(AFS_PROC * pr) || (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)); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index d39f9b77b..c6d96f750 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -11,7 +11,7 @@ #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 @@ -88,7 +88,7 @@ DECL_PIOCTL(PFlushMount); DECL_PIOCTL(PRxStatProc); DECL_PIOCTL(PRxStatPeer); DECL_PIOCTL(PPrefetchFromTape); -DECL_PIOCTL(PResidencyCmd); +DECL_PIOCTL(PFsCmd); DECL_PIOCTL(PCallBackAddr); DECL_PIOCTL(PNewUuid); /* @@ -182,7 +182,7 @@ static int (*(VpioctlSw[])) () = { 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 */ }; @@ -3781,21 +3781,21 @@ DECL_PIOCTL(PPrefetchFromTape) 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; @@ -3819,8 +3819,8 @@ DECL_PIOCTL(PResidencyCmd) 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; @@ -3844,7 +3844,7 @@ DECL_PIOCTL(PResidencyCmd) afs_PutVCache(tvc); if (!code) { - *aoutSize = sizeof(struct ResidencyCmdOutputs); + *aoutSize = sizeof(struct FsCmdOutputs); } return code; } diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index f83484bb1..0f8ceff4f 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -376,7 +376,7 @@ extern 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 nusers, afs_int32 dynamic_vcaches); extern void afs_ComputeCacheParms(void); extern int afs_InitCacheInfo(register char *afile); extern int afs_InitVolumeInfo(char *afile); @@ -823,6 +823,7 @@ extern afs_int32 afs_data_pointer_to_int32(const void *p); /* afs_vcache.c */ +extern int afs_ShakeLooseVCaches(afs_int32 anumber); extern afs_int32 afs_maxvcount; extern afs_int32 afs_vcount; extern int afsvnumbers; diff --git a/src/afs/afs_trace.et b/src/afs/afs_trace.et index 1c2640578..64b200989 100644 --- a/src/afs/afs_trace.et +++ b/src/afs/afs_trace.et @@ -132,8 +132,8 @@ error_table 2 ZCM 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" diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 07e8701f9..0f4210f7d 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -39,7 +39,7 @@ #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 */ @@ -77,6 +77,7 @@ struct afs_q afs_vhashTV[VCSIZE]; 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); @@ -253,6 +254,7 @@ afs_FlushVCache(struct vcache *avc, int *slept) VN_UNLOCK(AFSTOV(avc)); #endif AFS_RELE(AFSTOV(avc)); + afs_stats_cmperf.vcacheXAllocs--; } else { if (afs_norefpanic) { printf("flush vc refcnt < 1"); @@ -313,6 +315,8 @@ afs_InactiveVCache(struct vcache *avc, struct AFS_UCRED *acred) * 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) { @@ -334,6 +338,7 @@ afs_AllocCBR(void) } tsp[AFS_NCBRS - 1].next = 0; afs_cbrSpace = tsp; + afs_cbrHeads[afs_stats_cmperf.CallBackAlloced] = tsp; afs_stats_cmperf.CallBackAlloced++; } } @@ -621,54 +626,29 @@ afs_FlushReclaimedVcaches(void) #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; @@ -678,7 +658,11 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp) 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"); @@ -744,24 +728,48 @@ restart: 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); @@ -770,19 +778,90 @@ restart: 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) { @@ -870,33 +949,7 @@ restart: } } 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; @@ -1769,7 +1822,7 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq, newvcache = 1; ConvertWToSLock(&afs_xvcache); - if (!tvc) + if (tvc == NULL) { ReleaseSharedLock(&afs_xvcache); return NULL; @@ -3022,7 +3075,7 @@ shutdown_vcache(void) */ { - 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); @@ -3077,7 +3130,8 @@ shutdown_vcache(void) tvc->linkData = 0; } - afs_FreeAllAxs(&(tvc->Access)); + if (tvc->Access) + afs_FreeAllAxs(&(tvc->Access)); } afs_vhashT[i] = 0; } @@ -3085,8 +3139,9 @@ shutdown_vcache(void) /* * 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; diff --git a/src/afsd/afs.rc.linux b/src/afsd/afs.rc.linux index b86189ecd..579034cf0 100644 --- a/src/afsd/afs.rc.linux +++ b/src/afsd/afs.rc.linux @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Copyright 2000, International Business Machines Corporation and others. # All Rights Reserved. # diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 4e824472d..b94f3bdfd 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -32,6 +32,9 @@ * -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. @@ -58,7 +61,7 @@ #include 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 @@ -312,6 +315,7 @@ static int enable_nomount = 0; /* do not mount */ #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? */ @@ -1736,6 +1740,25 @@ mainproc(struct cmd_syndesc *as, void *arock) } } + 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. @@ -2073,6 +2096,7 @@ mainproc(struct cmd_syndesc *as, void *arock) cparams.chunkSize = chunkSize; cparams.setTimeFlag = cacheSetTime; cparams.memCacheFlag = cacheFlags; + cparams.dynamic_vcaches = afsd_dynamic_vcaches; #ifdef notdef cparams.inodes = inodes; #endif @@ -2445,6 +2469,7 @@ main(int argc, char **argv) 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)); } diff --git a/src/aklog/Makefile.in b/src/aklog/Makefile.in index 4a778db98..735153c4c 100644 --- a/src/aklog/Makefile.in +++ b/src/aklog/Makefile.in @@ -9,9 +9,10 @@ OPTMZ = @KRB5CFLAGS@ -DALLOW_REGISTER 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 @@ -26,7 +27,7 @@ asetkey: asetkey.o ${AFSLIBS} 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 diff --git a/src/aklog/aklog_main.c b/src/aklog/aklog_main.c index 584fa5dfd..ae1936088 100644 --- a/src/aklog/aklog_main.c +++ b/src/aklog/aklog_main.c @@ -1,5 +1,5 @@ /* - * $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" @@ -36,7 +36,7 @@ #include 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 #include #include @@ -637,25 +637,40 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm) 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; diff --git a/src/audit/audit.c b/src/audit/audit.c index f0f76dfbf..afe69c826 100644 --- a/src/audit/audit.c +++ b/src/audit/audit.c @@ -11,11 +11,18 @@ #include 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 #include #include +#include +#include +#ifndef AFS_NT40_ENV +#include +#else +#include +#endif #ifdef AFS_AIX32_ENV #include #else @@ -233,24 +240,21 @@ printbuf(FILE *out, int rec, char *audEvent, char *afsName, afs_int32 hostId, 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: @@ -447,12 +451,43 @@ osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...) } 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= sizeof(vname)) goto done; strcat(vname, "@"); @@ -527,8 +562,35 @@ osi_audit_check() } 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; } diff --git a/src/audit/audit.h b/src/audit/audit.h index ba6f27741..bed4b53dd 100644 --- a/src/audit/audit.h +++ b/src/audit/audit.h @@ -291,6 +291,6 @@ /* 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); diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 145f6c04e..4a913203d 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -17,7 +17,7 @@ #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" @@ -56,9 +56,11 @@ RCSID #include #ifdef AFS_AIX51_ENV #include +#ifdef HAVE_SYS_PAG_H #include #endif #endif +#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/src/auth/userok.c b/src/auth/userok.c index 7ecb9bad2..f209068a5 100644 --- a/src/auth/userok.c +++ b/src/auth/userok.c @@ -11,7 +11,7 @@ #include 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 #include @@ -382,7 +382,9 @@ afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, char *namep) 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 = @@ -419,11 +421,40 @@ afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, char *namep) /* 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"); 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; @@ -446,7 +477,6 @@ afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, char *namep) flag = 1; #endif } - /* cell of conn doesn't match local cell or realm */ } else { if ((tmp = CompFindUser(adir, tname, ".", tinst, tcell))) { diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index 860912190..35a89c48d 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -11,7 +11,7 @@ #include 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 #include @@ -147,7 +147,7 @@ SaveCore(register struct bnode *abnode, register struct bnode_proc 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 diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index f384fae99..abcf7d7be 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -11,7 +11,7 @@ #include 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 #include @@ -841,34 +841,9 @@ main(int argc, char **argv, char **envp) } } 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 { diff --git a/src/bucoord/ubik_db_if.c b/src/bucoord/ubik_db_if.c index 4e8ff129e..b7b209f7a 100644 --- a/src/bucoord/ubik_db_if.c +++ b/src/bucoord/ubik_db_if.c @@ -13,7 +13,7 @@ #include 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 #include @@ -44,7 +44,7 @@ afs_int32 bcdb_AddVolumes(register struct budb_volumeEntry *, afs_int32 ); 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 *); @@ -109,7 +109,7 @@ afs_int32 bcdb_deleteDump(afs_int32 dumpID, afs_int32 fromTime, afs_int32 toTime 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; diff --git a/src/budb/server.c b/src/budb/server.c index 8863c62ea..6ff30623c 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -11,7 +11,7 @@ #include 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 #include @@ -220,33 +220,9 @@ argHandler(struct cmd_syndesc *as, void *arock) 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; @@ -535,7 +511,7 @@ main(argc, argv) code = ubik_ServerInitByInfo (globalConfPtr->myHost, htons(AFSCONF_BUDBPORT), &cellinfo, - &clones, + clones, dbNamePtr, /* name prefix */ &BU_dbase); diff --git a/src/butc/afsxbsa.c b/src/butc/afsxbsa.c index 66310f93b..1add50844 100644 --- a/src/butc/afsxbsa.c +++ b/src/butc/afsxbsa.c @@ -648,6 +648,8 @@ void * dynlib = NULL ; #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 diff --git a/src/butc/dump.c b/src/butc/dump.c index 558277bc3..10cc19472 100644 --- a/src/butc/dump.c +++ b/src/butc/dump.c @@ -11,7 +11,7 @@ #include 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 #ifdef AFS_NT40_ENV @@ -358,6 +358,13 @@ dumpVolume(struct tc_dumpDesc * curDump, struct dumpRock * dparamsPtr) } } +#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; diff --git a/src/cf/kerberos.m4 b/src/cf/kerberos.m4 index b67b32042..aecf26c5c 100644 --- a/src/cf/kerberos.m4 +++ b/src/cf/kerberos.m4 @@ -1,5 +1,5 @@ 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 @@ -37,7 +37,7 @@ fi 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 @@ -51,9 +51,11 @@ if test X$with_krb5 = Xyes; then 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" @@ -122,6 +124,7 @@ if test "x$ac_cv_krb5_cc_register_exists" = "xyes"; then fi AC_SUBST(BUILD_KRB5) +AC_SUBST(MAKE_KRB5) AC_SUBST(KRB5CFLAGS) AC_SUBST(KRB5LIBS) diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4 index 98bdc45c9..0b40eb75a 100644 --- a/src/cf/linux-test1.m4 +++ b/src/cf/linux-test1.m4 @@ -29,7 +29,7 @@ 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 >&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 diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 801f6d59a..409dd0575 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -772,18 +772,41 @@ request_key(NULL, NULL, NULL); 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 #include ], -[(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 +#include +], +[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], [ @@ -816,6 +839,22 @@ AC_DEFUN([LINUX_GENERIC_FILE_AIO_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 ], +[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], [ @@ -1045,6 +1084,19 @@ AC_DEFUN([LINUX_SEMAPHORE_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 ], +[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], [ @@ -1057,3 +1109,32 @@ AC_DEFUN([LINUX_HAVE_WRITE_BEGIN_AOP], [ 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 ], +[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 +#include ], +[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]) diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index f4b25a79f..aabc1785b 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -234,7 +234,7 @@ case $AFS_SYSNAME in SHLIB_LINKER="ld -b" ;; - *fbsd_*) + i386_fbsd_*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-pthread" @@ -246,6 +246,18 @@ case $AFS_SYSNAME in 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 ' @@ -474,7 +486,7 @@ case $AFS_SYSNAME in ;; 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= diff --git a/src/cf/socklen.m4 b/src/cf/socklen.m4 new file mode 100644 index 000000000..50ee10f1d --- /dev/null +++ b/src/cf/socklen.m4 @@ -0,0 +1,18 @@ +AC_DEFUN([AC_TYPE_SOCKLEN_T], +[ +AC_CACHE_CHECK([for socklen_t], +ac_cv_type_socklen_t, [ + AC_TRY_COMPILE([ + #include + #include + ], + [ + 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 +]) diff --git a/src/config/afs_args.h b/src/config/afs_args.h index d124efce7..d3a06be4f 100644 --- a/src/config/afs_args.h +++ b/src/config/afs_args.h @@ -141,6 +141,7 @@ struct afs_cacheParams { afs_int32 memCacheFlag; afs_int32 inodes; afs_int32 users; + afs_int32 dynamic_vcaches; }; /* diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index e2fe18b44..77f16d924 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -187,7 +187,8 @@ #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 @@ -262,6 +263,9 @@ #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 @@ -295,4 +299,6 @@ #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_ */ diff --git a/src/config/afsconfig.h.in b/src/config/afsconfig.h.in index ded0e9019..9cbe02bc8 100644 --- a/src/config/afsconfig.h.in +++ b/src/config/afsconfig.h.in @@ -115,6 +115,9 @@ /* 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 @@ -155,6 +158,9 @@ /* 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 @@ -224,6 +230,9 @@ /* 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 header file. */ #undef HAVE_MALLOC_H @@ -361,6 +370,9 @@ */ #undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PAG_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -439,6 +451,9 @@ /* 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 @@ -526,6 +541,56 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } # 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 @@ -613,6 +678,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } /* 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 diff --git a/src/config/param.alpha_linux_22.h b/src/config/param.alpha_linux_22.h index 20398953c..e41b513ec 100644 --- a/src/config/param.alpha_linux_22.h +++ b/src/config/param.alpha_linux_22.h @@ -28,6 +28,7 @@ #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 diff --git a/src/config/param.alpha_linux_24.h b/src/config/param.alpha_linux_24.h index 4a565a6ab..0af6c66c6 100644 --- a/src/config/param.alpha_linux_24.h +++ b/src/config/param.alpha_linux_24.h @@ -30,6 +30,7 @@ #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 diff --git a/src/config/param.alpha_linux_26.h b/src/config/param.alpha_linux_26.h index f8213aac2..72b7c79c4 100644 --- a/src/config/param.alpha_linux_26.h +++ b/src/config/param.alpha_linux_26.h @@ -33,7 +33,7 @@ #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) @@ -104,6 +104,7 @@ #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 diff --git a/src/config/param.amd64_fbsd_70.h b/src/config/param.amd64_fbsd_70.h new file mode 100644 index 000000000..775e1ea00 --- /dev/null +++ b/src/config/param.amd64_fbsd_70.h @@ -0,0 +1,213 @@ +#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 +#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 + +#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 + +#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 +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +/* general user-space compiles */ + +#if defined(UKERNEL) || !defined(KERNEL) +#define STDLIB_HAS_MALLOC_PROTOS 1 +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.amd64_fbsd_71.h b/src/config/param.amd64_fbsd_71.h new file mode 100644 index 000000000..1f4185cde --- /dev/null +++ b/src/config/param.amd64_fbsd_71.h @@ -0,0 +1,216 @@ +#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 +#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 + +#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 + +#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 +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +/* general user-space compiles */ + +#if defined(UKERNEL) || !defined(KERNEL) +#define STDLIB_HAS_MALLOC_PROTOS 1 +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.amd64_fbsd_80.h b/src/config/param.amd64_fbsd_80.h new file mode 100644 index 000000000..367817420 --- /dev/null +++ b/src/config/param.amd64_fbsd_80.h @@ -0,0 +1,219 @@ +#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 +#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 + +#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 + +#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 +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +/* general user-space compiles */ + +#if defined(UKERNEL) || !defined(KERNEL) +#define STDLIB_HAS_MALLOC_PROTOS 1 +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.amd64_linux24.h b/src/config/param.amd64_linux24.h index a2fd9c6af..09b3a83dc 100644 --- a/src/config/param.amd64_linux24.h +++ b/src/config/param.amd64_linux24.h @@ -39,6 +39,7 @@ #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) @@ -125,6 +126,7 @@ #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 diff --git a/src/config/param.amd64_linux26.h b/src/config/param.amd64_linux26.h index 9d417c0ed..8b205b6cd 100644 --- a/src/config/param.amd64_linux26.h +++ b/src/config/param.amd64_linux26.h @@ -29,6 +29,7 @@ #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) @@ -107,6 +108,7 @@ #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 diff --git a/src/config/param.arm_linux24.h b/src/config/param.arm_linux24.h index 83f85a86d..26197891c 100644 --- a/src/config/param.arm_linux24.h +++ b/src/config/param.arm_linux24.h @@ -108,6 +108,7 @@ #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 diff --git a/src/config/param.arm_linux26.h b/src/config/param.arm_linux26.h index 9a8c8c1fb..9f2586a52 100644 --- a/src/config/param.arm_linux26.h +++ b/src/config/param.arm_linux26.h @@ -113,6 +113,7 @@ #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 diff --git a/src/config/param.hp_ux110.h b/src/config/param.hp_ux110.h index fbc5b3d39..5103b02be 100644 --- a/src/config/param.hp_ux110.h +++ b/src/config/param.hp_ux110.h @@ -123,6 +123,7 @@ struct uio; #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 diff --git a/src/config/param.hp_ux11i.h b/src/config/param.hp_ux11i.h index 62b4881bd..948245c03 100644 --- a/src/config/param.hp_ux11i.h +++ b/src/config/param.hp_ux11i.h @@ -126,6 +126,7 @@ struct uio; #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 diff --git a/src/config/param.i386_fbsd_71.h b/src/config/param.i386_fbsd_71.h new file mode 100644 index 000000000..f141cf9ba --- /dev/null +++ b/src/config/param.i386_fbsd_71.h @@ -0,0 +1,214 @@ +#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 +#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 + +#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 + +#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 +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +/* general user-space compiles */ + +#if defined(UKERNEL) || !defined(KERNEL) +#define STDLIB_HAS_MALLOC_PROTOS 1 +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_80.h b/src/config/param.i386_fbsd_80.h index ce5f0f300..3342de2c1 100644 --- a/src/config/param.i386_fbsd_80.h +++ b/src/config/param.i386_fbsd_80.h @@ -41,6 +41,7 @@ #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 @@ -52,6 +53,7 @@ #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 @@ -162,6 +164,7 @@ enum vcexcl { NONEXCL, EXCL }; #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 diff --git a/src/config/param.i386_linux22.h b/src/config/param.i386_linux22.h index 686f9573b..00b648071 100644 --- a/src/config/param.i386_linux22.h +++ b/src/config/param.i386_linux22.h @@ -30,6 +30,7 @@ #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 diff --git a/src/config/param.i386_linux24.h b/src/config/param.i386_linux24.h index 4c31183a7..41ab1ee7f 100644 --- a/src/config/param.i386_linux24.h +++ b/src/config/param.i386_linux24.h @@ -25,6 +25,7 @@ #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) @@ -111,6 +112,7 @@ #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 diff --git a/src/config/param.i386_linux26.h b/src/config/param.i386_linux26.h index 0f59404ff..0bfa67f80 100644 --- a/src/config/param.i386_linux26.h +++ b/src/config/param.i386_linux26.h @@ -27,6 +27,7 @@ #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) @@ -119,6 +120,7 @@ #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 diff --git a/src/config/param.i386_umlinux22.h b/src/config/param.i386_umlinux22.h index 1193b9497..8aa261785 100644 --- a/src/config/param.i386_umlinux22.h +++ b/src/config/param.i386_umlinux22.h @@ -32,6 +32,7 @@ #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 diff --git a/src/config/param.i386_umlinux24.h b/src/config/param.i386_umlinux24.h index 77e312e9e..4d191d629 100644 --- a/src/config/param.i386_umlinux24.h +++ b/src/config/param.i386_umlinux24.h @@ -28,6 +28,7 @@ #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 @@ -112,6 +113,7 @@ #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 diff --git a/src/config/param.i386_umlinux26.h b/src/config/param.i386_umlinux26.h index 3a158eaff..688d2c2b1 100644 --- a/src/config/param.i386_umlinux26.h +++ b/src/config/param.i386_umlinux26.h @@ -27,6 +27,7 @@ #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) @@ -113,6 +114,7 @@ #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 diff --git a/src/config/param.ia64_linux24.h b/src/config/param.ia64_linux24.h index 47c369800..c3e4534a5 100644 --- a/src/config/param.ia64_linux24.h +++ b/src/config/param.ia64_linux24.h @@ -39,6 +39,7 @@ #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) @@ -125,6 +126,7 @@ #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 diff --git a/src/config/param.ia64_linux26.h b/src/config/param.ia64_linux26.h index d534f06c3..a77399504 100644 --- a/src/config/param.ia64_linux26.h +++ b/src/config/param.ia64_linux26.h @@ -41,6 +41,7 @@ #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 @@ -135,6 +136,7 @@ #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 diff --git a/src/config/param.parisc_linux24.h b/src/config/param.parisc_linux24.h index ad7506f5e..d62e8c069 100644 --- a/src/config/param.parisc_linux24.h +++ b/src/config/param.parisc_linux24.h @@ -23,6 +23,7 @@ #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) @@ -96,6 +97,7 @@ #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 diff --git a/src/config/param.ppc64_linux24.h b/src/config/param.ppc64_linux24.h index 5222500b6..1f5c74258 100644 --- a/src/config/param.ppc64_linux24.h +++ b/src/config/param.ppc64_linux24.h @@ -27,6 +27,7 @@ #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) @@ -117,6 +118,7 @@ #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 diff --git a/src/config/param.ppc64_linux26.h b/src/config/param.ppc64_linux26.h index 97737ef91..1df9f3286 100644 --- a/src/config/param.ppc64_linux26.h +++ b/src/config/param.ppc64_linux26.h @@ -29,6 +29,7 @@ #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) @@ -119,6 +120,7 @@ #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 diff --git a/src/config/param.ppc_darwin_70.h b/src/config/param.ppc_darwin_70.h index b07eb3215..a40c9ab41 100644 --- a/src/config/param.ppc_darwin_70.h +++ b/src/config/param.ppc_darwin_70.h @@ -6,7 +6,6 @@ #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 diff --git a/src/config/param.ppc_linux22.h b/src/config/param.ppc_linux22.h index bb0b72f3f..a3bbdea80 100644 --- a/src/config/param.ppc_linux22.h +++ b/src/config/param.ppc_linux22.h @@ -21,6 +21,7 @@ #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 diff --git a/src/config/param.ppc_linux24.h b/src/config/param.ppc_linux24.h index 71da510f3..708b2dea9 100644 --- a/src/config/param.ppc_linux24.h +++ b/src/config/param.ppc_linux24.h @@ -25,6 +25,7 @@ #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) @@ -104,6 +105,7 @@ #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 diff --git a/src/config/param.ppc_linux26.h b/src/config/param.ppc_linux26.h index efa4f2acd..eb8f90f33 100644 --- a/src/config/param.ppc_linux26.h +++ b/src/config/param.ppc_linux26.h @@ -27,6 +27,7 @@ #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) @@ -107,6 +108,7 @@ #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 diff --git a/src/config/param.s390_linux22.h b/src/config/param.s390_linux22.h index 6d97e6281..92cb7ef27 100644 --- a/src/config/param.s390_linux22.h +++ b/src/config/param.s390_linux22.h @@ -31,6 +31,7 @@ #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 diff --git a/src/config/param.s390_linux24.h b/src/config/param.s390_linux24.h index 69130a7f4..293669ddd 100644 --- a/src/config/param.s390_linux24.h +++ b/src/config/param.s390_linux24.h @@ -35,6 +35,7 @@ #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) @@ -119,6 +120,7 @@ #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 diff --git a/src/config/param.s390_linux26.h b/src/config/param.s390_linux26.h index cf3ebf7e1..119eee8fd 100644 --- a/src/config/param.s390_linux26.h +++ b/src/config/param.s390_linux26.h @@ -37,6 +37,7 @@ #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) @@ -127,6 +128,7 @@ #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 diff --git a/src/config/param.s390x_linux24.h b/src/config/param.s390x_linux24.h index 49c7d93af..616f3c1e6 100644 --- a/src/config/param.s390x_linux24.h +++ b/src/config/param.s390x_linux24.h @@ -40,6 +40,7 @@ #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) diff --git a/src/config/param.s390x_linux26.h b/src/config/param.s390x_linux26.h index bb3bc8515..3b112cd96 100644 --- a/src/config/param.s390x_linux26.h +++ b/src/config/param.s390x_linux26.h @@ -43,6 +43,7 @@ #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) diff --git a/src/config/param.sparc64_linux22.h b/src/config/param.sparc64_linux22.h index b7c081108..f50e6199f 100644 --- a/src/config/param.sparc64_linux22.h +++ b/src/config/param.sparc64_linux22.h @@ -36,6 +36,7 @@ #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 diff --git a/src/config/param.sparc64_linux24.h b/src/config/param.sparc64_linux24.h index 469ba1842..c6d0656e0 100644 --- a/src/config/param.sparc64_linux24.h +++ b/src/config/param.sparc64_linux24.h @@ -39,6 +39,7 @@ #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) @@ -135,6 +136,7 @@ #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 diff --git a/src/config/param.sparc64_linux26.h b/src/config/param.sparc64_linux26.h index 438709dca..86e3d8ff5 100644 --- a/src/config/param.sparc64_linux26.h +++ b/src/config/param.sparc64_linux26.h @@ -41,6 +41,7 @@ #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) @@ -137,6 +138,7 @@ #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 diff --git a/src/config/param.sparc_linux22.h b/src/config/param.sparc_linux22.h index a1f3d97b2..f1189d029 100644 --- a/src/config/param.sparc_linux22.h +++ b/src/config/param.sparc_linux22.h @@ -31,6 +31,7 @@ #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 diff --git a/src/config/param.sparc_linux24.h b/src/config/param.sparc_linux24.h index 97585d7be..04295bf68 100644 --- a/src/config/param.sparc_linux24.h +++ b/src/config/param.sparc_linux24.h @@ -34,6 +34,7 @@ #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) @@ -136,6 +137,7 @@ #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 diff --git a/src/config/param.sun4x_510.h b/src/config/param.sun4x_510.h index 8a78eeb11..c856f3300 100644 --- a/src/config/param.sun4x_510.h +++ b/src/config/param.sun4x_510.h @@ -34,6 +34,8 @@ #define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ #endif /* AFS_NAMEI_ENV */ +#define AFS_CACHE_VNODE_PATH 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ @@ -53,6 +55,7 @@ #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 */ diff --git a/src/config/param.sun4x_511.h b/src/config/param.sun4x_511.h index 118b24e21..c01b1d629 100644 --- a/src/config/param.sun4x_511.h +++ b/src/config/param.sun4x_511.h @@ -35,6 +35,8 @@ #define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ #endif /* AFS_NAMEI_ENV */ +#define AFS_CACHE_VNODE_PATH 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ @@ -54,6 +56,7 @@ #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 */ diff --git a/src/config/param.sun4x_58.h b/src/config/param.sun4x_58.h index f205a5286..0d078707a 100644 --- a/src/config/param.sun4x_58.h +++ b/src/config/param.sun4x_58.h @@ -51,6 +51,7 @@ #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 */ diff --git a/src/config/param.sun4x_59.h b/src/config/param.sun4x_59.h index fed11bc92..b5ad16459 100644 --- a/src/config/param.sun4x_59.h +++ b/src/config/param.sun4x_59.h @@ -52,6 +52,7 @@ #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 */ diff --git a/src/config/param.sunx86_510.h b/src/config/param.sunx86_510.h index a2ddf196c..b354fbd11 100644 --- a/src/config/param.sunx86_510.h +++ b/src/config/param.sunx86_510.h @@ -38,6 +38,8 @@ #define AFS_HAVE_FLOCK_SYSID 1 +#define AFS_CACHE_VNODE_PATH 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ @@ -63,6 +65,7 @@ #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 */ diff --git a/src/config/param.sunx86_511.h b/src/config/param.sunx86_511.h index a93467218..6a67e9338 100644 --- a/src/config/param.sunx86_511.h +++ b/src/config/param.sunx86_511.h @@ -39,6 +39,8 @@ #define AFS_HAVE_FLOCK_SYSID 1 +#define AFS_CACHE_VNODE_PATH 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ @@ -64,6 +66,7 @@ #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 */ diff --git a/src/config/param.sunx86_58.h b/src/config/param.sunx86_58.h index dd59bf325..8c8d0184b 100644 --- a/src/config/param.sunx86_58.h +++ b/src/config/param.sunx86_58.h @@ -62,6 +62,7 @@ #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 */ diff --git a/src/config/param.sunx86_59.h b/src/config/param.sunx86_59.h index a21ae17c7..31265c20d 100644 --- a/src/config/param.sunx86_59.h +++ b/src/config/param.sunx86_59.h @@ -63,6 +63,7 @@ #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 */ diff --git a/src/config/param.x86_darwin_100.h b/src/config/param.x86_darwin_100.h new file mode 100644 index 000000000..49cdd44ba --- /dev/null +++ b/src/config/param.x86_darwin_100.h @@ -0,0 +1,190 @@ +#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 + +#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 +#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 +#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) */ diff --git a/src/config/stds.h b/src/config/stds.h index 2ac240114..7380a8e61 100644 --- a/src/config/stds.h +++ b/src/config/stds.h @@ -255,4 +255,41 @@ struct afsUUID { }; 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 */ diff --git a/src/config/venus.h b/src/config/venus.h index 055f29958..aa180f59a 100644 --- a/src/config/venus.h +++ b/src/config/venus.h @@ -172,8 +172,8 @@ struct cm_initparams { #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 */ diff --git a/src/fsint/afsint.xg b/src/fsint/afsint.xg index b2b12d7e8..05bd2238c 100644 --- a/src/fsint/afsint.xg +++ b/src/fsint/afsint.xg @@ -393,7 +393,7 @@ struct AccessHistoryOld { afs_uint32 Residency4; }; -struct ResidencyCmdInputs { +struct FsCmdInputs { afs_int32 command; struct AFSFid fid; afs_int64 int64s[MAXCMDINT64S]; @@ -401,7 +401,7 @@ struct ResidencyCmdInputs { char chars[MAXCMDCHARS]; }; -struct ResidencyCmdOutputs { +struct FsCmdOutputs { afs_int32 code; struct AFSFetchStatus status; afs_int64 int64s[MAXCMDINT64S]; @@ -660,10 +660,10 @@ DFSSymlink( 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( diff --git a/src/gtx/windows.c b/src/gtx/windows.c index 4455dd933..8e5d63779 100644 --- a/src/gtx/windows.c +++ b/src/gtx/windows.c @@ -19,7 +19,7 @@ #include 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 @@ -114,7 +114,7 @@ gw_init(params) 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", diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c index e28630818..28aff1bf7 100644 --- a/src/kauth/kaserver.c +++ b/src/kauth/kaserver.c @@ -11,7 +11,7 @@ #include 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 #include @@ -249,34 +249,9 @@ main(argc, argv) 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) @@ -416,7 +391,7 @@ main(argc, argv) 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"); diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in index 05f5bb401..f0eaf1e17 100644 --- a/src/libafs/MakefileProto.FBSD.in +++ b/src/libafs/MakefileProto.FBSD.in @@ -26,15 +26,20 @@ AFS_OS_OBJS = \ AFS_OS_NONFSOBJS = \ osi_vfsops.o - # System specific build commands and flags KSRC = @BSD_KERNEL_PATH@ KBLD = @BSD_KERNEL_BUILD@ + +KOPTS = -fPIC + + KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \ - -elf -mpreferred-stack-boundary=2 \ + -elf \ + -mpreferred-stack-boundary=2 \ -fformat-extensions \ - -include ${KBLD}/opt_global.h + + -include ${KBLD}/opt_global.h -mpreferred-stack-boundary=2 -mno-align-long-strings -fformat-extensions -fno-common -ffreestanding \ -I${KBLD} -include opt_global.h -fno-strict-aliasing @@ -43,11 +48,8 @@ KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \ 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 @@ -65,12 +67,12 @@ setup: 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 - + -ln -fs /usr/include/rpc rpc - + -ln -fs ${KSRC}/rpc rpc -ln -fs ${KSRC}/sys sys diff --git a/src/libafs/afs.x86_darwin_100.plist.in b/src/libafs/afs.x86_darwin_100.plist.in new file mode 100644 index 000000000..a1385718c --- /dev/null +++ b/src/libafs/afs.x86_darwin_100.plist.in @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 8.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + @MACOS_VERSION@ + CFBundleSignature + ???? + CFBundleVersion + @MACOS_VERSION@ + OSBundleLibraries + + com.apple.kpi.bsd + 8.0.0 + com.apple.kpi.mach + 8.0.0 + com.apple.kpi.libkern + 8.0 + + + diff --git a/src/libuafs/MakefileProto.FBSD.in b/src/libuafs/MakefileProto.FBSD.in index ad535d1ae..e22be07a9 100644 --- a/src/libuafs/MakefileProto.FBSD.in +++ b/src/libuafs/MakefileProto.FBSD.in @@ -19,9 +19,9 @@ OPTF=-O TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD40_ENV TEST_LDFLAGS= - + TEST_LIBS=-lc_r - + TEST_LIBS=-lpthread diff --git a/src/lwp/process.amd64.s b/src/lwp/process.amd64.s index e33dfc3e4..58f9ae296 100644 --- a/src/lwp/process.amd64.s +++ b/src/lwp/process.amd64.s @@ -1,4 +1,4 @@ -/* $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 @@ -85,7 +85,8 @@ ENTRY(savecontext) 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 */ @@ -149,8 +150,9 @@ ENTRY(returnto) 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 diff --git a/src/packaging/RedHat/mockbuild.pl b/src/packaging/RedHat/mockbuild.pl index de31e1c19..dd4af2d3a 100755 --- a/src/packaging/RedHat/mockbuild.pl +++ b/src/packaging/RedHat/mockbuild.pl @@ -16,6 +16,7 @@ my $rootbase="/var/lib/mock/"; my $resultbase="/tmp/result/"; my $stashbase="/disk/scratch/repository/"; my $mockcommand = "/usr/bin/mock"; +my $resultfile; my $buildall = 0; my $ignorerelease = 1; my @newrpms; @@ -134,6 +135,26 @@ my %platconf = ( "fedora-5-i386" => { osver => "fc5", 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', @@ -153,6 +174,7 @@ my %badkernels = ( my $help; my $ok = GetOptions("resultdir=s" => \$resultbase, + "resultlist=s" => \$resultfile, "help" => \$help); my @platforms = @ARGV; @@ -234,7 +256,7 @@ foreach my $platform (@platforms) { 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"; @@ -282,7 +304,7 @@ foreach my $platform (@platforms) { $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 { @@ -342,7 +364,7 @@ foreach my $platform (@platforms) { } 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"; @@ -384,4 +406,8 @@ foreach my $platform (@platforms) { 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); +} diff --git a/src/packaging/RedHat/openafs-kmodtool b/src/packaging/RedHat/openafs-kmodtool index ac887d2ff..d776cfd27 100644 --- a/src/packaging/RedHat/openafs-kmodtool +++ b/src/packaging/RedHat/openafs-kmodtool @@ -39,6 +39,10 @@ get_verrel () { 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 () @@ -72,6 +76,7 @@ get_rpmtemplate () esac case "$verrel" in *.fc9*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;; + *.fc1?*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;; *) kname="${verrel}${variant}" ;; esac diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 8801542db..6c18eacf3 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -1,4 +1,7 @@ -# 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@ @@ -266,7 +269,7 @@ Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar 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 @@ -1014,7 +1017,7 @@ tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix} 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 @@ -1049,7 +1052,7 @@ PACKAGE_VERSION="%{dkms_version}" # 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" @@ -1432,12 +1435,14 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||: %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 @@ -1449,6 +1454,7 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||: %{_mandir}/man5/cacheinfo.* %{_mandir}/man8/afsd.* %{_mandir}/man5/CellAlias.* +%{_mandir}/man5/afszcm.cat.* %files server %defattr(-,root,root) diff --git a/src/pam/afs_util.c b/src/pam/afs_util.c index c75eb6dcc..36753b66e 100644 --- a/src/pam/afs_util.c +++ b/src/pam/afs_util.c @@ -21,11 +21,13 @@ #include #ifdef AFS_AIX51_ENV #include +#ifdef HAVE_SYS_PAG_H #include #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" diff --git a/src/ptserver/pt_util.c b/src/ptserver/pt_util.c index 52e212c53..cd28c5b0a 100644 --- a/src/ptserver/pt_util.c +++ b/src/ptserver/pt_util.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* * @@ -21,9 +21,10 @@ #include #include +#include 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 /*Command line parsing */ #include diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index f3240bb66..119054df9 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -51,7 +51,7 @@ #include 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 #include @@ -87,6 +87,7 @@ extern struct ubik_dbase *dbase; 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(); @@ -172,22 +173,9 @@ WhoIsThis(acall, at, aid) 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)) @@ -634,7 +622,24 @@ nameToID(call, aname, aid) 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, @@ -2275,7 +2280,6 @@ addWildCards(tt, alist, host) } #endif /* IP_WILDCARDS */ - afs_int32 WhoIsThisWithName(acall, at, aid, aname) struct rx_call *acall; @@ -2303,11 +2307,12 @@ WhoIsThisWithName(acall, at, aid, aname) } 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)) @@ -2316,19 +2321,9 @@ WhoIsThisWithName(acall, at, aid, aname) 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, "@"); diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c index 55916ebae..d6c823137 100644 --- a/src/ptserver/ptserver.c +++ b/src/ptserver/ptserver.c @@ -113,7 +113,7 @@ #include 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 #ifdef AFS_AIX32_ENV @@ -336,35 +336,10 @@ main(int argc, char **argv) } #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) { @@ -536,7 +511,7 @@ main(int argc, char **argv) } 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"); diff --git a/src/rx/rx.c b/src/rx/rx.c index 3c0c711fc..716828be3 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -17,7 +17,7 @@ #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" @@ -5380,7 +5380,7 @@ rxi_Send(register struct rx_call *call, register struct rx_packet *p, * 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; } @@ -5789,8 +5789,11 @@ rxi_ReapConnections(void) 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 */ diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 74c59231f..b61e6983d 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -583,8 +583,12 @@ extern int rx_getAllAddr(afs_int32 * buffer, int maxSize); 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); diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 9ca232c73..0c88bb205 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -15,7 +15,7 @@ #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 @@ -231,6 +231,8 @@ MTUXXX doesn't there need to be an "else" here ??? 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 @@ -690,6 +692,12 @@ rxi_WriteProc(register struct rx_call *call, register char *buf, 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 @@ -711,7 +719,7 @@ rxi_WriteProc(register struct rx_call *call, register char *buf, 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 | @@ -1050,7 +1058,7 @@ rx_WritevAlloc(struct rx_call *call, struct iovec *iov, int *nio, int maxio, 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; @@ -1073,6 +1081,8 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) #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) { @@ -1171,6 +1181,8 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) #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) { @@ -1202,7 +1214,7 @@ rx_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) 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)) { @@ -1242,6 +1254,9 @@ rxi_FlushWrite(register struct rx_call *call) } #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) diff --git a/src/rxdebug/rxdumptrace.c b/src/rxdebug/rxdumptrace.c new file mode 100644 index 000000000..a052a97a3 --- /dev/null +++ b/src/rxdebug/rxdumptrace.c @@ -0,0 +1,103 @@ +/* + * 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 +#include + +RCSID + ("$Header: /cvs/openafs/src/rxdebug/rxdumptrace.c,v 1.1.4.2 2009/02/17 04:25:42 shadow Exp $"); + +#ifdef RXDEBUG +#include +#ifdef AFS_NT40_ENV +#include +#include +#else +#include +#include +#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 +#ifdef AFS_NT40_ENV +#include +#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 diff --git a/src/rxgen/rpc_main.c b/src/rxgen/rpc_main.c index 031f7e921..50a9d9dff 100644 --- a/src/rxgen/rpc_main.c +++ b/src/rxgen/rpc_main.c @@ -37,7 +37,7 @@ #include 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 #include @@ -94,11 +94,15 @@ char xflag = 0; /* if set, add stats code to stubs */ 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 @@ -144,16 +148,14 @@ int 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 diff --git a/src/sys/pagsh.c b/src/sys/pagsh.c index 7d38a71d7..5b91b6e53 100644 --- a/src/sys/pagsh.c +++ b/src/sys/pagsh.c @@ -11,13 +11,15 @@ #include 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 #ifdef AFS_AIX51_ENV #include +#ifdef HAVE_SYS_PAG_H #include +#endif #include #endif #endif diff --git a/src/tests/OpenAFS/Auth.pm b/src/tests/OpenAFS/Auth.pm index ac0b9641a..5adbdf62a 100644 --- a/src/tests/OpenAFS/Auth.pm +++ b/src/tests/OpenAFS/Auth.pm @@ -380,7 +380,7 @@ sub authorize { 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; diff --git a/src/tests/OpenAFS/vos.pm b/src/tests/OpenAFS/vos.pm index 3f1ae6a6e..cdc33e353 100644 --- a/src/tests/OpenAFS/vos.pm +++ b/src/tests/OpenAFS/vos.pm @@ -144,6 +144,7 @@ sub AFS_vos_move { #: - 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 @@ -172,7 +173,7 @@ sub AFS_vos_examine { 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' ], diff --git a/src/tests/OpenAFS/wrapper.pm b/src/tests/OpenAFS/wrapper.pm index 4e4931f22..3649a4207 100644 --- a/src/tests/OpenAFS/wrapper.pm +++ b/src/tests/OpenAFS/wrapper.pm @@ -77,7 +77,7 @@ want to touch (e.g. B when the output file is stdout). 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 diff --git a/src/tests/afs-newcell.pl b/src/tests/afs-newcell.pl index 8ec1bc1c3..606bc005d 100755 --- a/src/tests/afs-newcell.pl +++ b/src/tests/afs-newcell.pl @@ -584,6 +584,7 @@ if ($unwind) { 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')); } @@ -680,7 +681,7 @@ print "debug: Starting the fileserver...\n" if $debug; 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"); diff --git a/src/tsm41/Makefile.in b/src/tsm41/Makefile.in index 359a48faf..c00e41776 100644 --- a/src/tsm41/Makefile.in +++ b/src/tsm41/Makefile.in @@ -58,9 +58,7 @@ AUTH_KRB_OBJS = \ 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 @@ -71,7 +69,7 @@ all: $(AUTHLIBS) 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} @@ -100,6 +98,8 @@ aix_auth.o: ${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 @@ -114,7 +114,9 @@ ${DEST}/root.client/usr/vice/etc/afs_dynamic_auth: afs_dynamic_auth ${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 diff --git a/src/tsm41/aix_aklog.c b/src/tsm41/aix_aklog.c index 9476de60b..393994488 100644 --- a/src/tsm41/aix_aklog.c +++ b/src/tsm41/aix_aklog.c @@ -9,9 +9,10 @@ #include #include +#include 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 @@ -23,7 +24,9 @@ RCSID #include #include #include +#ifdef HAVE_SYS_PAG_H #include +#endif #include #include #include diff --git a/src/ubik/recovery.c b/src/ubik/recovery.c index 8ddbff982..9689eb4c3 100644 --- a/src/ubik/recovery.c +++ b/src/ubik/recovery.c @@ -11,7 +11,7 @@ #include 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 #ifdef AFS_NT40_ENV @@ -578,7 +578,7 @@ urecovery_Interact(void *dummy) } #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; @@ -639,27 +639,27 @@ urecovery_Interact(void *dummy) #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 diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 99a7d17a0..280261c53 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -11,7 +11,7 @@ #include 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 #ifdef AFS_NT40_ENV @@ -550,7 +550,7 @@ SDISK_SendFile(rxcall, file, length, avers) (*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; @@ -605,24 +605,24 @@ SDISK_SendFile(rxcall, file, length, avers) #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 diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index 547babc4f..341d9d919 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -164,7 +164,7 @@ struct ubik_dbase { 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 */ diff --git a/src/update/client.c b/src/update/client.c index 9355a7001..4693799da 100644 --- a/src/update/client.c +++ b/src/update/client.c @@ -11,7 +11,7 @@ #include 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 #ifdef AFS_AIX32_ENV @@ -449,7 +449,7 @@ FetchFile(struct rx_call *call, char *remoteFile, char *localFile, int dirFlag) 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)) @@ -676,6 +676,7 @@ GetFileFromUpServer(struct rx_connection *conn, /* handle for upserver */ if (errcode) { printf("failed to fetch file %s \n", filename); afs_com_err(whoami, errcode, "fetching file"); + unlink(newfile); return 1; } @@ -686,6 +687,7 @@ GetFileFromUpServer(struct rx_connection *conn, /* handle for upserver */ (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 @@ -713,6 +715,7 @@ GetFileFromUpServer(struct rx_connection *conn, /* handle for upserver */ afs_com_err(whoami, errno, "could not change access and modify times on %s to %u %u", newfile, atime, mtime); + unlink(newfile); return 1; } diff --git a/src/util/afsutil.h b/src/util/afsutil.h index dceb2e36b..413f2f18f 100644 --- a/src/util/afsutil.h +++ b/src/util/afsutil.h @@ -43,8 +43,8 @@ extern void vFSLog(const char *format, va_list args); 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); diff --git a/src/util/afsutil_prototypes.h b/src/util/afsutil_prototypes.h index ab597783f..55a706866 100644 --- a/src/util/afsutil_prototypes.h +++ b/src/util/afsutil_prototypes.h @@ -74,7 +74,8 @@ extern int64_t flipbase64_to_int64(char *s); /* 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); diff --git a/src/util/dirpath.c b/src/util/dirpath.c index e915e1334..e0089f80a 100644 --- a/src/util/dirpath.c +++ b/src/util/dirpath.c @@ -11,7 +11,7 @@ #include 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 #include @@ -365,6 +365,8 @@ initDirPathArray(void) 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 diff --git a/src/util/dirpath.hin b/src/util/dirpath.hin index b94d8d7b6..23590ad4a 100644 --- a/src/util/dirpath.hin +++ b/src/util/dirpath.hin @@ -144,6 +144,7 @@ ConstructLocalLogPath(const char *cpath, #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" @@ -262,6 +263,7 @@ typedef enum afsdir_id { 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 @@ -329,6 +331,7 @@ const char *getDirPath(afsdir_id_t string_id); #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) diff --git a/src/util/dirpath_nt.h b/src/util/dirpath_nt.h index 230e0629d..b0c62bc39 100644 --- a/src/util/dirpath_nt.h +++ b/src/util/dirpath_nt.h @@ -135,6 +135,7 @@ extern int #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" @@ -257,6 +258,7 @@ typedef enum afsdir_id { 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; @@ -325,6 +327,7 @@ const char *getDirPath(afsdir_id_t string_id); #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) diff --git a/src/util/get_krbrlm.c b/src/util/get_krbrlm.c index 4f69ed5ea..b3fd381f0 100644 --- a/src/util/get_krbrlm.c +++ b/src/util/get_krbrlm.c @@ -7,7 +7,7 @@ #include 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 #include @@ -28,21 +28,148 @@ RCSID #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 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 #include @@ -124,6 +124,8 @@ main(int argc, char *argv[]) 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", diff --git a/src/venus/fs.c b/src/venus/fs.c index ceebc9883..c4cb63024 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -11,7 +11,7 @@ #include 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 #include @@ -46,6 +46,7 @@ RCSID #include #include #include +#include #include #include #include @@ -307,12 +308,15 @@ static char * 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; } @@ -1621,7 +1625,11 @@ ListMountCmd(struct cmd_syndesc *as, void *arock) * 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. @@ -3717,7 +3725,11 @@ FlushMountCmd(struct cmd_syndesc *as, void *arock) * 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. diff --git a/src/venus/livesys.c b/src/venus/livesys.c index 86b6e8492..b3e11334f 100644 --- a/src/venus/livesys.c +++ b/src/venus/livesys.c @@ -11,7 +11,7 @@ #include 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 #include @@ -24,6 +24,7 @@ RCSID #include #include #include +#include #include #include #include diff --git a/src/venus/twiddle.c b/src/venus/twiddle.c index d7e77f293..1255d2289 100644 --- a/src/venus/twiddle.c +++ b/src/venus/twiddle.c @@ -11,7 +11,7 @@ #include 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 #include @@ -22,6 +22,7 @@ RCSID #include #include #include +#include #include #include #ifdef AFS_AIX32_ENV diff --git a/src/venus/whatfid.c b/src/venus/whatfid.c index cd8abd55e..0d97dbbcf 100644 --- a/src/venus/whatfid.c +++ b/src/venus/whatfid.c @@ -14,7 +14,7 @@ #include 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 #include @@ -26,6 +26,7 @@ RCSID #include #include #include +#include #include #include #include "afs/prs_fs.h" diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 1b717de3f..573424aaa 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -29,7 +29,7 @@ #include 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 #include @@ -2051,11 +2051,21 @@ SRXAFS_DFSSymlink(struct rx_call *acall, struct AFSFid *DirFid, char *Name, } 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 { diff --git a/src/viced/callback.c b/src/viced/callback.c index 811c1e224..70ac594ec 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -83,7 +83,7 @@ #include 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 #include /* for malloc() */ @@ -532,19 +532,21 @@ InitCallBack(int nblks) 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 */ @@ -1797,6 +1799,8 @@ PrintCallBackStats(void) } #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 @@ -1804,7 +1808,7 @@ int 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 @@ -1842,11 +1846,14 @@ DumpCallBackState(void) /* 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 @@ -1858,15 +1865,25 @@ ReadDump(char *file) 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)); @@ -1898,8 +1915,9 @@ main(int argc, char **argv) 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++; @@ -1931,6 +1949,19 @@ main(int argc, char **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++; @@ -1944,12 +1975,16 @@ main(int argc, char **argv) } 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)); diff --git a/src/viced/host.c b/src/viced/host.c index 2b1b3b0a3..b45b1d97b 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -11,7 +11,7 @@ #include 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 #include @@ -180,7 +180,7 @@ static struct host *HTFree = 0; /* first free file entry */ */ 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 */ @@ -1420,12 +1420,17 @@ h_GetHost_r(struct rx_connection *tcon) 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; @@ -1460,13 +1465,45 @@ h_GetHost_r(struct rx_connection *tcon) } 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; @@ -1479,18 +1516,37 @@ h_GetHost_r(struct rx_connection *tcon) } 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; @@ -1511,23 +1567,104 @@ h_GetHost_r(struct rx_connection *tcon) * 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)) @@ -1811,7 +1948,8 @@ h_GetHost_r(struct rx_connection *tcon) 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 @@ -1819,13 +1957,26 @@ h_InitHostPackage() { 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= PR_MAXNAMELEN) { ViceLog(2, ("MapName: Name too long, using AnonymousID for %s@%s\n", diff --git a/src/viced/viced.c b/src/viced/viced.c index 615336caf..343a67250 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -20,7 +20,7 @@ #include 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 #include @@ -315,16 +315,16 @@ ResetCheckDescriptors(void) } #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; @@ -1078,7 +1078,8 @@ ParseArgs(int argc, char *argv[]) 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; @@ -1089,7 +1090,15 @@ ParseArgs(int argc, char *argv[]) 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 \n"); @@ -1120,34 +1129,9 @@ ParseArgs(int argc, char *argv[]) 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) { diff --git a/src/viced/viced.h b/src/viced/viced.h index 0b38c2ac1..2c8b9f4ac 100644 --- a/src/viced/viced.h +++ b/src/viced/viced.h @@ -198,7 +198,7 @@ extern int busyonrst; #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 diff --git a/src/vlserver/vldb_check.c b/src/vlserver/vldb_check.c index 3d8769bc2..6648fabc3 100644 --- a/src/vlserver/vldb_check.c +++ b/src/vlserver/vldb_check.c @@ -36,6 +36,10 @@ #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) @@ -43,8 +47,9 @@ #include 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 #include #include #include @@ -69,11 +74,15 @@ RCSID #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; @@ -81,6 +90,31 @@ struct er { } *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() @@ -98,16 +132,16 @@ readUbikHeader() 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); @@ -116,18 +150,18 @@ readUbikHeader() 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); @@ -142,7 +176,7 @@ vldbio(int position, char *buffer, int size, int rdwr) 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); } @@ -152,7 +186,7 @@ vldbio(int position, char *buffer, int size, int rdwr) 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); } @@ -212,7 +246,7 @@ readheader(struct vlheader *headerp) { int i, j; - vldbread(0, headerp, sizeof(*headerp)); + vldbread(0, (char *)headerp, sizeof(*headerp)); headerp->vital_header.vldbversion = ntohl(headerp->vital_header.vldbversion); @@ -240,35 +274,35 @@ readheader(struct vlheader *headerp) 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; } @@ -303,7 +337,7 @@ writeheader(struct vlheader *headerp) 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 @@ -312,7 +346,7 @@ readMH(afs_int32 addr, struct extentaddr *mhblockP) 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); @@ -335,7 +369,7 @@ readentry(afs_int32 addr, struct nvlentry *vlentryp, afs_int32 *type) { 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]); @@ -361,47 +395,47 @@ readentry(afs_int32 addr, struct nvlentry *vlentryp, afs_int32 *type) } 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"); } } } @@ -414,8 +448,7 @@ writeentry(afs_int32 addr, struct nvlentry *vlentryp) { 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]); @@ -431,7 +464,7 @@ writeentry(afs_int32 addr, struct nvlentry *vlentryp) 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 @@ -446,12 +479,12 @@ readSIT(int base, int addr) 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])); } } @@ -464,9 +497,9 @@ readSIT(int base, int addr) 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), @@ -478,11 +511,11 @@ readSIT(int base, int addr) 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); } } @@ -505,8 +538,7 @@ ReadAllEntries(struct vlheader *header) 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) { @@ -514,7 +546,7 @@ ReadAllEntries(struct vlheader *header) 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++) @@ -540,12 +572,12 @@ ReadAllEntries(struct vlheader *header) 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]); @@ -554,7 +586,7 @@ ReadAllEntries(struct vlheader *header) 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; } @@ -572,20 +604,20 @@ ReadAllEntries(struct vlheader *header) 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); } @@ -619,19 +651,19 @@ SetHashEnd(long addr, int type, long new) 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; } @@ -655,14 +687,13 @@ FollowNameHash(struct vlheader *header) 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; } @@ -670,13 +701,13 @@ FollowNameHash(struct vlheader *header) 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; @@ -689,8 +720,8 @@ FollowNameHash(struct vlheader *header) /* 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; } @@ -701,7 +732,7 @@ FollowNameHash(struct vlheader *header) 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)); } @@ -722,8 +753,7 @@ FollowIdHash(struct vlheader *header) 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)); @@ -738,21 +768,21 @@ FollowIdHash(struct vlheader *header) 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; @@ -765,8 +795,8 @@ FollowIdHash(struct vlheader *header) /* 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; @@ -780,10 +810,9 @@ FollowIdHash(struct vlheader *header) 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; @@ -802,26 +831,25 @@ FollowFreeChain(struct vlheader *header) 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; } @@ -830,7 +858,7 @@ FollowFreeChain(struct vlheader *header) count++; } if (verbose) - printf("%d entries on free chain\n", count); + quiet_println("%d entries on free chain\n", count); return; } @@ -866,7 +894,7 @@ CheckIpAddrs(struct vlheader *header) 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 @@ -874,8 +902,8 @@ CheckIpAddrs(struct vlheader *header) */ 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); } @@ -884,8 +912,8 @@ CheckIpAddrs(struct vlheader *header) } 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]); } @@ -896,20 +924,20 @@ CheckIpAddrs(struct vlheader *header) 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; } @@ -944,8 +972,8 @@ CheckIpAddrs(struct vlheader *header) 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 */ } @@ -963,8 +991,8 @@ CheckIpAddrs(struct vlheader *header) 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 */ @@ -972,33 +1000,33 @@ CheckIpAddrs(struct vlheader *header) } 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]) { @@ -1006,22 +1034,22 @@ CheckIpAddrs(struct vlheader *header) 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)); } @@ -1029,7 +1057,7 @@ CheckIpAddrs(struct vlheader *header) 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, @@ -1039,7 +1067,7 @@ CheckIpAddrs(struct vlheader *header) } } 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; @@ -1049,7 +1077,7 @@ void 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"))); } @@ -1062,19 +1090,28 @@ WorkerBee(struct cmd_syndesc *as, void *arock) 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; } @@ -1082,8 +1119,8 @@ WorkerBee(struct cmd_syndesc *as, void *arock) 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; @@ -1112,7 +1149,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) * 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; @@ -1134,7 +1171,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) 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)) { @@ -1230,71 +1267,69 @@ WorkerBee(struct cmd_syndesc *as, void *arock) } 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; @@ -1313,48 +1348,54 @@ WorkerBee(struct cmd_syndesc *as, void *arock) } } 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) { @@ -1373,7 +1414,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) } } 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) @@ -1383,7 +1424,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) } } 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) @@ -1393,7 +1434,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) } } 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) @@ -1418,7 +1459,7 @@ WorkerBee(struct cmd_syndesc *as, void *arock) else return 1; } - return 0; + return error_level; } int @@ -1438,6 +1479,7 @@ main(int argc, char **argv) "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); diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c index 1c890ee57..b694ef246 100644 --- a/src/vlserver/vlserver.c +++ b/src/vlserver/vlserver.c @@ -11,7 +11,7 @@ #include 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 #include @@ -211,34 +211,9 @@ main(argc, argv) 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) { @@ -362,7 +337,7 @@ main(argc, argv) 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); diff --git a/src/vol/fssync.c b/src/vol/fssync.c index 967cbdf85..23e1f7a10 100644 --- a/src/vol/fssync.c +++ b/src/vol/fssync.c @@ -51,15 +51,15 @@ static int newVLDB = 1; #include 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 #include -#include #ifdef AFS_NT40_ENV #include #include #else +#include #include #include #include @@ -527,7 +527,7 @@ defect #2080 for details. 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); @@ -667,7 +667,7 @@ FSYNC_Drop(int fd) 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) diff --git a/src/vol/listinodes.c b/src/vol/listinodes.c index dffe97748..e97dab691 100644 --- a/src/vol/listinodes.c +++ b/src/vol/listinodes.c @@ -23,7 +23,7 @@ #include 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) @@ -1664,7 +1664,7 @@ inode_ConvertROtoRWvolume(char *pname, afs_int32 volumeId) 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) { @@ -1767,7 +1767,7 @@ inode_ConvertROtoRWvolume(char *pname, afs_int32 volumeId) } #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) { diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c index 42682057f..162ff03d4 100644 --- a/src/vol/namei_ops.c +++ b/src/vol/namei_ops.c @@ -13,7 +13,7 @@ #include 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 @@ -1572,7 +1572,7 @@ namei_ConvertROtoRWvolume(char *pname, afs_int32 volumeId) 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) { @@ -1722,7 +1722,7 @@ namei_ConvertROtoRWvolume(char *pname, afs_int32 volumeId) 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) { diff --git a/src/vol/vnode.c b/src/vol/vnode.c index 7828adb68..643b0f7e5 100644 --- a/src/vol/vnode.c +++ b/src/vol/vnode.c @@ -17,7 +17,7 @@ #include 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 #include @@ -959,6 +959,7 @@ VCloseVnodeFiles_r(Volume * vp) for (vnp = VnodeHashTable[i]; vnp; vnp = vnp->hashNext) { if (vnp->volumePtr == vp) { IH_REALLYCLOSE(vnp->handle); + IH_RELEASE(vnp->handle); } } } diff --git a/src/vol/vol-info.c b/src/vol/vol-info.c index 493d4f46c..7f3c40868 100644 --- a/src/vol/vol-info.c +++ b/src/vol/vol-info.c @@ -18,7 +18,7 @@ #include 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 #include @@ -322,7 +322,7 @@ handleit(struct cmd_syndesc *as, void *arock) } } (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"); diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 73e41ea22..de3cb7ec9 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -92,7 +92,7 @@ Vnodes with 0 inode pointers in RW volumes are now deleted. #include 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 #include @@ -1787,7 +1787,7 @@ GetVolumeSummary(VolumeId singleVolumeNumber) || (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); @@ -2237,7 +2237,7 @@ SalvageVolumeHeaderFile(register struct InodeSummary *isp, 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; @@ -2264,7 +2264,7 @@ SalvageVolumeHeaderFile(register struct InodeSummary *isp, 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); } diff --git a/src/vol/volume.c b/src/vol/volume.c index fd495d31e..2d20c0686 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -20,7 +20,7 @@ #include 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 #include @@ -1680,7 +1680,7 @@ VGetVolumePath(Error * ec, VolId volumeId, char **partitionp, char **namep) *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)); @@ -1712,7 +1712,7 @@ char * 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; } diff --git a/src/vol/vutil.c b/src/vol/vutil.c index 702b9896f..181bbbc42 100644 --- a/src/vol/vutil.c +++ b/src/vol/vutil.c @@ -18,7 +18,7 @@ #include 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 #include @@ -171,7 +171,7 @@ VCreateVolume_r(Error * ec, char *partname, VolId volumeId, VolId parentId) 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); diff --git a/src/volser/vol-dump.c b/src/volser/vol-dump.c index ffc6c3328..9c61f35c5 100644 --- a/src/volser/vol-dump.c +++ b/src/volser/vol-dump.c @@ -18,7 +18,7 @@ #include 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 #include @@ -90,11 +90,11 @@ int VolumeChanged; /* needed by physio - leave alone */ 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" @@ -176,6 +176,8 @@ handleit(struct cmd_syndesc *as, void *arock) struct DiskPartition64 *partP = NULL; char name1[128]; char tmpPartName[20]; + int fromtime = 0; + afs_int32 code; #ifndef AFS_NT40_ENV @@ -195,6 +197,14 @@ handleit(struct cmd_syndesc *as, void *arock) 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); @@ -231,13 +241,13 @@ handleit(struct cmd_syndesc *as, void *arock) 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; @@ -279,7 +289,7 @@ HandleVolume(struct DiskPartition64 *dp, char *name, char *filename) exit(1); } - DoMyVolDump(vp, dp, filename); + DoMyVolDump(vp, dp, filename, fromtime); } @@ -298,6 +308,7 @@ main(int argc, char **argv) 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; } @@ -831,17 +842,16 @@ DumpPartial(int dumpfd, register Volume * vp, afs_int32 fromtime, 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); diff --git a/src/volser/volmain.c b/src/volser/volmain.c index 86a6c393e..31189590c 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -11,7 +11,7 @@ #include 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 #include @@ -311,35 +311,10 @@ main(int argc, char **argv) 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) { diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 2dd4ae002..b0bf41091 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -11,7 +11,7 @@ #include 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 #include @@ -152,7 +152,7 @@ ConvertVolume(afs_int32 avol, char *aname, afs_int32 asize) 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; } diff --git a/src/volser/vos.c b/src/volser/vos.c index cfac2fcfc..09a7c9496 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -11,7 +11,7 @@ #include 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 #include @@ -505,7 +505,7 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast, *totalOK += 1; } else { fprintf(STDOUT, "Off-line"); - *totalNotOK++; + *totalNotOK += 1; } if (pntr->needsSalvaged == 1) fprintf(STDOUT, "**needs salvage**"); @@ -546,13 +546,13 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast, 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 */ @@ -581,13 +581,13 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast, 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)); } } } @@ -776,14 +776,14 @@ XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP, 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 */ @@ -815,14 +815,14 @@ XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP, 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 */ @@ -977,14 +977,14 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP, 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 { @@ -1014,14 +1014,14 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP, 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 */ @@ -1147,14 +1147,14 @@ DisplayVolumes(server, part, pntr, count, longlist, fast, 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)); } } if (!quiet) { @@ -1235,14 +1235,14 @@ XDisplayVolumes(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast, 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)); } } @@ -1328,14 +1328,14 @@ XDisplayVolumes2(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast, 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)); } } @@ -1556,14 +1556,14 @@ ExamineVolume(register struct cmd_syndesc *as, void *arock) 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) @@ -1705,7 +1705,7 @@ SetFields(register struct cmd_syndesc *as, void *arock) 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); @@ -1737,7 +1737,7 @@ SetFields(register struct cmd_syndesc *as, void *arock) if (code) fprintf(STDERR, "Could not update volume info fields for volume number %lu\n", - (unsigned long)volid); + afs_cast_uint32(volid)); return (code); } @@ -1949,7 +1949,7 @@ CreateVolume(register struct cmd_syndesc *as, void *arock) } 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; } @@ -2035,7 +2035,7 @@ DeleteVolume(struct cmd_syndesc *as, void *arock) 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); } @@ -2093,7 +2093,7 @@ DeleteVolume(struct cmd_syndesc *as, void *arock) 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; } @@ -2188,16 +2188,16 @@ MoveVolume(register struct cmd_syndesc *as, void *arock) 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); } @@ -2219,7 +2219,7 @@ MoveVolume(register struct cmd_syndesc *as, void *arock) 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; @@ -2339,14 +2339,14 @@ CopyVolume(register struct cmd_syndesc *as, void *arock) 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); } @@ -2364,7 +2364,7 @@ CopyVolume(register struct cmd_syndesc *as, void *arock) 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; @@ -2464,7 +2464,7 @@ ShadowVolume(register struct cmd_syndesc *as, void *arock) 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); @@ -2525,7 +2525,7 @@ ShadowVolume(register struct cmd_syndesc *as, void *arock) 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); } } @@ -2540,7 +2540,7 @@ ShadowVolume(register struct cmd_syndesc *as, void *arock) 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); @@ -2560,7 +2560,7 @@ ShadowVolume(register struct cmd_syndesc *as, void *arock) 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; @@ -2730,7 +2730,7 @@ BackupVolume(register struct cmd_syndesc *as, void *arock) 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); } } @@ -3124,7 +3124,7 @@ RestoreVolume(register struct cmd_syndesc *as, void *arock) 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); } } @@ -3896,7 +3896,7 @@ VolumeZap(register struct cmd_syndesc *as, void *arock) 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; @@ -3917,7 +3917,7 @@ VolumeZap(register struct cmd_syndesc *as, void *arock) exit(1); } fprintf(STDOUT, "Backup Volume %lu deleted\n", - (unsigned long)backupid); + afs_cast_uint32(backupid)); } } code = UV_VolumeZap(server, part, volid); @@ -3925,7 +3925,7 @@ VolumeZap(register struct cmd_syndesc *as, void *arock) 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; } @@ -4092,7 +4092,7 @@ GetVolumeInfo(afs_int32 volid, afs_int32 *server, afs_int32 *part, afs_int32 *vo 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); } @@ -4107,7 +4107,7 @@ GetVolumeInfo(afs_int32 volid, afs_int32 *server, afs_int32 *part, afs_int32 *vo 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; } @@ -4120,7 +4120,7 @@ GetVolumeInfo(afs_int32 volid, afs_int32 *server, afs_int32 *part, afs_int32 *vo 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]) { @@ -4137,7 +4137,7 @@ GetVolumeInfo(afs_int32 volid, afs_int32 *server, afs_int32 *part, afs_int32 *vo } fprintf(STDERR, "unexpected volume type for volume %lu\n", - (unsigned long)volid); + afs_cast_uint32(volid)); return -1; } @@ -4939,7 +4939,7 @@ UnlockVLDB(register struct cmd_syndesc *as, void *arock) 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, @@ -5406,7 +5406,7 @@ ConvertRO(register struct cmd_syndesc *as, void *arock) 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; } @@ -5473,7 +5473,7 @@ ConvertRO(register struct cmd_syndesc *as, void *arock) 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; } -- 2.39.5