openafs.git
13 years agoFix checked build of vldb_check
Rod Widdowson [Tue, 29 Jun 2010 17:30:39 +0000]
Fix checked build of vldb_check

Checkin http://gerrit.openafs.org/#change,2027 appears to have caused
issues with the checked build for vldb_check.

This fixed is by reflecting the structure change into vldb_check

Change-Id: I12343be8a3a31cb2f6474115a8d9137dadd4ae2d
Reviewed-on: http://gerrit.openafs.org/2280
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUse git describe to determine build version
Simon Wilkinson [Sat, 26 Jun 2010 18:35:18 +0000]
Use git describe to determine build version

This patch makes the configure and build system use the output
from 'git describe' to determine the version of the software being
built. This means that all that is necessary to create a new release
is to tag the repository - removing the double sources of version
information.

There are a couple of fallbacks for systems which do not have git
available for builds. Firstly, if a file called '.version' exists
in the top level of the repository, then the version information is
pulled from this file. The intention is that those packaging up
git checkouts for onwards distribution will use
'git describe > .version' before producing their tarballs.

Secondly, if we cannot find any version information then the version
will default to 'UNKNOWN'

This all mirrors the way that many others have integrated git with
automake and friends - although the implementation is independent.

Change-Id: I7fa4605e52181d60657ad794ca8efdb5a9fb1449
Reviewed-on: http://gerrit.openafs.org/1824
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>

13 years agoLINUX24: crfree typo
Andrew Deason [Mon, 28 Jun 2010 16:03:28 +0000]
LINUX24: crfree typo

crfree, not crfee.

Change-Id: I4a2d4bd4e37e409b62d587b22c36f4a6d02e9c32
Reviewed-on: http://gerrit.openafs.org/2272
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: remove pagecopy and other 2.6-only code
Andrew Deason [Mon, 28 Jun 2010 15:43:55 +0000]
LINUX24: remove pagecopy and other 2.6-only code

The client background readahead code and 'readpages' implementation
were only written for 2.6 kernels and used 2.6-specific constructs.
Remove them, along with references to the 'pagecopy' code, and some
other 2.6-only cruft in osi_vnodeops.c.

Change-Id: I2e939e98bd72cd7b275b0f7a389607ee5dc94efa
Reviewed-on: http://gerrit.openafs.org/2271
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX: Remove LINUX26 conditional in proc2cred
Andrew Deason [Mon, 28 Jun 2010 16:24:04 +0000]
LINUX: Remove LINUX26 conditional in proc2cred

afs_osi_proc2cred contained a 2.4 implementation; remove it, since we
can assume at least 2.6.

Change-Id: I605856e920508cf49a975e5375ade87e00598763
Reviewed-on: http://gerrit.openafs.org/2274
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: Remove BDI references
Andrew Deason [Mon, 28 Jun 2010 16:17:50 +0000]
LINUX24: Remove BDI references

afs_backing_dev_info was still referenced in a couple of places in the
LINUX24 code. Although they are properly ifdef-guarded, these lines
were never getting built, so remove them.

Change-Id: I55ffca5dad99124b9d451925c9fcf15b7060bb9b
Reviewed-on: http://gerrit.openafs.org/2273
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: NEED_IOCTL32 fixup
Andrew Deason [Mon, 28 Jun 2010 15:46:22 +0000]
LINUX24: NEED_IOCTL32 fixup

The NEED_IOCTL32 symbol needs to protect the entire if block, not just
the conditionals.

Change-Id: Ie33860b1d5677cec19ed19aa1ccc1ce0a26824ff
Reviewed-on: http://gerrit.openafs.org/2270
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: cr_ref is a regular int
Andrew Deason [Mon, 28 Jun 2010 15:42:05 +0000]
LINUX24: cr_ref is a regular int

cr_ref is a regular integer, not an atomic_t, so we need to just
assign '1' to it directly.

Change-Id: I3533c79a67f7be35724cc81553d24bfecb7b81d3
Reviewed-on: http://gerrit.openafs.org/2269
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: Remove group_info macros/functions
Andrew Deason [Mon, 28 Jun 2010 15:33:38 +0000]
LINUX24: Remove group_info macros/functions

The LINUX24 code has a macro and a function abstracting
'struct group_info' access. But 'struct group_info' does not exist in
2.4, and nothing calls these, so get rid of them.

Change-Id: Ic38f5be27d55da9fdf6ce7889d4df6afd1464c0f
Reviewed-on: http://gerrit.openafs.org/2268
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake file offsets in vldb layout unsigned ints
Rod Widdowson [Wed, 26 May 2010 15:18:26 +0000]
Make file offsets in vldb layout unsigned ints

vlserver.h has a few cases where links through the vldb are being
stored as afs_int32s. These are file offsets and should be unsigned.
This commit fixes just these declarations.  The code still compiles
(because they are silently cast all over the shop), but it starts
the tidy effort.

Change-Id: Iba14bd28cb43a6ca6401be4252bb45135d8b3a55
Reviewed-on: http://gerrit.openafs.org/2027
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake make_libafs_tree.pl use strict and warnings
Simon Wilkinson [Sun, 27 Jun 2010 14:15:33 +0000]
Make make_libafs_tree.pl use strict and warnings

Turn on the perl use strict and use warnings options in the
make_libafs_tree script to better catch programming bugs.

Change-Id: Ide358d40eda3cde9dd0261af11993560da71143a
Reviewed-on: http://gerrit.openafs.org/2266
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Use filehandles for all 2.6 kernels
Marc Dionne [Sat, 26 Jun 2010 00:06:08 +0000]
Linux: Use filehandles for all 2.6 kernels

This generalizes the use of the exportfs API and file handles
to open disk cache files for all 2.6 kernels.

Code outside of src/afs/LINUX (ex: afsd) can assume that file
handles are used for all 2.6 kernels and can use AFS_LINUX26_ENV
to check.

Within src/afs/LINUX/osi_file.c, NEW_EXPORT_OPS can be used to
determine if the old exportfs API (pre 2.6.24) or the new one
applies.

All traces of the LINUX_USE_FH define are removed.

FIXES 127530

Change-Id: I6803101c56981f9f674cef581f7299656723fdf3
Reviewed-on: http://gerrit.openafs.org/2260
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agolinux trivially track host signedness in afs_prototypes.h
Matt Benjamin [Mon, 28 Jun 2010 00:00:37 +0000]
linux trivially track host signedness in afs_prototypes.h

track host signedness in definition of afs_nfsclient_reqhandler, which
changed in 7d1bbee02a80f045a6ae4e30410798f4785906a8.

Change-Id: If85cbbb36c138fbe6ded93ba7c1c2af31825f5bb
Reviewed-on: http://gerrit.openafs.org/2267
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolibafs: correct export_reqhandler prototype
Andrew Deason [Fri, 25 Jun 2010 20:03:23 +0000]
libafs: correct export_reqhandler prototype

The export_reqhandler function pointer takes an afs_int32*, not an
afs_int32 as the fourth argument.

Change-Id: I89ef9cfd23a5b673cbbb29fc710236cfe1e3c7cf
Reviewed-on: http://gerrit.openafs.org/2257
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUse unsigned addresses in the NFS exporter
Andrew Deason [Fri, 25 Jun 2010 19:17:49 +0000]
Use unsigned addresses in the NFS exporter

Use unsigned IP addresses in the NFS exporter code in libafs. This
modifies the distributed headers exporter.h and nfsclient.h.

Change-Id: Ieaddf21e487ae416d7b003223566c999c64279aa
Reviewed-on: http://gerrit.openafs.org/2256
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUse unsigned IP addresses in bu*
Andrew Deason [Fri, 25 Jun 2010 18:52:16 +0000]
Use unsigned IP addresses in bu*

Use unsigned IP addresss in bubasics, bucoord, and butc code. This
alters the public tcdata.p.h, but stays away from wire RPCs or
variables used directly with those RPCs.

Change-Id: Ica96172399cafbc2c347f725a966cf1db7ff1128
Reviewed-on: http://gerrit.openafs.org/2255
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovlserver: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 17:43:50 +0000]
vlserver: Use unsigned addresses

Use unsigned IP addresses in vlserver code. This alters some
structures in the public cnvldb.h header.

Change-Id: I62725ad98d2c4e8bfe610ae9a6132fd0f54cc4aa
Reviewed-on: http://gerrit.openafs.org/2254
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: remove some 2.6 specific code from 2.4
Marc Dionne [Fri, 25 Jun 2010 23:33:51 +0000]
Linux: remove some 2.6 specific code from 2.4

Remove some code that will never be compiled or used in the
afs/LINUX24 directory.
This includes code depending on AFS_LINUX26_ENV, and on
LINUX_USE_FH which is never set in 2.4 and is going away
soon anyway.

Change-Id: I972262b45d3518d996756b5dc9f6e6c01450e5cc
Reviewed-on: http://gerrit.openafs.org/2259
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAutoconf: Update AC_INIT macro use
Simon Wilkinson [Sat, 26 Jun 2010 16:39:20 +0000]
Autoconf: Update AC_INIT macro use

Update the way that we use the AC_INIT macro to match current
autoconf conventions

Change-Id: Ib1ce2acd879683ff8ff178cfbd9776277ba7460f
Reviewed-on: http://gerrit.openafs.org/2265
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRPM Packaging: Make file types clear
Simon Wilkinson [Sat, 26 Jun 2010 14:59:21 +0000]
RPM Packaging: Make file types clear

Make it clear that makesrpm.pl takes the bz2, rather than gzip'd,
versions of the OpenAFS distribution.

Change-Id: Ifb99448df5c7060186da1f13ee9c38ba95373376
Reviewed-on: http://gerrit.openafs.org/2264
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRPM Packaging: All debug kernels are bad
Simon Wilkinson [Sat, 26 Jun 2010 14:55:29 +0000]
RPM Packaging: All debug kernels are bad

We can't build against any of the recent Fedora debug kernels, because
they have options enabled that make criticial symbols GPL-only. Just
skip all debug kernel variants, rather than having to explicitly list
each new Fedora release as it comes out.

Change-Id: I8ed4c04b10facc79fd5a68888ddb10b368b49bef
Reviewed-on: http://gerrit.openafs.org/2263
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRPM Packaging: Add support for Fedora 12 and Fedora 13
Simon Wilkinson [Sat, 26 Jun 2010 14:54:05 +0000]
RPM Packaging: Add support for Fedora 12 and Fedora 13

Add support for building for Fedora 12 and 13, both i386 and x86_64

Change-Id: I2bb6e86ac81eeae720b8dbf185927f6e55be826c
Reviewed-on: http://gerrit.openafs.org/2262
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRPM Packaging: Skip comments in configure.in
Simon Wilkinson [Sat, 26 Jun 2010 14:35:07 +0000]
RPM Packaging: Skip comments in configure.in

Skip comments in the configure.in file, so we don't end up using the
commented out version information.

Change-Id: I14bef1d448b77c915aa04b3fe555b270ce20ac67
Reviewed-on: http://gerrit.openafs.org/2261
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove semicolon from AFS_NORETURN
Andrew Deason [Mon, 14 Jun 2010 16:01:06 +0000]
Remove semicolon from AFS_NORETURN

AFS_NORETURN had a trailing semicolon, which will confuse potential
future additional attribute markers, if used after AFS_NORETURN.
Remove it.

Change-Id: I21fd6b874728b8ca74d0e8abd783cd5015f63e97
Reviewed-on: http://gerrit.openafs.org/2258
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoptserver: Remove IP_WILDCARDS symbol
Andrew Deason [Fri, 25 Jun 2010 16:38:37 +0000]
ptserver: Remove IP_WILDCARDS symbol

ptserver defined the symbol IP_WILDCARDS to enable the use of
wildcarding in machine entries. It is always enabled, so just remove
the symbol and always use the wildcard code.

Change-Id: I7d45de5ef1bb0d2c95f1e1ea86fd4418cf3ddd62
Reviewed-on: http://gerrit.openafs.org/2253
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoptserver: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 16:30:15 +0000]
ptserver: Use unsigned addresses

Use unsigned IP addresses in ptserver code. This alters some
prototypes in the public ptuser.h header.

Change-Id: Id121f32cb0b6acd575822d37bbd814636023e9ae
Reviewed-on: http://gerrit.openafs.org/2252
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agorx: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 14:48:38 +0000]
rx: Use unsigned addresses

RX sometimes uses afs_int32 to represent IP addresses; make it use
afs_uint32. This alters some structures in rx.h and some prototypes in
rx_prototypes.h.

Change-Id: I97df8a5de8f5e0355ab2056825de68bb7122e439
Reviewed-on: http://gerrit.openafs.org/2251
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovolser: Use unsigned addresses and volume IDs
Andrew Deason [Thu, 24 Jun 2010 15:19:21 +0000]
volser: Use unsigned addresses and volume IDs

Fix code and header files in src/volser that use afs_int32 for server
IP addresses instead of afs_uint32 (the worst offenders being UV_*
functions). Also fix an instance of afs_int32 being used for a volume
ID, and remove 'struct volser_dest' instead of fixing it, since it is
completely unused.

Change-Id: I1008ed158855c2a22b4605b5a037f5e68731529e
Reviewed-on: http://gerrit.openafs.org/2249
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agowindows add rx_Get/SetServiceSpecific to libafsrpc module exports
Matt Benjamin [Thu, 24 Jun 2010 12:51:06 +0000]
windows  add rx_Get/SetServiceSpecific to libafsrpc module exports

Add rx_GetServiceSpecific and rx_SetServiceSpecific to afsrpc.def
using the next available ordinals (267 and 268).

Change-Id: I31af43e9706b922ef765a51f50f583f492ce375a
Reviewed-on: http://gerrit.openafs.org/2245
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoLinux: Check return code from VerifyVCache in mmap
Simon Wilkinson [Thu, 24 Jun 2010 15:00:22 +0000]
Linux: Check return code from VerifyVCache in mmap

afs_linux_mmap wasn't doing anything with the return code
from afs_linux_VerifyVCache. Change the code so that it matches
the other callers of afs_linux_VerifyVCache

Change-Id: I83b949bf3b9579e5dd2e20b487862566c1d7c730
Reviewed-on: http://gerrit.openafs.org/2247
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove stale warning suppressions
Andrew Deason [Wed, 23 Jun 2010 22:42:30 +0000]
Remove stale warning suppressions

butc/dump.c and ubik/beacon.c have had their warnings fixed and their
suppressions removed. Remove the warning suppression for tbutc/dump.c
and tubik/beacon.c, as well.

Change-Id: Ie3cae93932797ef5a55403f3548518af6da267f0
Reviewed-on: http://gerrit.openafs.org/2242
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: Cleanup of src/config/NTMakefile
Jeffrey Altman [Wed, 23 Jun 2010 16:56:17 +0000]
Windows: Cleanup of src/config/NTMakefile

src/config/NTMakefile had the following issues:

 * duplicate entries for headers in $(INCFILES)

 * no clean: rule for $(INCFILES)

 * no clean: rule for $(DESTDIR)\util_cr.exe

 * $(INCTOOLS) dependent upon $(INCFILES) but the order is reversed
   in the install: rule

Change-Id: I2707009d60b303ab897ed25d9245d893fa342a8e
Reviewed-on: http://gerrit.openafs.org/2238
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Matt Benjamin <matt@linuxbox.com>

13 years agowindows don't include assert.h (and afs support headers) in util_cr.c
Matt Benjamin [Wed, 23 Jun 2010 14:26:12 +0000]
windows  don't include assert.h (and afs support headers) in util_cr.c

Don't include afsconfig.h and afs/param.h in util_cr.c, nor
assert.h.  The assert was included but was in fact not used in
the file, and can be ommitted, per jaltman.  The OpenAFS
includes are then not needed.  An incorrect cast is also changed,
due to jaltman.

Change-Id: I3e1ad7a1d24473d6ad3ce2e401133b25b0a4c795
Reviewed-on: http://gerrit.openafs.org/2234
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoIndicate that fssync unix sockets are the default
Andrew Deason [Wed, 23 Jun 2010 22:47:43 +0000]
Indicate that fssync unix sockets are the default

Using unix domain sockets for FSSYNC has been the default for some
time now; make it clear from the configure help output that this is
the case.

Change-Id: Ibe8b41361242d6cea035b7710910d7d693f60a85
Reviewed-on: http://gerrit.openafs.org/2241
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>

13 years agoubik: Remove api for reading during write locks
Andrew Deason [Wed, 23 Jun 2010 21:23:15 +0000]
ubik: Remove api for reading during write locks

This reverts commit eaeff661c26b0f5a504a547952ea1d0f0241b539.

The code using this API will not be in 1.6. Remove this interface for
the 1.6 branch, as it is known to have issues.

FIXES 127520

Change-Id: I3dfef084282b0ca8ec968872b433e60f615a9c44
Reviewed-on: http://gerrit.openafs.org/2240
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoTry to flush vnodes in FBSD's unmount, bailing if necessary
Ben Kaduk [Fri, 18 Jun 2010 04:05:14 +0000]
Try to flush vnodes in FBSD's unmount, bailing if necessary

vflush() actually returns something!  Check if we get EBUSY,
and don't continue if so.  Also, actually call vflush on FBSD80_ENV.
Note that we currently leak refs on our root vnode, so this means
umount will fail unless it uses -f, for now.

Change-Id: I8f02ebfa127409f0e8567f3efa7eccf491147cbd
Change-Id: Iaa4666f1004b49b69a82c778a3de60633fac880f
Reviewed-on: http://gerrit.openafs.org/2214
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agomariner log messages for creating and removing files
Derrick Brashear [Tue, 27 Apr 2010 17:22:37 +0000]
mariner log messages for creating and removing files

give a hint to event listeners that files are being created and removed

Change-Id: I6202184424607e97b7d103a6e7033f950c203cce
Reviewed-on: http://gerrit.openafs.org/1852
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDon't hold on to the afs_xvcache lock while creating a symlink
Rainer Toebbicke [Mon, 21 Jun 2010 10:02:46 +0000]
Don't hold on to the afs_xvcache lock while creating a symlink

Holding the afs_xvcache lock over the RPC while creating a symlink is a
severe blow to performance as look-ups from other tasks likely
require the lock. Drop the lock and rely solely on the fileserver
to detect a clash with a same entry created simultaneously.

Change-Id: Ia6de353bd9dc003addf5f3be7a8f3e769247a513
Reviewed-on: http://gerrit.openafs.org/2233
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agovldb_check: Interpret VLOP_* vlentry flags
Andrew Deason [Wed, 23 Jun 2010 15:13:39 +0000]
vldb_check: Interpret VLOP_* vlentry flags

The flags for each vldb entry can have various VLOP_* bits set to show
that the entry is locked, and for what reason. In vldb_check, output
these bits symbolically instead of mentioning them in "errorflags".

Change-Id: Iee7797bc701742e778391c07936eb771139bc8e9
Reviewed-on: http://gerrit.openafs.org/2236
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovos: Interpret VLOP_* lock flags
Andrew Deason [Wed, 23 Jun 2010 14:58:38 +0000]
vos: Interpret VLOP_* lock flags

When a volume is locked in the VLDB, we are given flags for the reason
why the lock was set. Make vos interpret and output this reason.

This adds output to any vos command that previously printed that a
volume was LOCKED. It now outputs, for example,

    Volume is currently LOCKED
    Volume is locked for a delete/misc operation

Change-Id: Ie3a6f804a3e3a551840975c3689b24d3916891df
Reviewed-on: http://gerrit.openafs.org/2235
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agopatch cbd_printCBcrash - harden callback debugging
Rainer Toebbicke [Tue, 4 May 2010 10:06:55 +0000]
patch cbd_printCBcrash - harden callback debugging

Create callbackup dumps with updates locked out and add bounds checking
and loop detection to the cbd program.

Change-Id: I927937aef33dca261877b8f2605239f3d4763a8a
Reviewed-on: http://gerrit.openafs.org/1902
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDo not corrupt volume linktable when special file already exists
Rainer Toebbicke [Tue, 4 May 2010 12:11:30 +0000]
Do not corrupt volume linktable when special file already exists

Upon volume creation, when a special file unexpectedly exists, e.g. due
to a failed cleanup, do not blindly assume that it is the link table.
Otherwise the latter's magic will get silently overwritten.

Change-Id: Iba05ae771e04272a3dab5534fcfc24cda5ee7df5
Reviewed-on: http://gerrit.openafs.org/1903
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake ubik use unsigned addresses
Andrew Deason [Fri, 27 Nov 2009 22:56:19 +0000]
Make ubik use unsigned addresses

The ubik code currently treats IPv4 addresses as both signed and
unsigned 32-bit ints. Make some instances use unsigned ints to make ubik
more consistent and squash a couple of warnings.

Note that this slightly alters the signatures of the public ubik
functions ubeacon_InitServerListByInfo, ubeacon_InitServerList,
ubik_ServerInitByInfo, ubik_ServerInit, ubik_ParseClientList, and
ubik_ParseServerList, to use unsigned addresses.

Change-Id: I27b6170d4de0080bf66d51a6b5332e65685ddef8
Reviewed-on: http://gerrit.openafs.org/875
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMention that -fakestat fakes local cellular mounts
Andrew Deason [Mon, 17 May 2010 20:44:50 +0000]
Mention that -fakestat fakes local cellular mounts

The afsd man page says that -fakestat only fakes stat information for
cross-cell mount points. Technically it fakes stat information for all
cellular mount points, local or foreign. Most people shouldn't care,
but note the difference, since some places do have local cellular
mount points.

Change-Id: I9bc61a0284b7d04439578a4fc5a6adf791217463
Reviewed-on: http://gerrit.openafs.org/1979
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoProvide manpage for fssync-debug and most subcmds
Davor Ocelic [Sun, 20 Jun 2010 13:38:14 +0000]
Provide manpage for fssync-debug and most subcmds

This is another patch in the series to provide manpages for
dafs-related commands.

Most (if not all) documentation is coming from source
documentation and DAFS articles/presentations.

The primary motivation behind this is to comply with Debian
guidelines requiring all binaries to have respective manpages.

This patch has been sitting here for months, so it's good time
to finally submit it.

Note that fssync-debug also supports some vcg* commands, for
which I was not able to find any documentation I could use.
So, they are still left to be documented.

Change-Id: I9d067766e2a90b26646edc87f15a4f533c5c8d44
Reviewed-on: http://gerrit.openafs.org/2220
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agono fs sa /afs in dynroot mode
Derrick Brashear [Wed, 28 Apr 2010 03:48:36 +0000]
no fs sa /afs in dynroot mode

change the quick start guide so people stop asking why they can't
set the ACL on /afs.

Change-Id: Iffc6c95564e99c01cef1b2b54d6b35e9bd01f38c
Reviewed-on: http://gerrit.openafs.org/1872
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovol: break callbacks when needsCallback is set
Andrew Deason [Fri, 11 Jun 2010 22:40:18 +0000]
vol: break callbacks when needsCallback is set

The needsCallback vol header field indicates that a volume has been
altered by a non-fileserver program somehow, and that callbacks for
the volume should be broken. So, when we attach a volume that has this
flag set, break callbacks if we can. If we are not the fileserver,
tell the fileserver over FSSYNC to break callbacks if we can.

Change-Id: I1b1a4042f0381e8291a407b54ce9478877dacdca
Reviewed-on: http://gerrit.openafs.org/2211
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agorx mtu ping timing tweaks
Derrick Brashear [Tue, 22 Jun 2010 15:52:48 +0000]
rx mtu ping timing tweaks

avoid potentially sending pings too often. if we aren't desperate,
push out grow mtu pings to just inside call timeouts.

Change-Id: Ieb28700fd02894f3308123c8f64a1ec5ae7989d9
Change-Id: I3a3557680f5486474165567786f9a2da58f34519
Reviewed-on: http://gerrit.openafs.org/2228
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix CHush test
Marc Dionne [Tue, 22 Jun 2010 21:37:15 +0000]
Fix CHush test

The compiler flagged this with a warning, and depending on the
flags that are set, the test may not give the expected result.

Use parentheses to get the intended precedence.

Change-Id: If0311aae70d6e71b69e247e5b66e0dd558c2c958
Reviewed-on: http://gerrit.openafs.org/2232
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoafsd -dynroot-sparse mode for hushed cells
Derrick Brashear [Sat, 19 Jun 2010 15:26:49 +0000]
afsd -dynroot-sparse mode for hushed cells

if an admin specifies -dynroot-sparse (instead of dynroot) come up
with just local cell and cell aliases showing. cell list
is configured as normal. fs newcell works as normal.

document it.

Change-Id: Ie644ed0f9923a85da5451eafaa114ddf36daa671
Reviewed-on: http://gerrit.openafs.org/2217
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agotest suite warning safety
Derrick Brashear [Mon, 21 Jun 2010 05:06:38 +0000]
test suite warning safety

make test suite compile without warning

Change-Id: I4e4b63d6ce2ae73e5458913aa81308b2691044a9
Reviewed-on: http://gerrit.openafs.org/2223
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agosalvaged: Break volume callbacks on vol change
Andrew Deason [Fri, 11 Jun 2010 22:39:32 +0000]
salvaged: Break volume callbacks on vol change

The salvager code can change a volume in many ways as it fixes errors.
We should break callbacks on the volume whenever we change it, as
clients may have callbacks on whatever we changed. So, for the
salvageserver, send an FSSYNC command to the fileserver to tell it to
break callbacks for that volume.

FIXES 127030

Change-Id: I1cd869371167df7d4e55ac14400865fb0a9c5154
Reviewed-on: http://gerrit.openafs.org/2210
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoSimplify preprocessor logic in afs_pioctl
Ben Kaduk [Sun, 20 Jun 2010 22:54:26 +0000]
Simplify preprocessor logic in afs_pioctl

We had identical code in two branches of an if/elif/else path.
Merge them together.
This allows two DARWIN80_ENV blocks to be coalesced; reindent
them correctly while we're here.

Change-Id: Icaa047994ec970ee8187a7811ee69de2f36a0503
Reviewed-on: http://gerrit.openafs.org/2222
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoSet VolumeChanged when we create a new root dir
Andrew Deason [Fri, 11 Jun 2010 22:18:07 +0000]
Set VolumeChanged when we create a new root dir

Set the VolumeChanged flag when we create a new root directory in a
volume when salvaging, since doing so changes the volume.

Change-Id: Ic6cd0b0d6f9b52f2006a114269321a38d312ab9b
Reviewed-on: http://gerrit.openafs.org/2212
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovldb_check: ntohs ubik header size
Andrew Deason [Mon, 21 Jun 2010 22:28:10 +0000]
vldb_check: ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide. So, we must
use ntohs to convert it, not ntohl. Without this, vldb_check would
emit false-positive "Ubik header size is 0" warnings.

Change-Id: Iaa06b6dc58b7812b359d6096c112e1f3897c60e2
Reviewed-on: http://gerrit.openafs.org/2226
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik: Do not hide ReplayLog errors
Andrew Deason [Mon, 21 Jun 2010 20:47:06 +0000]
ubik: Do not hide ReplayLog errors

For some reason, the ReplayLog code was printing encountered errors in
the replay log as debug messages. Print them out as regular log
messages instead, since these are errors that at least warrant
visibility, if not more action.

Change-Id: Ifba22278e2f5f33010b87eebfc484ccd3745f916
Reviewed-on: http://gerrit.openafs.org/2225
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik: ntohl on reading the replay log
Andrew Deason [Fri, 18 Jun 2010 22:20:22 +0000]
ubik: ntohl on reading the replay log

When attempting to read the replay log, ubik was not ntohl'ing all
integers that were read in from the log, causing the log to appear
invalid on little-endian systems. Fix it.

This problem manifests as apparent corruption in the database on top
of ubik when a commit is occurring when we are shut down, or a disk
error is encountered during a commit.

Change-Id: I82e04c59d0f55aa2105b02feb6ee332ea85eb4f3
Reviewed-on: http://gerrit.openafs.org/2224
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUpdate manpage links, fix doc typo in fssync-debug
Davor Ocelic [Sun, 20 Jun 2010 13:27:06 +0000]
Update manpage links, fix doc typo in fssync-debug

Change-Id: I93a4fc4c998e489c6bdc736f0f4172c752d9f030
Reviewed-on: http://gerrit.openafs.org/2219
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoupdate macos readmes
Derrick Brashear [Sat, 19 Jun 2010 17:08:43 +0000]
update macos readmes

no more APSL source is used. also, reboots are not required.

Change-Id: I61217b557c6193c922bc1b72b41e076e81db49e5
Reviewed-on: http://gerrit.openafs.org/2218
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix aklog segfault
Ben Kaduk [Thu, 17 Jun 2010 04:27:51 +0000]
Fix aklog segfault

In auth_to_cell(), we only strdup() into the linkedcell argument
if there is a linkedCell in the current cellconf.  However, in
main(), we free linkedcell if it is non-NULL, but it is allocated
on the stack and could contain garbage.  free() chokes on such
garbage, causing aklog to abort().
If we copy nothing into linkedcell, set it to NULL so that we
do not attempt to free the bogus pointer.

Change-Id: I92905a5f17021ce1bc41909f5ceb1b0344456d93
Reviewed-on: http://gerrit.openafs.org/2213
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Remove the BKL
Simon Wilkinson [Fri, 23 Apr 2010 17:39:14 +0000]
Linux: Remove the BKL

Recent investigations suggest that we no long require the BKL on
Linux. As an experiment, remove it.

Change-Id: I764fe1f6e9761ada5a0a86ba59450c0615bb1e78
Reviewed-on: http://gerrit.openafs.org/1823
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove configure remnants of Digital UNIX / Tru64 client
Russ Allbery [Wed, 16 Jun 2010 01:59:22 +0000]
Remove configure remnants of Digital UNIX / Tru64 client

Remove the configure flag to specify the location of the Digital
UNIX kernel headers and some setup for the kernel module build.
Note in README that Digital UNIX / Tru64 is supported for servers
only.

Change-Id: I983f74068b1a1ae76d9a2b2549a8a141dba4e075
Reviewed-on: http://gerrit.openafs.org/2207
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoIRIX: Implement makesname()
Chaz Chandler [Mon, 14 Jun 2010 04:21:50 +0000]
IRIX: Implement makesname()

makesname() make a semaphore name for use in <sys/sema.h>-type routines on
IRIX.  It takes as input a pointer to an allocated string buffer (sname) of
size METER_NAMSZ, a string prefix (prefix), and a vnode number (v_number).
When complete, sname is returned, pointing to the beginning of a
NULL-terminated string containing the new name, with a maximum of
(METER_NAMSZ-1) characters plus the NULL.  The name is a concatenation of
the string at 'prefix' and the ASCII representation of the number in
'v_number'.

Note: Due to IRIX's use of uint64 to represent vnumber_t and a maximum
semaphore name length of 15 (METER_NAMSZ-1), this function cannot be
guaranteed to produce a name which uniquely describes a vnode.

makesname() is already called from afs_vcache.c but not (or no longer)
available / implemented elsewhere.

Change-Id: I4331c161b68b39a4c067691c97363b637d13ff15
Change-Id: Ia0a615426dc05e01a98e53e89ec3bae3726cac34
Reviewed-on: http://gerrit.openafs.org/2155
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoIRIX code cleanup
Chaz Chandler [Mon, 14 Jun 2010 04:18:29 +0000]
IRIX code cleanup

Fixes a few small errors in IRIX-specific code sections

Change-Id: I83e0ca1510eb2d122b9b001f5793f63dabc6ddf1
Reviewed-on: http://gerrit.openafs.org/2154
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>

13 years agoDo not assume non-valid addrs in addr hash table
Andrew Deason [Tue, 15 Jun 2010 17:19:25 +0000]
Do not assume non-valid addrs in addr hash table

As part of host state verification, we were calling
h_stateVerifyAddrHash to verify that all addresses for a host were in
the address hash table. The problem with this is that interface
addresses that are not marked as 'valid' are intentionally not in the
addr hash table. So, any time there was a non-'valid' interface
address in the host state, we stood a very good chance to fail to
verify the state.

Instead, if we have a non-'valid' address, try to verify that it is
_not_ in the addr hash table (or at least, is not pointing at the host
with the non-'valid' interface addr), since they're not supposed to be
in there.

Change-Id: I02fb0f516fa3ef384471d19bb1b970cfd8aff874
Reviewed-on: http://gerrit.openafs.org/2205
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake h_stateVerifyAddrHash log port on errors
Andrew Deason [Tue, 15 Jun 2010 15:58:58 +0000]
Make h_stateVerifyAddrHash log port on errors

When h_stateVerifyAddrHash logs that an error in state verification
occurs, it was only logging the address of the host causing the
problem. Log the port, too, since there could be multiple hosts with
the same address.

Change-Id: Ideee34f075948a0cb7cc1014920be5e120bdc6ef
Reviewed-on: http://gerrit.openafs.org/2204
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix aklog warnings when building with Heimdal
Russ Allbery [Fri, 4 Jun 2010 02:50:14 +0000]
Fix aklog warnings when building with Heimdal

Fix various warnings in the aklog and klog code when building with
Heimdal.  Use krb5_get_init_creds_opt_alloc if it's available rather
than allocating the struct off the stack, since the _opt_init
function is deprecated.

Change-Id: Ieff986121de9078e9402b0a51a8855655330caba
Reviewed-on: http://gerrit.openafs.org/2082
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRework the Kerberos Autoconf probes
Russ Allbery [Wed, 26 May 2010 03:19:14 +0000]
Rework the Kerberos Autoconf probes

Previously, building with Kerberos support required either passing a
flag to configure giving the location of a krb5-config script, or
manually setting variables specifying the Kerberos libraries and
header path.  Replace that code with code that checks for Kerberos
libraries automatically and builds the Kerberos code if any were
found, with support for doing direct library probing if there is no
krb5-config script.

Add several platform-specific overrides directly into the configure
support, so we should be able to build out of the box on Mac OS X 10.3,
HP-UX, and AIX Kerberos with the new probes.

The Kerberos Autoconf macros are now the versions that come with
rra-c-util and are tested with multiple other packages, so both
OpenAFS and those packages will be able to benefit from further
portability improvements.

Update README for the new building instructions, documenting how to
configure the Kerberos probes if they can't automatically figure out
the location and flags for Kerberos on your system.

Change-Id: Ia35bb0dbc6b94c6b4dfe8165388447dbfcb31a29
Reviewed-on: http://gerrit.openafs.org/2026
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoGetVolume: do not wait for offlining volumes
Andrew Deason [Tue, 8 Jun 2010 22:28:39 +0000]
GetVolume: do not wait for offlining volumes

In non-DAFS GetVolume, previously we waited for a volume with
vp->goingOffline set to go offline before we return. However, the
fileserver afsfileprocs.c case can treat the "going offline" case and
the "is offline" case identically, so there is no reason to wait. So
make the fileserver call a new GetVolume variant that does not wait.

Without this, all of the threads in the fileserver can potentially be
tied up by waiting for a volume to go offline, if the volume is taking
a long time to go offline due to an offline request following a client
slowly accessing the volume.

Change-Id: I58ae11e585852130154389d8df0567432cd0c2df
Reviewed-on: http://gerrit.openafs.org/2124
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoafscp: Correctly advertise local addresses
Andrew Deason [Tue, 15 Jun 2010 17:33:48 +0000]
afscp: Correctly advertise local addresses

afscp was reporting its local address list in net-byte order, and then
giving that list as a response to RXAFSCB_WhoAreYou. Instead, convert
the addresses to host-byte order, since XDR takes care of endianness
foo.

Change-Id: I5d7d57f811ccaeada235e694ec5f343c1ac535b7
Reviewed-on: http://gerrit.openafs.org/2206
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agomkvers.c - remove afsconfig.h, afs/param.h and assert.h
Jeffrey Altman [Tue, 15 Jun 2010 11:32:11 +0000]
mkvers.c - remove afsconfig.h, afs/param.h and assert.h

assert() is not used within mkvers.c.

afsconfig.h and afs/param.h have dependency problems in
src/config/

Change-Id: I2012a01c87cbd993a70df76ee3384b43ff037b29
Reviewed-on: http://gerrit.openafs.org/2203
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoFix tptserver and tvlserver install rules
Andrew Deason [Mon, 14 Jun 2010 18:28:37 +0000]
Fix tptserver and tvlserver install rules

Commit 00c37e8634b97dba3431804cea467a046be525d5 introduced a few
usages of 'ifeq' in cross-platform Makefiles, breaking the build when
not using GNU make. Fix this by making the tptserver and tvlserver
'install' and 'dest' targets behave more like the 'ptserver' and
'vlserver' ones, and correct the ptserver 'install' target while we
are here.

Change-Id: Ia3fd9149c0f18a96a9899a5dfde41e53a45102b7
Reviewed-on: http://gerrit.openafs.org/2160
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoCleanup and doxygen-ify the comments for GetVolume
Andrew Deason [Tue, 8 Jun 2010 22:19:46 +0000]
Cleanup and doxygen-ify the comments for GetVolume

Change-Id: I54788acd83779b986e78575bde11347952293be6
Reviewed-on: http://gerrit.openafs.org/2123
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoBuild util tests properly with make check
Russ Allbery [Mon, 14 Jun 2010 22:28:20 +0000]
Build util tests properly with make check

If one runs make check without previously running make at the top
level first, it didn't build the util test programs properly.
Recurse into subdirectories for make check as well, and add the
check, test, and tests targets to tests/util/Makefile.in

Change-Id: Idc2caf4cf83a48da350e724aba2ac1228795085d
Reviewed-on: http://gerrit.openafs.org/2162
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: ensure that afsconfig.h and afs/param.h are included
Jeffrey Altman [Mon, 14 Jun 2010 18:13:11 +0000]
Windows: ensure that afsconfig.h and afs/param.h are included

The recent addition of AFS_NORETURN broke the Windows build
because afsconfig.h and afs/param.h were not included everywhere.
Make sure that they are.

Change-Id: I5962fe1178f73273f5b3c1d269b1a125fba2d2c6
Reviewed-on: http://gerrit.openafs.org/2159
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: fix definition of lstat() macro
Jeffrey Altman [Mon, 14 Jun 2010 17:36:32 +0000]
Windows: fix definition of lstat() macro

The lstat() macro definition has to take into account
the version of the compiler and the size of time_t.

Change-Id: Id7ad8c3956bba9832cc028db628cfabe58a1d8d9
Reviewed-on: http://gerrit.openafs.org/2158
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: define errno_t on compilers older than 1400
Jeffrey Altman [Mon, 14 Jun 2010 17:35:12 +0000]
Windows: define errno_t on compilers older than 1400

Visual Studio older than 1400 (VS8) does not define errno_t.

LICENSE MIT

Change-Id: I27c0892d8ba4a371417f635b0d6e5677fa655422
Reviewed-on: http://gerrit.openafs.org/2157
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoubik: add interface for reading during write locks
Andrew Deason [Thu, 20 May 2010 20:22:11 +0000]
ubik: add interface for reading during write locks

Add ubik_BeginTransReadAnyWrite, which allows for reading from the
database, even while there is a conflicting ubik write lock. Reads are
still blocked while the local database is updating due to a write
transaction commit.

Change-Id: I5604fa3cc8a334606f5e3535aed6f6cedcb5f167
Reviewed-on: http://gerrit.openafs.org/2103
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoarm darwin port
Derrick Brashear [Mon, 14 Jun 2010 02:05:27 +0000]
arm darwin port

make things buildable on arm darwin

Change-Id: I88af2b82e9ed356fd57aa8f05dfee71d7fa6cd8a
Reviewed-on: http://gerrit.openafs.org/2153
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoktc newpag stub when environ is not supported
Derrick Brashear [Sun, 13 Jun 2010 15:03:25 +0000]
ktc newpag stub when environ is not supported

on macos systems where we can't get the environment,
just return from ktc_newpag

Change-Id: I9a169d0bf035c40d727a386bb3d2070eea225ed4
Reviewed-on: http://gerrit.openafs.org/2150
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agodarwin afsd include cleanup
Derrick Brashear [Sun, 13 Jun 2010 14:57:38 +0000]
darwin afsd include cleanup

remove mach port stuff from non-kernel version (it's for DiskArb)

remove sysconf, iokit, corefoundation, dns_sd from kernel version.

Change-Id: Ibdf9d8a71f5f0fee659d0c05eea4811617c2b34f
Reviewed-on: http://gerrit.openafs.org/2149
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Fix RCU_READ_LOCK test
Marc Dionne [Sat, 12 Jun 2010 23:43:05 +0000]
Linux: Fix RCU_READ_LOCK test

The names of some configure defines changed with the recent autoconf
cleanups.  This one was missed and was left with the old value.

Change-Id: Ibce5e36b8ae6becdfa61bf6e9c440b3d9a6fa272
Reviewed-on: http://gerrit.openafs.org/2130
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoafsd mill dup sys/mount.h include
Derrick Brashear [Sun, 13 Jun 2010 14:54:50 +0000]
afsd mill dup sys/mount.h include

we include sys/mount.h twice. don't.

Change-Id: Ifc872488086a00d32b564d60a5f9a8b374e8f752
Reviewed-on: http://gerrit.openafs.org/2148
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agogenerated file target
Derrick Brashear [Sun, 13 Jun 2010 13:49:32 +0000]
generated file target

in order to cross compile, allow a way to generate generated files on the host

Change-Id: I9639f350b179dbeb3d45802e8685da88a3b06c83
Reviewed-on: http://gerrit.openafs.org/2147
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agobuildtools target
Derrick Brashear [Sun, 13 Jun 2010 05:51:30 +0000]
buildtools target

if you wish to cross compile, you want these things. arrange to
be able to build just them

Change-Id: I6bee40b61a16722c402832bba39d2e88dcabec25
Reviewed-on: http://gerrit.openafs.org/2145
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agounix cm activate mtu pings
Derrick Brashear [Thu, 10 Jun 2010 18:47:24 +0000]
unix cm activate mtu pings

set an error code so idle dead time is enforced on sending. needed
in order that MTU pings be activated.

Change-Id: I8cf1ca81e6519b440fc679e85f327f338400c29a
Reviewed-on: http://gerrit.openafs.org/2116
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agorx mtu ping handling
Derrick Brashear [Thu, 10 Jun 2010 18:37:39 +0000]
rx mtu ping handling

engage mtu pings. only occur while a call is active but results are
cached per-peer. requires idle dead time to be in use, or does not
activate. (needed to time out the call, otherwise, keepalives will
succeed and the call will thus not hit regular "down server" timeout)

Change-Id: Ic29b1b5713fb6debde14f4adfd5019ee80cc9e3c
Reviewed-on: http://gerrit.openafs.org/2115
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agopath mtu don't track nonsequenced packets
Derrick Brashear [Thu, 10 Jun 2010 15:41:23 +0000]
path mtu don't track nonsequenced packets

for the purpose of mtu discovery, we need a sequence number to
correlate if a large packet is acked. don't track sequence number
0 packets. a later change adds the mechanics needed for MTU pings

Change-Id: I83d4466115bbd45acdc2777bfbef0ff393dd5a3f
Reviewed-on: http://gerrit.openafs.org/2114
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agorx checkcall kill extra indirection on call for conn
Derrick Brashear [Thu, 10 Jun 2010 15:37:35 +0000]
rx checkcall kill extra indirection on call for conn

we already set a local variable, conn, to call->conn. use it instead
of dereferencing call->conn repeatedly

Change-Id: I5d38edc1d3507a717598140393094b1ba22ced46
Reviewed-on: http://gerrit.openafs.org/2113
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoidle dead time track less
Derrick Brashear [Thu, 10 Jun 2010 15:34:39 +0000]
idle dead time track less

retransmits don't count as sends for idle "send time" purposes.
neither do ping acks. disallow both in computations.

Change-Id: I599bb1111189efd21580d357c31c043f2315f910
Reviewed-on: http://gerrit.openafs.org/2112
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agounix cm log path mtu warning when retrying
Derrick Brashear [Thu, 10 Jun 2010 15:24:09 +0000]
unix cm log path mtu warning when retrying

if RX_MSGSIZE is analyzed and we'd retry, so indicate to our users

Change-Id: I77aba5dffd4280e0ee43383cadb34aca4042cbd6
Reviewed-on: http://gerrit.openafs.org/2117
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agomcas fix gc_get_tag return type
Matt Benjamin [Sun, 13 Jun 2010 22:16:37 +0000]
mcas fix gc_get_tag return type

The return type from gc_get_tag is char *

LICENSE BSD

Change-Id: If15259858b84f71d969f1e7713371f3de4e0c3a5
Reviewed-on: http://gerrit.openafs.org/2151
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agomcas cleanup inc/dec macros
Matt Benjamin [Sun, 13 Jun 2010 22:24:48 +0000]
mcas cleanup inc/dec macros

fix type of intermediate value used in CAS operations, and reformat slightly.

LICENSE BSD

Change-Id: If49be8e020e0f735d67290440b1a74caccf90bf0
Reviewed-on: http://gerrit.openafs.org/2152
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolibadmin: Don't dereference NULL pointer in cmd
Simon Wilkinson [Sat, 12 Jun 2010 09:42:43 +0000]
libadmin: Don't dereference NULL pointer in cmd

If DoBosHostList ends up being called without the -server argument
in its command structure, then a printf will attempt to dereference
a NULL pointer to the -server field.

Caught by clang-analyzer

Change-Id: I1114406d03b265f4d780efd8e84fea53013cb51c
Reviewed-on: http://gerrit.openafs.org/2143
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofs: Can't use store behind data if pioctl errored
Simon Wilkinson [Sat, 12 Jun 2010 09:35:34 +0000]
fs: Can't use store behind data if pioctl errored

If the call to a pioctl returns an error, it's possible to reach
the end of the storebehind function and try and print an old, or
bogus, value from the pioctl data block.

Caught by clang-analyzer

Change-Id: I1209c0c24730273510fbad98a75a429917836605
Reviewed-on: http://gerrit.openafs.org/2142
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoviced: CopyOnWrite2 shouldn't return undefined val
Simon Wilkinson [Sat, 12 Jun 2010 09:26:09 +0000]
viced: CopyOnWrite2 shouldn't return undefined val

Unless CopyOnWrite2 encounters the condition where
(rdlen != length) || (wrlen !=length) it will never set a value
for the 'rc' return code, and so return with an undefined value.

Looking at the code, it looks like rc should be 0 in all other
situations, so this patch provides a default value.

Caught by clang-analyzer

Change-Id: If3e528f3d66abb3dde6da2304084f7698c05b863
Reviewed-on: http://gerrit.openafs.org/2141
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFormatting fixes
Simon Wilkinson [Sat, 12 Jun 2010 09:25:07 +0000]
Formatting fixes

Reformat the CopyOnWrite2 function to match our current coding style

Change-Id: I9483c2d391932d675c6c76d6edbb2b8f519b2568
Reviewed-on: http://gerrit.openafs.org/2140
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovol: open() needs mode if called with O_CREAT
Simon Wilkinson [Fri, 11 Jun 2010 23:23:22 +0000]
vol: open() needs mode if called with O_CREAT

If open() is called with a the O_CREAT flag, then it requires a
3rd argument, containing the mode with which to create the file.
On DARWIN (when we always use O_CREAT), and on other platforms
where the first call to open returned E_NOENT, we weren't doing this,
and so were presumably getting a random mode of whatever garbage was
on the stack.

Caught by clang-analyzer

Change-Id: Ic173e582e0d46f6d4cf8801dc7a6b4b393db5063
Reviewed-on: http://gerrit.openafs.org/2139
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoaudit: result is only used on AIX
Simon Wilkinson [Fri, 11 Jun 2010 23:16:11 +0000]
audit: result is only used on AIX

The 'result' variable is only used on AIX - only bother assigning
it when we're building there.

Caught by clang-analyzer

Change-Id: I06848837282ff3f318474f55f2ee013255ad37c8
Reviewed-on: http://gerrit.openafs.org/2138
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAvoid off-by-one error when saving the password in klog
Russ Allbery [Sat, 12 Jun 2010 23:07:52 +0000]
Avoid off-by-one error when saving the password in klog

When klog saved the password entered by the user to allow attempts
at multiple AFS principals without reprompting, it copied the whole
buffer according to the declared reply length into local storage.
This was done without regard to the local allocated storage size,
and was then nul-terminated without regard to the allocated storage
size.  Both klog and Heimdal use a size of BUFSIZ for the reply
buffer by default, which meant that klog on Heimdal was writing past
the end of the allocated structure when nul-terminating the password.

Store our allocated buffer size in the struct and only copy at most
one fewer than that many characters, and then nul-terminate
accordingly.

(The assumption that BUFSIZ is always long enough is still bogus,
but that's larger surgery.)

Change-Id: Ic8d4357aad2f8dfa0fffe9849d2546a88ecd246a
Reviewed-on: http://gerrit.openafs.org/2129
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>