openafs.git
12 years agoFBSD: Use correct path for ufsmount.h include
Ben Kaduk [Sat, 25 Jun 2011 04:33:41 +0000]
FBSD: Use correct path for ufsmount.h include

The two lines above it already used </ufs/ufs/...> correctly.
In the bsd.kmod.mk world, this will let us get rid of some
more symlink hackery in libafs, since the system's '@' symlink
will point to the system headers directly.

Change-Id: I97dd779c2c7a119f51972b02e185a17264911151
Reviewed-on: http://gerrit.openafs.org/5036
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agoFBSD: cast pointers appropriately
Ben Kaduk [Tue, 21 Jun 2011 02:36:39 +0000]
FBSD: cast pointers appropriately

Since the bsd.kmod.mk build uses -Werror.

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

12 years agoFBSD: Remove include directive for nonexistent file
Ben Kaduk [Tue, 21 Jun 2011 02:34:41 +0000]
FBSD: Remove include directive for nonexistent file

In the bsd.kmod.mk world, this becomes a fatal error.

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

12 years agoFix broken make dest rules
Simon Wilkinson [Sat, 16 Jul 2011 08:07:57 +0000]
Fix broken make dest rules

Commit ffb6864f0f60113d125527feacbd6d20a8121e2d is missing some
semi-colons in assorted dest rules, which breaks the make dest target.

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

12 years agoaudit: remove uneeded strncpy
Michael Meffie [Thu, 14 Jul 2011 16:02:21 +0000]
audit: remove uneeded strncpy

In this caller to krb_realms, when no realms names are returned the
number of local realms is correctly set to zero, however the first
local realm buffer is filled with a placeholder string which is
not used.  Remove the uneeded strncpy, which also makes this
section of code consistent with afs_is_foreign_ticket().

This section of code is duplicated by afs_is_foreign_ticket() and
should be consolidated in a subsequent patch.

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

12 years agoUKERNEL: Avoid using parameters named "new"
Andrew Deason [Tue, 12 Jul 2011 05:11:17 +0000]
UKERNEL: Avoid using parameters named "new"

Alter the prototypes in afs_usrops.h to avoid using the name "new", in
order to make the header usable by C++ code.

Change-Id: I21165b5c1e33e9229172d9f8e797d65fc954bb77
Reviewed-on: http://gerrit.openafs.org/5038
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoutil: clean up two #ifs
Garrett Wollman [Wed, 13 Jul 2011 18:20:17 +0000]
util: clean up two #ifs

Use defined(...) in two instances to avoid warnings.

Change-Id: I0a574283e2384c7cfb2f58884570e78e3fed3bc6
Requested-by: Simon Wilkinson
Reviewed-on: http://gerrit.openafs.org/5005
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agoutil: try again to satisfy the gatekeepers
Garrett Wollman [Fri, 15 Jul 2011 05:00:28 +0000]
util: try again to satisfy the gatekeepers

Apply a two-clause BSD license to src/util/pthread_threadname.c. Note
that the claim of copyright in this file refers to the derivative work
consisting of the original code combined with the text of the license.

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

12 years agoMake --enable-pthreaded-ubik do what it claims
Simon Wilkinson [Fri, 15 Jul 2011 16:14:27 +0000]
Make --enable-pthreaded-ubik do what it claims

The configure help text for --enable-pthreded-ubik says
    "enable installation of pthreaded ubik applications"

This patch set makes the behaviour in the code match that. Instead
of controlling whether the pthreaded ubik code is compiled at all,
the configure option now just controls whether it is installed. This
means that we'll always build the pthread code, and so should reduce
the number of times it is inadvertently broken.

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

12 years agoFix pthreaded ubik dest and install rules
Simon Wilkinson [Fri, 15 Jul 2011 13:06:14 +0000]
Fix pthreaded ubik dest and install rules

Fix the dest and install rules for pthreaded ubik, and its servers, so
that they match the current Makefile style.

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

12 years agoutil: Include pthread.h in afsutil_prototypes.h
Andrew Deason [Thu, 14 Jul 2011 19:53:00 +0000]
util: Include pthread.h in afsutil_prototypes.h

afsutil_prototypes.h can reference pthread_t when we are in
AFS_PTHREAD_ENV. So, include pthread.h to guarantee we get the
definition for pthread_t.

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

12 years agoInstall afszcm.cat for i386_fbsd make dest
Ben Kaduk [Thu, 14 Jul 2011 19:49:40 +0000]
Install afszcm.cat for i386_fbsd make dest

Because we missed it in gerrit/4815.

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

12 years agovolser: remove pragma requiring ultranew gcc
Derrick Brashear [Thu, 14 Jul 2011 02:43:40 +0000]
volser: remove pragma requiring ultranew gcc

this won't fly with the gcc in the field most places. move along.

Change-Id: I54de25c4986e574ca5b34b850807b10374d9d8ad
Reviewed-on: http://gerrit.openafs.org/5013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agoLinux: remove unused variable
Marc Dionne [Thu, 14 Jul 2011 00:56:53 +0000]
Linux: remove unused variable

endindex is not used, remove it

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

12 years agotests: fix cmd test case
Michael Meffie [Tue, 12 Jul 2011 19:51:33 +0000]
tests: fix cmd test case

Fix a build error in the cmd tap tests.

Change-Id: I757c5b508784fd938b70ca3829130275707dd39a
Reviewed-on: http://gerrit.openafs.org/4975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agorxkad: Suppress warnings for ticket5.c
Simon Wilkinson [Wed, 13 Jul 2011 13:44:39 +0000]
rxkad: Suppress warnings for ticket5.c

rxkad's ticket5.c includes v5gen.c, a generated file from Heimdal.
This file contains a load of set-but-unused variable warnings. As we
currently have no way of portably suppressing just these warnings,
turn off warnings-as-errors for ticket5.c

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

12 years agovolser: fix set-but-unused variable warning
Simon Wilkinson [Wed, 13 Jul 2011 13:42:11 +0000]
volser: fix set-but-unused variable warning

restorevol reads the magic number from the dump, then does nothing
with it. Rather than not reading it at all, just mark the variable that
it is read into as unused to supress the compiler warning.

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

12 years agoWindows: not safe to dereference before locking
Jeffrey Altman [Wed, 13 Jul 2011 12:15:04 +0000]
Windows: not safe to dereference before locking

Throughout cm_server.c, input parameters to functions that
are protected by cm_serverLock are dereferenced by assignment
during variable initialization prior to the cm_serverLock being
obtained.  As a result there is a race which can result in
either list corruption or dereferencing freed memory.

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

12 years agoWindows: ChangeLog for 1.5.9907
Jeffrey Altman [Fri, 8 Jul 2011 13:49:51 +0000]
Windows: ChangeLog for 1.5.9907

Change-Id: Ie6eb2ed4c9e4c3a9e8250c3946d0a060834610b6
Reviewed-on: http://gerrit.openafs.org/4954
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agovol: Initialise list before error exit when cloning
Simon Wilkinson [Wed, 13 Jul 2011 13:35:48 +0000]
vol: Initialise list before error exit when cloning

The inode list wasn't being initialised before the first call into the
error handler. This makes it possible that we end up trying to discard
items from an uninitialised list, with all the chaos that would cause.
Fix things so that this list is correctly set up.

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

12 years agovolser: Actually return errors from ListOneVolume
Simon Wilkinson [Wed, 13 Jul 2011 13:33:57 +0000]
volser: Actually return errors from ListOneVolume

The return code from GetVolInfo was being thrown away, and success
returned to the caller, regardless of the success of this function.
As GetVolInfo's exit codes aren't suitable for sending over the wire,
just return ENODEV if this function returns failure.

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

12 years agoMark nearInode as unused
Simon Wilkinson [Wed, 13 Jul 2011 13:31:15 +0000]
Mark nearInode as unused

When we're building an inode fileserver, we use the nearInode hint.
The IH_CREATE macro just throws this hint away if we're building namei,
which leads to compiler warnings about set-but-unused variables. Just
flag nearInode as being potentially unused in order to suppress these
warnings.

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

12 years agoDon't split int64s when we don't need to
Simon Wilkinson [Wed, 13 Jul 2011 13:23:22 +0000]
Don't split int64s when we don't need to

Now that we're always using an int64, and never a hyper_t, to represent
64bit integers, we can just print them out and assign them using the
native tools, rather than having to call SplitInt64. Simplify our code
to do so, which also avoids some gcc-4.6.0 warnings.

Change-Id: I12cfb5401d0431be2a4fefdfc5e1f52df7d5764d
Reviewed-on: http://gerrit.openafs.org/4998
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoafsio: Remove unused 'code' value
Simon Wilkinson [Wed, 13 Jul 2011 13:03:59 +0000]
afsio: Remove unused 'code' value

main always return 0, so don't bother getting an exit value back from
cmd_Dispatch that we have no intention of doing anything with.

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

12 years agouss: Remove unused variables
Simon Wilkinson [Wed, 13 Jul 2011 13:02:54 +0000]
uss: Remove unused variables

Remove assorted unused variables, both those used to capture error
returns, and so unused (but initialised) string pointers, to make
gcc 4.6.0 happier.

Change-Id: I8cdcfb7175b48c79ce2b1a312d6a5fe6ab5c1989
Reviewed-on: http://gerrit.openafs.org/4996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoscout: Remove unused error codes
Simon Wilkinson [Wed, 13 Jul 2011 13:02:03 +0000]
scout: Remove unused error codes

Remove unused error returns, and make gcc 4.6.0 a little bit happier

Change-Id: Ic1fe541ed860a739ac3e2aa2978cbb8b92ec1a8d
Reviewed-on: http://gerrit.openafs.org/4995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agolibadmin: Remove unused error codes
Simon Wilkinson [Wed, 13 Jul 2011 13:00:30 +0000]
libadmin: Remove unused error codes

A number of functions in the libadmin vos implementation set up
error values, and assign them to 0, but never actually use them
for anything (either further assignment, or returning to the user)
So, just remove these unecessary variables, and make gcc 4.6.0 a
little happier.

Change-Id: Ia4a4a7d8cda855d904f2a84092928f227ea83f3b
Reviewed-on: http://gerrit.openafs.org/4994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agobozo: Remove unused error codes assignments
Simon Wilkinson [Wed, 13 Jul 2011 12:59:05 +0000]
bozo: Remove unused error codes assignments

This removes a couple of unreported error code assignments. Firstly,
the return from 'setsid' was being assigned to 'ec' and promptly
ignored, and secondly, the response from SendNotifierData was
being ignored. As there is nothing sensible to do with these error
codes, just ignore them properly.

Change-Id: Ifff8c7b5b7950e467570d26ce5f92fe5f11a51e9
Reviewed-on: http://gerrit.openafs.org/4993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoafsmonitor: Fix set-but-unused variable warnings
Simon Wilkinson [Wed, 13 Jul 2011 12:57:12 +0000]
afsmonitor: Fix set-but-unused variable warnings

Tidy up the afsmonitor code to remove gcc 4.6.0's set-but-unused
variable warnings. These are all assignments to error code
values which are never checked, or reported.

Change-Id: I8d48a6defe848d7cf477ac747aa330fc8ed1b276
Reviewed-on: http://gerrit.openafs.org/4992
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agolibafs: Remove support for length optimisation
Simon Wilkinson [Wed, 13 Jul 2011 12:55:39 +0000]
libafs: Remove support for length optimisation

At one point afs_StoreAllSegments had an optimisation to speed up
stores. However, that optimistation used the chunkLength without
taking appropriate locks, and was disabled. The variable assignments
which still exist from this code cause errors with gcc 4.6.0, so just
remove them.

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

12 years agolibafs: Fix warnings in PPrefetchFromTape
Simon Wilkinson [Wed, 13 Jul 2011 12:54:52 +0000]
libafs: Fix warnings in PPrefetchFromTape

The PrefetchFromTape pioctl had a number of set-but-unused variable
warnings. Tidy up the code to remove these warnings.

Change-Id: I358f7e31ab8e9f03447675be40dc8571650dbe72
Reviewed-on: http://gerrit.openafs.org/4990
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agolibafs: Fix statistics for PrefetchFromTape pioctl
Simon Wilkinson [Wed, 13 Jul 2011 12:53:08 +0000]
libafs: Fix statistics for PrefetchFromTape pioctl

The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give
it a slot of its own.

Change-Id: I5698f8861af1b5e9771d138ca93a28f676df349b
Reviewed-on: http://gerrit.openafs.org/4989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agolibafs: Remove unused DNLC LRU code
Simon Wilkinson [Wed, 13 Jul 2011 12:48:07 +0000]
libafs: Remove unused DNLC LRU code

The LRU code in osi_dnlc_lookup has never been enabled in OpenAFS,
and causes compilation errors with gcc 4.6.0 - just remove the unused
code and its associated variables.

Change-Id: Ifc09bbb857406b9bfcbf436c35e36289567f65cf
Reviewed-on: http://gerrit.openafs.org/4988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agolibafs: Remove unused NAT markeddown code
Simon Wilkinson [Wed, 13 Jul 2011 12:45:33 +0000]
libafs: Remove unused NAT markeddown code

Remove unused code which used to retry once when a server was
marked down due to a bad NAT. This code has never been enabled
in OpenAFS, and causes compile errors with gcc 4.6.0

Change-Id: Idc978a68e81ccb761117c97200607e30c98627dc
Reviewed-on: http://gerrit.openafs.org/4987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoutil: introduce a common interface for setting thread names
Garrett Wollman [Mon, 11 Jul 2011 10:31:41 +0000]
util: introduce a common interface for setting thread names

A previous change added support for setting thread names/titles to
viced; this change moves the #ifdef spaghetti to src/util in
preparation for calling it from other places where it would be
useful.  Two functions are defined, one for setting an arbitrary
thread's name (as might be done by the spawning thread) and one
for setting the current thread's name; the latter is also defined as
a macro for non-pthreads compilations so that it can be called
unconditionally (the interface does not reference any
pthread-specific data types).  Note that some platforms, Mac OS X
in particular, do not allow setting the name of a different thread.

The two functions are defined as no-ops for Windows as our pthreads
emulation layer for Windows does not provide the needed mechanism.

Make viced use the new interface.

Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7
Reviewed-on: http://gerrit.openafs.org/4966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoAdd PERLUAFS to libuafs's git ignore
Simon Wilkinson [Wed, 13 Jul 2011 13:46:00 +0000]
Add PERLUAFS to libuafs's git ignore

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

12 years agoAdd make dist and make srpm targets
Simon Wilkinson [Wed, 13 Jul 2011 10:53:57 +0000]
Add make dist and make srpm targets

Add targets to generate distribution tarballs, and srpms, from a tree.
These will generate packages for whatever the current HEAD of the tree
is - if the HEAD is a release tag, then the packages will be named for
that release, if the HEAD is between releases, then git describe will
be used to create an appropriate version identifier.

The tarballs are generated from the current git repository contents,
anything not checked in will not be included.

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

12 years agorpms: Use git version information
Simon Wilkinson [Tue, 12 Jul 2011 16:58:16 +0000]
rpms: Use git version information

Use the git version information when building RPMS, rather than hard
coding it into configure.ac.

Change-Id: I477629b4102f48a9669ff67aae429c08862a5afc
Reviewed-on: http://gerrit.openafs.org/4983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agomacos: note additional vfs features
Derrick Brashear [Tue, 12 Jul 2011 17:46:53 +0000]
macos: note additional vfs features

currently we have inode numbers which do not change. note it.
additionally, we support large files. note it.

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

12 years agoRed Hat: update build script for newer Fedora versions
Ken Dreyer [Thu, 7 Jul 2011 12:55:51 +0000]
Red Hat: update build script for newer Fedora versions

Remove old Fedora versions and add the currently-supported ones.

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

12 years agoRemove pre-existing assert macro in hcrypto header.
Antoine Verheijen [Fri, 8 Jul 2011 17:47:39 +0000]
Remove pre-existing assert macro in hcrypto header.

The config.h header for hcrypto defines an assert macro for
use by RX. OpenBSD already has an assert macro definition so
this new one causes screaming by the compiler about
re-definition. This patch adds the directives to remove any
pre-existing definition of assert, if one exists, prior to
defining the new one.

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

12 years agosalvager: do not redefine SalvageVolumeGroup
Michael Meffie [Mon, 11 Jul 2011 19:45:11 +0000]
salvager: do not redefine SalvageVolumeGroup

Do not use the c preprocessor to redefine the SalvageVolumeGroup()
function name.

Change-Id: I3d48ee28dc03be702d0427d74725ff1e99ec6411
Reviewed-on: http://gerrit.openafs.org/4965
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agomacos: fix shlib link list
Derrick Brashear [Tue, 12 Jul 2011 17:37:56 +0000]
macos: fix shlib link list

link shared libs from the right place, lib not etc

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

12 years agorpms: Fix handling of x86 architectures
Simon Wilkinson [Tue, 12 Jul 2011 00:45:10 +0000]
rpms: Fix handling of x86 architectures

Once upon a time, our specfile would assume that if you were
building for i386 you were building userspace, and that i586 or i686
implied doing a kernel only build. This is no longer the case, and
now everything on modern Fedora is built for i686, so we should adapt
the spec file for this.

Change-Id: Ia56b9b15d0b28672a8411417d38937ed45ee93a1
Reviewed-on: http://gerrit.openafs.org/4970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agorpms: Fix our %version handling
Simon Wilkinson [Mon, 11 Jul 2011 19:21:17 +0000]
rpms: Fix our %version handling

When we're doing version requirements in -devel package Requires:
lines, we should be using %{version}-%{release}, not just %{version}

FIXES 130137

Change-Id: I2d10c6fa362d3cbfa786c270996fa8ae75b9db20
Reviewed-on: http://gerrit.openafs.org/4969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agosalvager: check namei linktable header magic
Michael Meffie [Tue, 12 Jul 2011 12:15:31 +0000]
salvager: check namei linktable header magic

Recreate the namei linktable file if the header magic
is bad.

Change-Id: I1e8c2d101cf1dd1d375a965684d95f6708e8c601
Reviewed-on: http://gerrit.openafs.org/4968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoWindows: always open dscp in smb_ReceiveNTTranCreate
Jeffrey Altman [Mon, 11 Jul 2011 22:49:58 +0000]
Windows: always open dscp in smb_ReceiveNTTranCreate

There were two code paths in smb_ReceiveNTTranCreate that included
asserts in case the directory cm_scache_t object had not been
evaluated.  RT129299 contains a report that at least one of
them had been tripped in production.  There is no reason to avoid
evaluating the directory scp.  It must exist in the cache and
obtaining a reference in all cases simplifies the logic of this
overly complex function.

FIXES 129299

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

12 years agoviced: If platform supports setting a thread title, do so
Garrett Wollman [Fri, 8 Jul 2011 04:09:43 +0000]
viced: If platform supports setting a thread title, do so

Some pthread libraries support setting a name or title for individual
threads (analogous to setproctitle() for processes).  This can be useful
for debugging and is sometimes published for use by utilities like ps
(again like setproctitle() for processes).  The two most common variants
of this have the same signature with slightly different function names.
If either one is present, use it in viced (which already assigns a thread
name when compiled for LWP but ignores it in pthreads compilations).

Change-Id: I5486aa6a21dbc3c8885b94ad52c2b1a66baae81f
Reviewed-on: http://gerrit.openafs.org/4950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoWindows: Move file server lock releases to daemon
Jeffrey Altman [Sun, 10 Jul 2011 23:19:17 +0000]
Windows: Move file server lock releases to daemon

Create a new lock daemon thread which performs regular
cm_LockCheck() calls.  If a lock is deleted check the cm_scache_t
to see if the matching file server lock should be dropped.   If yes,
drop it.

This effectively caches file server locks for two seconds after
they are released to provide a chance for subsequent local lock
requests on the same file to avoid a file server RPC.  It also
ensures that windows processes do not thrash the file server and
force callback breaks.

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

12 years agoRed Hat: use repoquery to find kernels in build script
Ken Dreyer [Thu, 7 Jul 2011 14:39:10 +0000]
Red Hat: use repoquery to find kernels in build script

Remove the custom yum Python code in favor of repoquery.

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

12 years agoOpenBSD: Add <sys/queue.h> header for <sys/lockf.h>
Antoine Verheijen [Fri, 8 Jul 2011 17:13:59 +0000]
OpenBSD: Add <sys/queue.h> header for <sys/lockf.h>

On OpenBSD, the <sys/lockf.h> header requires the TAILQ_* macros
which are defined in <sys/queue.h>. The latter is not automatically
included by <sys/lockf.h> . This patch makes sure that it is
available by putting it into the OpenBSD-specific param.h files
(so as not to impact any other OS).

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

12 years agoviced: indent nested preprocessor directives
Garrett Wollman [Sat, 9 Jul 2011 02:40:27 +0000]
viced: indent nested preprocessor directives

Make viced.c look more like other source files by indenting nested
preprocessor directives.  In a few case it made more sense to
eliminate the nesting.  This should otherwise be a whitespace-only
chnage.

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

12 years agorx: prevent connection channel assignment race
Jeffrey Altman [Sun, 10 Jul 2011 02:43:45 +0000]
rx: prevent connection channel assignment race

When rx was converted to use pthreads, the code that allocates
a call to a connection channel in rxi_ReceivePacket() was not
made thread safe.  The code prior to this patchset permitted a race
in the server connection case.  The rx_connection channel assignment
in rxi_ReceivePacket() and the call destruction in rxi_FreeCall()
and rxi_DestroyConnectionNoLock() did not consistently protect the
rx_connection channel array using the conn_call_lock.

This race could result in rxi_ReceivePacket() operating on a
rx_call which was disconnected from the previously assigned
rx_connection.

In addition, the code in rxi_ReceivePacket() that was intended
to protect the allocation of a call using rxi_NewCall() to the
connection channel array was racy with itself.

This patchset consistently applies the conn_call_lock to protect
the allocation / deallocation of calls to the connection channel
array and in the process simplifies the logic in rxi_ReceivePacket()
as it is no longer necessary to protect against a null call pointer
since the race can no longer be lost.

Change-Id: Id61b55b4d1d57a2b9b35ea942545ef4bdc8d33f3
Reviewed-on: http://gerrit.openafs.org/4963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agowindows: include cmp_Cmd_Ref_3_en_US component
Jeffrey Altman [Sat, 9 Jul 2011 14:29:05 +0000]
windows: include cmp_Cmd_Ref_3_en_US component

when building installers actually include the html 3 man pages

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

12 years agoWindows: out of order lock smb v3 locking
Jeffrey Altman [Fri, 8 Jul 2011 19:27:22 +0000]
Windows: out of order lock smb v3 locking

Do not obtain the smb_rctLock after holding the cm_scache_t->rw
lock.

At most one hold is required in case of lock failure.  Obtain
it as the start of processing and drop it at the end if not required.

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

12 years agoAdd AFS::ukernel libuafs perl bindings
Andrew Deason [Fri, 14 Aug 2009 21:32:54 +0000]
Add AFS::ukernel libuafs perl bindings

Add the SWIG-generated AFS::ukernel perl module, which provides perl
bindings to libuafs calls.

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

12 years agoAdd afsload
Andrew Deason [Fri, 21 Jan 2011 23:38:24 +0000]
Add afsload

Add afsload, a set of scripts used to synchronize the activity of
numerous libuafs cache managers for testing/simulation purposes.

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

12 years agodoc: Add support for section 3 man pages
Andrew Deason [Fri, 4 Feb 2011 22:23:30 +0000]
doc: Add support for section 3 man pages

Generate and install man pages (and their HTML versions) for library
reference documentation in section 3.

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

12 years agoAdd documentation for AFS::ukernel
Andrew Deason [Tue, 22 Sep 2009 20:45:09 +0000]
Add documentation for AFS::ukernel

Add some documentation explaining some of the minor quirks in
AFS::ukernel; specifically how some functions look a bit different
than in plain libuafs.

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

12 years agoWindows: Improve logging for StoreMini and cm_BufWrite
Jeffrey Altman [Wed, 6 Jul 2011 22:37:02 +0000]
Windows: Improve logging for StoreMini and cm_BufWrite

Add trace logging to cm_StoreMini which never had it before.

Improve the logging of cm_BufWrite by adding the trucPos value
which is the new length of the file that is being reported to
the file server.

Remove cm_buf_t data references when cm_BufWrite is performing
operations using rx_Writev and iovec structures.

Change-Id: I28798eb2232e739f665eb51499305a7a1898f824
Reviewed-on: http://gerrit.openafs.org/4924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Refactor cm_Unlock*() to avoid code duplication
Jeffrey Altman [Wed, 6 Jul 2011 22:34:05 +0000]
Windows: Refactor cm_Unlock*() to avoid code duplication

cm_Unlock() and cm_UnlockByKey() duplicate a significant amount
of code.  Refactor it into a new static function, cm_IntUnlock()
which handles the process of downgrading or releasing a file
server lock depending upon the lock state of the cm_scache_t
object.

Change-Id: Ic5db7b3928fc0477f155183326321717ea04ace0
Reviewed-on: http://gerrit.openafs.org/4923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Do not probe new servers from cm_UpdateVolumeLocation
Jeffrey Altman [Wed, 6 Jul 2011 22:19:31 +0000]
Windows: Do not probe new servers from cm_UpdateVolumeLocation

cm_NewServer() can result in a call to cm_UpdateVolumeLocation()
if a server probe is performed.   In order to avoid recursive
calls to cm_UpdateVolumeLocation() do not probe new servers from
within cm_UpdateVolumeLocation().

Change-Id: Icdb8efe030ae3e1f714ca72ad741bd38c692697f
Reviewed-on: http://gerrit.openafs.org/4922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoafs: Use 64-bit inode numbers
Andrew Deason [Wed, 6 Jul 2011 20:22:38 +0000]
afs: Use 64-bit inode numbers

When we have a 64-bit ino_t, use the full 64 bits, instead of always
limiting ourselves to 32 bits.

Change-Id: I8f9f552b230e1723c8b77bfe92213ca43816240c
Reviewed-on: http://gerrit.openafs.org/4921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

12 years agoafs: Consolidate afs_calc_inum
Andrew Deason [Wed, 6 Jul 2011 19:21:53 +0000]
afs: Consolidate afs_calc_inum

Instead of having two separate afs_calc_inum functions, just have one
afs_calc_inum, and split off the md5 inode code into its own function
under a LINUX20 ifdef.

Change-Id: I400d2e70403905da40055238ffc2bb785659e9e0
Reviewed-on: http://gerrit.openafs.org/4920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoafs: Use afs_calc_inum everywhere
Andrew Deason [Wed, 6 Jul 2011 21:23:23 +0000]
afs: Use afs_calc_inum everywhere

The algorithm for calculating inode numbers was copied in several
places in libafs. Make them all use afs_calc_inum instead.

Change-Id: Ie835a0b92bf940b78090fd7ca4e36aace1df9767
Reviewed-on: http://gerrit.openafs.org/4919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoafs: Use cell for md5 inode numbers
Andrew Deason [Wed, 22 Jun 2011 19:39:39 +0000]
afs: Use cell for md5 inode numbers

When calculating the inode number for a file with md5 inodes, include
the cell number in the calculation, in order to reduce collisions
between cells.

Change-Id: I4b939042dd993419f785a78e87e68cf346b56e26
Reviewed-on: http://gerrit.openafs.org/4902
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agouss: Suppress more warnings from lex.yy.c
Andrew Deason [Tue, 5 Jul 2011 22:13:57 +0000]
uss: Suppress more warnings from lex.yy.c

Specify -Wold-style-definition when compiling lex.yy.c. This allows us
to compile when --enable-checking is specified and our lex generates
code with old-style function definitions.

Change-Id: I09c87fd6274b5850952a8aaf63f0e3358100d567
Reviewed-on: http://gerrit.openafs.org/4905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoafs: Ensure afs_calc_inum yields nonzero ino
Andrew Deason [Wed, 22 Jun 2011 18:44:38 +0000]
afs: Ensure afs_calc_inum yields nonzero ino

afs_calc_inum can currently yield an inode of 0 if MD5-based inode
numbers are turned on. Some userspace applications (and for some
platforms, maybe even the kernel) make certain assumptions about the
inode number for a file; in particular for example, 'ls' will not
display a file with inode 0 in a normal directory listing.

So, read the md5 digest until we get a non-zero result. Fall back to
the non-md5 calculation if we still somehow end up with a 0.

While this case may at first glance seem to be extremely rare, in
practice it can occur, as the current calculation for volume
538313506, vnode 26178 does actually yield a 0.

Change-Id: Iee1ef4cc2ad66269f2c677e29d586ef0964d7c70
Reviewed-on: http://gerrit.openafs.org/4901
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoTreat Linux 3 as Linux 2.6
Anders Kaseorg [Tue, 14 Jun 2011 19:24:42 +0000]
Treat Linux 3 as Linux 2.6

Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same
sysname and the same code.

Change-Id: I154334dc5b73980a0d9b8abd9fd6645994f63829
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4843
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoAdd a few missing .gitignore entries
Andrew Deason [Wed, 6 Jul 2011 17:33:53 +0000]
Add a few missing .gitignore entries

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

12 years agovol: Don't always FDH_REALLYCLOSE on linktable ops
Andrew Deason [Fri, 1 Jul 2011 21:58:06 +0000]
vol: Don't always FDH_REALLYCLOSE on linktable ops

If we dec a linktable entry or get a free tag from the link table,
there is no reason to FDH_REALLYCLOSE the linktable fd handle.
FDH_REALLYCLOSE is the same as FDH_CLOSE, except that it tells the
ihandle package that the file handle will not be used again soon. If
we dec a linktable entry or get a free tag, there is no reason to
think that, so just FDH_CLOSE the handle instead.

Change-Id: I5f48a78528a75b984201f9ee0563b142ef59baf9
Reviewed-on: http://gerrit.openafs.org/4903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoDAFS: Do not clear salv state on fssync salvage
Andrew Deason [Fri, 1 Jul 2011 19:25:05 +0000]
DAFS: Do not clear salv state on fssync salvage

When a volume is put into an error state via the FSYNC_VOL_FORCE_ERROR
command, we clear the salvage state informaton on it, since we're
forcing it offline and thus inaccessible. However, if we are forcing
it to an error state because the volume needs salvaging, we just
salvage it. In this case, do not clear the salvage state, since we
need to know if we've already requested or scheduled a salvage so we
can correctly keep track of the number of salvages performed.

Change-Id: Ic4efd7a78bfb1b99a5308f0c67e81f4779dfe545
Reviewed-on: http://gerrit.openafs.org/4900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agodoc: epub and mobi support
chas williams - CONTRACTOR [Wed, 8 Jun 2011 14:44:21 +0000]
doc: epub and mobi support

.epub is generated using dbtoepub which is still considered alpha
software apparently and installed in a non-standard place.  for now,
use the docbook stylesheet location to find it.  .mobi is generated
using kindlegen from the .epub in order to have a real toc.

there is some preprocessing with a custom stylesheet to make
things "look right".  see mobi-fixup.xsl.in

Change-Id: Ice92e701e2f921e70c0f98683b5e9ab44a347e3b
Reviewed-on: http://gerrit.openafs.org/4887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoSOLARIS: Granular multiPage detection
Andrew Deason [Wed, 29 Jun 2011 18:51:22 +0000]
SOLARIS: Granular multiPage detection

Currently, a struct vcache has a multiPage counter, indicating how
many afs_getpage requests are in-flight for that vcache that involve
retrieving multiple pages. Any dcache associated with such vcaches are
then avoided when choosing dcache entries to evict from the cache,
since we may deadlock when trying to evict a dcache entry from one of
the earlier afs_GetOnePage calls in a particular afs_getpage request.

This behavior can cause the client to become unusable if the cache
becomes full, and the only items in the cache are dcache entries in a
file that has an in-flight multi-page afs_getpage request. Since, in
that case, we cannot kick out any entries from the cache, and so we
wait forever to wait for the cache utilization to go down.

To prevent this from occurring, record exactly which ranges in the
file have in-flight multi-page afs_getpage requests, and just avoid
dcache entries in those ranges. This way afs_GetDownD can evict dcache
entries in the same file, but still avoid entries that would cause a
deadlock.

Also add some comments explaining this situation a bit more.

Change-Id: Idb305c8b7511065301739542772d16d4fe8cd574
Reviewed-on: http://gerrit.openafs.org/4896
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoRemove nonsensical bozon-lock defines
Andrew Deason [Fri, 24 Jun 2011 21:23:13 +0000]
Remove nonsensical bozon-lock defines

Currently there are two preprocessor defines related to bozon locks:
AFS_BOZONLOCK_ENV, and AFS_NOBOZO_LOCK. The former creates the pvnLock
member of a struct vcache, and controls calls to e.g. afs_BozonLock in
cross-platform code. The latter, if defined, turns calls to e.g.
afs_BozonLock into no-ops.

It doesn't make any sense to have both of these, since if
AFS_BOZONLOCK_ENV and AFS_NOBOZO_LOCK are defined, the pvnLock member
exists but is never used, since afs_BozonLock &co are no-ops. On
Solaris, the only platform where AFS_NOBOZO_LOCK is currently defined
(DUX used to define it before DUX was dropped), this is the case.

So to make things a bit more clear, get rid of the AFS_NOBOZO_LOCK
define, and just use AFS_BOZONLOCK_ENV to dictate whether we do
anything with bozon locks (ppc_darwin_80 appears to be the only
platform at this time).

Remove AFS_BOZONLOCK_ENV from Solaris param files, since it doesn't
use bozon locks. Remove all references to pvnLock in Solaris-specific
code.

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

12 years agoRemove support for Solaris pre-8
Andrew Deason [Fri, 24 Jun 2011 20:25:46 +0000]
Remove support for Solaris pre-8

Remove support for all Solaris and SunOS platforms prior to Solaris 8,
since Solaris 7 reached end-of-life in August of 2008. Remove all
non-documentation references to sunx86_57 and earlier, sun4x_57 and
earlier, and AFS_SUN57_ENV and earlier.

References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where
appropriate, and AFS_SUN5_ENV now implies Solaris 8.
AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV.

Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3
Reviewed-on: http://gerrit.openafs.org/4888
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoChange wiki ref to wiki.openafs.org from stanford.edu
Jeff Blaine [Wed, 29 Jun 2011 02:58:29 +0000]
Change wiki ref to wiki.openafs.org from stanford.edu

Change wiki ref to wiki.openafs.org from stanford.edu

Change-Id: I2bb70d79da529aee7a810264542aa3b381dcb972
Reviewed-on: http://gerrit.openafs.org/4897
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoIntroduce TAP tests of man pages for command_subcommand
Jeff Blaine [Thu, 16 Jun 2011 23:58:49 +0000]
Introduce TAP tests of man pages for command_subcommand

Introduces the first batch of man page testing as part of
the TAP tests.  We would like to fail, for example, when
someone has added a new command to vos but not AHEM documented
it.

For now, the tests consist of checking to ensure that for
every subcommand listed in the output of "command help"
(e.g. vos help), fail the test if there is not a man page
for those (e.g. vos_delentry.1 etc).

Copy any of the -man-t tests and edit to make a new one

All tests make use of a simple new Perl library stored
in tests-lib/perl5 (a new area, not just named 'lib'
because I didn't want it to be confused with a s test
for a 'lib' in the src).

Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00
Reviewed-on: http://gerrit.openafs.org/4846
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoStyling tweak for generated HTML man pages
Jeff Blaine [Fri, 17 Jun 2011 21:24:54 +0000]
Styling tweak for generated HTML man pages

Prefer "Georgia" as a typeface over the less readable
Times New Roman, but with Times New Roman then "serif"
as fallbacks.  Georgia is available everywhere.

Provide 10px top/bottom and 30px left/right margin on
the main body for readability.  Margins are good.

For review:

Old:
http://docs.openafs.org/Reference/8/kas_apropos.html
New:
http://kickflop.net/openafs-man-20110617/kas_apropos.html

Change-Id: I687b2007ef56019c5b683a43ac3811426ec825b0
Reviewed-on: http://gerrit.openafs.org/4850
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agorx: race in rx_multi processing
Jeffrey Altman [Tue, 28 Jun 2011 13:35:02 +0000]
rx: race in rx_multi processing

multi_Init() registers an arrival procedure which is called when
the first response packet for the call arrives.  If the call times
out the multi_Body loop will call rx_EndCall() and then set
multi_h->calls[multi_i] to NULL.  If the first data packet of the
call arrives before rx_EndCall() is executed, then the arrival
procedure, multi_Ready(), will be executed adding the call to the
firstNotReady list.  When the multi_Body loop attempts to process
the call from the firstNotReady list it attempts to dereference
the NULL multi_call.  This race was introduced by
be4abb4ec83a47477b254f2b3375742c4efbb063.

multi_h->calls[multi_i] is set to NULL as an indicator to
multi_Finalize() that rx_EndCall() has already been processed
for the call.  When rx_EndCall() is executed the arrival
procedure is cleared.

If rx_EndCall() has already been processed, the fact that
the arrival procedure has been executed must be ignored.  Add
an additional check in multi_Body for a non-NULL call pointer
to skip the startProc and rx_FlushWrite processing on the
no longer existent call.

Note that it is not safe to hold onto the call reference after
rx_EndCall() has been processed since the call slot may be
reused for a new RPC before the multi processing on all calls
is complete.

Change-Id: Ib4694a7e1d133f621d15e79534a42f780b141e34
Reviewed-on: http://gerrit.openafs.org/4890
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agoChange -n to -dryrun for backup subcommands
Jeff Blaine [Thu, 9 Jun 2011 00:56:46 +0000]
Change -n to -dryrun for backup subcommands

Change -n to -dryrun for "don't do it, show it though" operation
to be in line with agreement on -dryrun in place of -noexecute
or -n.  Updated man page POD sources to reflect the changes
and updated README to remove these specific todo line items.

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

12 years agovos: refactor ListAddrs
Jeffrey Altman [Mon, 30 May 2011 04:15:43 +0000]
vos: refactor ListAddrs

refactor ListAddrs to be more readable.   Clarify that -uuid and
-host cannot be issued at the same time.  Rename 'nentries' to
'max_index' so it is clear that ubik_VL_GetAddrs() is issued
to set an upper-bound for the number of subsequent ubik_VL_GetAddrsU()
calls that are issued when neither -host nor -uuid are specified.

Change-Id: Icbd511722728396fda837abba39a3e6809f4d26c
Reviewed-on: http://gerrit.openafs.org/4754
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: MergeStatus before SyncOpDone
Jeffrey Altman [Mon, 27 Jun 2011 13:31:54 +0000]
Windows: MergeStatus before SyncOpDone

cm_SyncOp/cm_SyncOpDone is used to synchronize the RPC processing
to ensure that calls which are in conflict cannot occur at the
same time but also to ensure that the ordering of operations
is consistent.  cm_MergeStatus() was in many cases executed after
cm_SyncOpDone() removed the synchronization barrier which in turn
permitted status information to be applied out of order.  Side
effects could have included data loss due to client side file
truncation.  More commonly two StoreData RPCs would have their
status information applied out of order forcing the cache manager
to invalidate all of the cached data for the file.

Change-Id: I8073da701cf11cd0df2b901e81180de7c193ae23
Reviewed-on: http://gerrit.openafs.org/4891
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: TRANS2_FIND_FIRST2 for _._AFS_IOCTL_._
Jeffrey Altman [Thu, 23 Jun 2011 21:51:22 +0000]
Windows: TRANS2_FIND_FIRST2 for _._AFS_IOCTL_._

smb_T2SearchDirSingle() must not fail directory search requests
for the _._AFS_IOCTL_._ file.  Although this file does not actually
exist, it is successfully processed by CreateFile operations.
Therefore, an explicit search for it should return a valid answer.

Change-Id: I9df3443f0bdf0dd05caac74f4de3a0cc64d26800
Reviewed-on: http://gerrit.openafs.org/4884
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Fix SMB_COM_NEGOTIATE for MS11-043
Jeffrey Altman [Fri, 24 Jun 2011 03:49:32 +0000]
Windows: Fix SMB_COM_NEGOTIATE for MS11-043

MS11-043 adds response validation for SMB_COM_NEGOTIATE messages
received by the SMB Redirector.  OpenAFS failed to properly specify
a Challenge and DomainName in the response when the security mode
is SMB_AUTH_NONE (or share with password).  This patchset corrects
smb_ReceiveNegotiate() so that it adheres to the protocol specification.

FIXES 130033

Change-Id: I3dc6e571326c7259a39d30bd80b5986ff35c743c
Reviewed-on: http://gerrit.openafs.org/4886
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoRevert "Rx: When call receive is done, send ack all packet"
Jeffrey Altman [Thu, 30 Sep 2010 14:48:58 +0000]
Revert "Rx: When call receive is done, send ack all packet"

This reverts commit 3cd3715e608b801b4848399e42cb47464e6e3cc3,
which replaces an ack with an ackall; ackall processing does
not actually mark all packets acked when it is received, so
it is insufficient.

Change-Id: I7ee90e1190688570cf3b268229972064480283cc
Reviewed-on: http://gerrit.openafs.org/4837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agodoc: fix dependencies
chas williams - CONTRACTOR [Wed, 8 Jun 2011 13:42:47 +0000]
doc: fix dependencies

index.html might not be built if you are building anything other than
the html/chunk.xsl but in general this is better than before.

Change-Id: I2e1b98c8a3fce65cb702274d5e276989031e338b
Reviewed-on: http://gerrit.openafs.org/4822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agodoc: prefer fop to generate pdf from docbook
chas williams - CONTRACTOR [Wed, 8 Jun 2011 13:40:17 +0000]
doc: prefer fop to generate pdf from docbook

It would seem xsltproc -> fop -> pdf is the "modern" way to generate
pdf from docbook now.  The hard part is finding the stylesheets.
This should work for fedora, sles and debian.  Additionally, it brings
some consistency--xsltproc for all the conversions.  You can still
override via configure options if you prefer something else.

Change-Id: Id779e9473a6759daddc9a61be714109b27da980e
Reviewed-on: http://gerrit.openafs.org/4821
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agodoc: fix some broken link specifications
Chas Williams (CONTRACTOR) [Fri, 10 Jun 2011 01:14:05 +0000]
doc: fix some broken link specifications

"local" links to section heads inside the same pod page should be written
L</OPTIONS> instead of L<OPTIONS>.  the other broken links are assorted
typos and capitalization changes.

Change-Id: I18b57a81d984501309e96dcd4c04582e744a6db2
Reviewed-on: http://gerrit.openafs.org/4831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Ken Dreyer <kdreyer@usgs.gov>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoroken: add search.h to .gitignore
Jeffrey Altman [Sun, 12 Jun 2011 06:27:10 +0000]
roken: add search.h to .gitignore

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

12 years agoDAFS: Do not attach a specialStatus'd vol
Andrew Deason [Tue, 21 Jun 2011 21:25:14 +0000]
DAFS: Do not attach a specialStatus'd vol

If we encounter a preattached volume during GetVolume, we currently
ignore vp->specialStatus before trying to attach. However, we will
generally always fail to attach due to a conflicting vol op, but even
if we don't, GetVolume always returns an error later on if
vp->specialStatus is set. So, same some processing and attempted
attachments by bailing out sooner if vp->specialStatus is set.

Change-Id: Id5df08fe31073485e4d733c42310b42090ee8e7b
Reviewed-on: http://gerrit.openafs.org/4874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

12 years agosalvager: Clear summary in RecordHeader
Andrew Deason [Tue, 21 Jun 2011 23:08:21 +0000]
salvager: Clear summary in RecordHeader

Not every field in the summary header in RecordHeader is set, leaving
some used uninitialized when we copy to the given volumeSummaryp (like
'deleted'). Zero out the header before we do anything.

Change-Id: I94f6e5c8b8c60675de25eb6f8290de9545ff4dd0
Reviewed-on: http://gerrit.openafs.org/4876
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoBuild a separate copy of vlib for dasalvager
Andrew Deason [Tue, 21 Jun 2011 22:51:32 +0000]
Build a separate copy of vlib for dasalvager

Currently dasalvager links to vlib.a. But vlib.a is built without any
DAFS defines, and so the size of a struct DiskPartition64 is different
(since dasalvager is built with AFS_DEMAND_ATTACH_UTIL). Build our own
copies of the volume package files instead, with
AFS_DEMAND_ATTACH_UTIL defined.

Change-Id: I7b9f965fc18b6e6b71275912684ad041aaef19f4
Reviewed-on: http://gerrit.openafs.org/4875
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agodir: Remove extraneous printf from Create
Andrew Deason [Tue, 21 Jun 2011 23:34:46 +0000]
dir: Remove extraneous printf from Create

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

12 years agodir: Fix DRead
Andrew Deason [Tue, 21 Jun 2011 23:33:16 +0000]
dir: Fix DRead

DRead was missing a return statement in one of the cases where we
found the buffer we were looking for, so we locked the buffer but kept
looking. Return it instead.

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

12 years agovol: Do not overwrite specialStatus in attach2
Andrew Deason [Tue, 21 Jun 2011 19:58:42 +0000]
vol: Do not overwrite specialStatus in attach2

attach2 wants to set specialStatus to VBUSY in certain conditions
(such as, it discovers a conflicting vol op where VVolOpSetVBusy_r is
true). However, specialStatus may already be set to something else,
like VMOVED if the volume is being moved off of the server. This can
happen if the volserver has checked out and FSYNC_VOL_MOVE'd a
preattached volume but hasn't deleted or checked the volume back in
yet.

So, if specialStatus is already set, don't touch it, so we don't start
reporting VBUSY errors to clients when we should be reporting VMOVED,
or some other error code previously set.

Change-Id: Icb2895036620f186230e1558b8bc04d18cc45c86
Reviewed-on: http://gerrit.openafs.org/4873
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agorx: Exit fast restart on non-duplicate ACK
Simon Wilkinson [Sat, 18 Jun 2011 14:50:08 +0000]
rx: Exit fast restart on non-duplicate ACK

The current code only exits fast restart when we receive an ACK
packet that contains no missing chunks at all. On a network that is
dropping a reasonable chunk of its packets, this means that we spend
most of the call in fast recovery. (I originally found this by running
with the intentionally drop packets feature set to 10%)

TCP's fast retransmit behaviour is that we stay in fast recovery until
we receive our first non-duplicate acknowledgement. In TCP that means an
acknowledgement that moves the window. In RX, it is an acknowledgment
that ACKs a new packet.

Change-Id: If8e461dd91315be845397dd1bf42771c9223d156
Reviewed-on: http://gerrit.openafs.org/4869
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agorx: Don't limit the # of packets sent in recovery
Simon Wilkinson [Sat, 18 Jun 2011 12:17:07 +0000]
rx: Don't limit the # of packets sent in recovery

The RX transmit engine limits the number of packets sent whilst in
loss recovery to one per invocation of the transmit engine. As the
engine cannot be called by the application thread whilst in recovery,
this means that we end up being limited to one packet per ACK received,
which means that despite a growing congestion window we'll only send
one packet per RTT (in effect, a congenstion window of 1).

This will remain the case until we exit recovery, and all of a sudden
can send a large number of packets. If this is larger than the current
capacity of the network, we'll probably end straight back in recovery
again.

Let the congestion window do its job, by removing this arbitrary limit.

Change-Id: I9f21138662b0918d6d2b885f0fb5ada7fa4c79ec
Reviewed-on: http://gerrit.openafs.org/4868
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agorx: Don't wait for TQ busy when entering recovery
Simon Wilkinson [Sat, 18 Jun 2011 12:01:35 +0000]
rx: Don't wait for TQ busy when entering recovery

Two different threads can cause a call to enter recovery. The event
thread will move a call into recovery as a result of a timeout, or
the listener thread will move it there following a fast retransmit.

In both of these cases, recovery looks different. In the case of
a timeout, we enter slow start, starting as if we were begininning
transmission for the first time. Following fast retransmit, we enter
fast recovery, with different starting parameters than those coming
from slow start.

As a reslt, the current behaviour, where either call sitting in
FAST_RECOVERY_WAIT causes the other to simply return is inappropriate.

Further investigation indiciates that FAST_RECOVER_WAIT is actually
uncessary. There is no harm caused to a thread which is currently
blocked on the network in the middle of a transmit, in adjusting the
window size underneath it. As both of these states collapse the window,
that thread will simply cease sending earlier.

So, simplify the code, and remove the potential race between event and
listener by removing the FAST_RECOVER_WAIT state.

Change-Id: Ic2e7606136ca04c869685345b63101c346ce702b
Reviewed-on: http://gerrit.openafs.org/4867
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agorx: Enter loss recovery when we retransmit
Simon Wilkinson [Sat, 18 Jun 2011 11:43:44 +0000]
rx: Enter loss recovery when we retransmit

Since I mistakenly wrote commit 36e2d13b, RX hasn't entered congestion
avoidance when a loss event occurs. This is bad, because on todays
networks the majority of packet losses are due to some form of
congestion.

Now that the timeout code has been restructured, the chances of entering
the retransmit routine in error are much much smaller, so this code
needs to be restored.

This change reverts 36e2d13b55085c996d38b30d003296c602ef8ee3. However,
the original RX code has the problem that it assumes that all forms of
fast recovery are the same - in particular, that the call settings that
result from entering fast recovery due to a fast retransmit are
identical to those resulting from a timeout. This is not the case, and
this will be fixed in a later change.

Change-Id: Iedb34437db9fcfbc90307b01e566a8d089eef4bb
Reviewed-on: http://gerrit.openafs.org/4866
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>