]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoWindows: add debugging to afskfw
Jeffrey Altman [Tue, 26 Jul 2011 21:37:37 +0000 (17:37 -0400)]
Windows: add debugging to afskfw

More debugging output added when a debugger is present.

Reviewed-on: http://gerrit.openafs.org/5112
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from b61bd99bce68055dc0dd53b82d1d5318c25d9051)

Change-Id: If3aaa87f648f6fd1ae21d19d05522d48928dc4ff
Reviewed-on: http://gerrit.openafs.org/5140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: afskfw remove TRUE conditional
Jeffrey Altman [Tue, 26 Jul 2011 21:36:25 +0000 (17:36 -0400)]
Windows: afskfw remove TRUE conditional

Simply the code by removing an if(1) conditional.

Reviewed-on: http://gerrit.openafs.org/5111
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 7c59ec8f816120c738b1da83f7db9349d912f573)

Change-Id: I332b82b24c97810074e87521c8727b5827d7b54b
Reviewed-on: http://gerrit.openafs.org/5139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: KFW_AFS_get_cred userrealm
Jeffrey Altman [Tue, 26 Jul 2011 21:34:52 +0000 (17:34 -0400)]
Windows: KFW_AFS_get_cred userrealm

The userrealm string in KFW_AFS_get_cred() should not include
the '@' symbol from the user principal.  Including the '@' produces
an invalid realm name.

Reviewed-on: http://gerrit.openafs.org/5110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 214e9a6052b1dab2a0c4383632640936c3e518c6)

Change-Id: I24007935b35ac2a603486fc40a79f94b9b90fa8e
Reviewed-on: http://gerrit.openafs.org/5138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: afslogon start service if not started
Jeffrey Altman [Tue, 26 Jul 2011 21:32:28 +0000 (17:32 -0400)]
Windows: afslogon start service if not started

If the service is configured for auto start but has yet
to start, kick it off just in case.

Reviewed-on: http://gerrit.openafs.org/5109
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from a063ecdc78cf888df2459b32b0082d4767948563)

Change-Id: I8395230328385eb8d554cc85d2e659a3b7cacfb7
Reviewed-on: http://gerrit.openafs.org/5137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: improve afskfw error message output
Jeffrey Altman [Tue, 26 Jul 2011 21:03:56 +0000 (17:03 -0400)]
Windows: improve afskfw error message output

Add KTC and PT error messages to those that can be
translated within afskfw.lib.  This improves the error
logging for afslogon.dll, afscreds.exe, and afssrvadm.exe

Reviewed-on: http://gerrit.openafs.org/5108
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 549737f1e7d52256f053c86116b56c3211b084b6)

Change-Id: I4eb6f23e035b0774dffce8779d680b16ea607d2e
Reviewed-on: http://gerrit.openafs.org/5136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: do not leak space allocation
Jeffrey Altman [Wed, 20 Jul 2011 22:31:17 +0000 (18:31 -0400)]
Windows: do not leak space allocation

smb_ReceiveNTTranCreate leaks a cm_GetSpace allocation on
error.  Don't do that.

Reviewed-on: http://gerrit.openafs.org/5062
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from c61f5208f553ed1674d1ae51d6e0f16fcdbba47b)

Change-Id: Id706189bd0aafb0b55c58f28fff80ba841a8ef48
Reviewed-on: http://gerrit.openafs.org/5135
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: smb_ReceiveNTTranCreate path not found
Jeffrey Altman [Wed, 20 Jul 2011 22:32:35 +0000 (18:32 -0400)]
Windows: smb_ReceiveNTTranCreate path not found

if the directory object cannot be found in the tree, return
CM_ERROR_PATHNOTFOUND instead of crashing.

Reviewed-on: http://gerrit.openafs.org/5061
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 9c2d3180aa760d2a406bb68dd84e73f7d1ec7019)

Change-Id: I3150f9d5ee1e1d548b29161086ebcea21b2351cb
Reviewed-on: http://gerrit.openafs.org/5134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: cm_daemonCheckOfflineVol fix
Jeffrey Altman [Wed, 20 Jul 2011 18:18:25 +0000 (14:18 -0400)]
Windows: cm_daemonCheckOfflineVol fix

When computing whether or not to perform an offline volume
check it is critical that the 'lastBusyVolCheck' variable
be assigned the current time instead of 'lastVolCheck'.
By setting the wrong variable a new offline volume check is
performed every 10 seconds which is undesireable.

Reviewed-on: http://gerrit.openafs.org/5054
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 0783b8f3821f59004146b4c34a53189ada178d70)

Change-Id: I18617371d20798a923c5712188a229633ff43519
Reviewed-on: http://gerrit.openafs.org/5133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Add shutdown event log message
Jeffrey Altman [Wed, 20 Jul 2011 18:12:42 +0000 (14:12 -0400)]
Windows: Add shutdown event log message

Add an explicit message that the shutdown sequence is complete.
This is necessary because during a Windows OS shutdown, the service
is frequently killed prior to the memory mapped file is fully released.

Reviewed-on: http://gerrit.openafs.org/5053
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from e91f16ebb704a431f9731bb39bf9b5621b7f6ad0)

Change-Id: I80685fae2b581171c580b039ae029ca69bea467c
Reviewed-on: http://gerrit.openafs.org/5132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindow: breakout CM error codes into separate header
Jeffrey Altman [Wed, 20 Jul 2011 18:04:57 +0000 (14:04 -0400)]
Window: breakout CM error codes into separate header

Reviewed-on: http://gerrit.openafs.org/5052
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from a1af69182b12bedd8a413d38cef9a4691286da46)

Change-Id: I82adf60bef97575d47b65561fdc2b097f8ac610a
Reviewed-on: http://gerrit.openafs.org/5131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agomacos: fix vnode finalization
Derrick Brashear [Mon, 1 Aug 2011 13:58:27 +0000 (09:58 -0400)]
macos: fix vnode finalization

erroneously pushed a bad version of this. fix it now.

Reviewed-on: http://gerrit.openafs.org/5124
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5ebef72c0299560716f3bc8d59122aedd61cc399)

Change-Id: I10aa962b158616d7d9e9207fd0307900abda0cee
Reviewed-on: http://gerrit.openafs.org/5126
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: don't attempt finalize fixup on root vnode
Derrick Brashear [Tue, 26 Jul 2011 04:52:18 +0000 (00:52 -0400)]
macos: don't attempt finalize fixup on root vnode

because of how the root fid is created we can end up being dumb.
turns out we never want to bypass doing the full pass for root anyway
so just force fixup to not happen.

Reviewed-on: http://gerrit.openafs.org/5095
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f8ff2591f73401e6d9b6def7630f428569e2f3a6)

Change-Id: I2196196d7373400f2d7f6d0654047273157df1ee
Reviewed-on: http://gerrit.openafs.org/5097
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoaklog: check ccache errors in get_user_realm
Derrick Brashear [Fri, 22 Jul 2011 19:39:49 +0000 (15:39 -0400)]
aklog: check ccache errors in get_user_realm

if there's an error finding the specified ccache, don't
bother continuing.

Reviewed-on: http://gerrit.openafs.org/5069
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 09d1d8575ce96ef945a4fd8a99a0347f4e258c1e)

Change-Id: I4b18cae14a9b620ea62d62eebc0b62f83f67a84a
Reviewed-on: http://gerrit.openafs.org/5072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: avoid KLRenewInitialTickets crash in Lion
Derrick Brashear [Fri, 22 Jul 2011 18:24:08 +0000 (14:24 -0400)]
macos: avoid KLRenewInitialTickets crash in Lion

the shimmed heimdal in Lion crashes on this call now.
the shim also exports diddly squat. fine, we pick over what
IS exported and use only calls available to us.

should be exactly as functional as before.

Reviewed-on: http://gerrit.openafs.org/5065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 62cccc4547bd816dfffb2c1a4431c3c674d302f8)

Change-Id: I44ec9305c3f8e07cb68b2614b237b62e29a66516
Reviewed-on: http://gerrit.openafs.org/5071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: krb5_524 is uselessly stubbed
Derrick Brashear [Fri, 22 Jul 2011 00:30:00 +0000 (20:30 -0400)]
macos: krb5_524 is uselessly stubbed

from MITKerberosShim-44:
dummy(krb5_524_conv_principal, 0);
dummy(krb5_524_convert_creds, 0);

this basically logs and returns success. not helpful.
so let's just not call them.

Reviewed-on: http://gerrit.openafs.org/5066
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ee950e7ecf578bd225eec29b182f108450c5bfaf)

Change-Id: Idc2fa790d97b75971c29eec98bb96e799356dc4a
Reviewed-on: http://gerrit.openafs.org/5070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoredhat: support epel yum configs in mockbuild
Derrick Brashear [Wed, 20 Jul 2011 18:55:32 +0000 (14:55 -0400)]
redhat: support epel yum configs in mockbuild

epel's mock is useful in terms of config, but we need to allow
use of it. do so here. add centos6 at the same time.

Reviewed-on: http://gerrit.openafs.org/5056
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 45f0cbf83aed2bd534e9b43822c033ef6b4a9b1b)

Change-Id: Ic46bcbcc8045773d8ce248fe2dea93b27d24ecf2
Reviewed-on: http://gerrit.openafs.org/5067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRed Hat: update build script for newer Fedora versions
Ken Dreyer [Thu, 7 Jul 2011 12:55:51 +0000 (08:55 -0400)]
Red Hat: update build script for newer Fedora versions

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

Reviewed-on: http://gerrit.openafs.org/4925
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8bface302c14698a14b7b988e1a7714e84415c04)

Change-Id: I130c7289e06ede351adf8ace92fcdbac900b7819
Reviewed-on: http://gerrit.openafs.org/5068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd additional NEWS entries for 1.6.0pre5 through 1.6.0pre7
Russ Allbery [Tue, 19 Jul 2011 00:13:15 +0000 (17:13 -0700)]
Add additional NEWS entries for 1.6.0pre5 through 1.6.0pre7

Taken from the release notes.  Do a bit of minor combining of related
issues since NEWS presents these all as changes in 1.6.0.

Reviewed-on: http://gerrit.openafs.org/5044
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e06931172eec5a683490040f5564b294d263dac4)

Change-Id: I0fbd566258eec2f5d2664acf40289c4d6c544ee7
Reviewed-on: http://gerrit.openafs.org/5045
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoInstall afszcm.cat for i386_fbsd make dest
Ben Kaduk [Thu, 14 Jul 2011 19:49:40 +0000 (15:49 -0400)]
Install afszcm.cat for i386_fbsd make dest

Because we missed it in gerrit/4815.

Reviewed-on: http://gerrit.openafs.org/5022
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b6d05986f0c79bdf54169fc7b209b137c0e63a39)

Change-Id: Ia72180e49d1fb0a92911cb5158d8eb368d4c2a40
Reviewed-on: http://gerrit.openafs.org/5024
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRevert "windows: include cmp_Cmd_Ref_3_en_US component"
Derrick Brashear [Thu, 14 Jul 2011 15:49:04 +0000 (11:49 -0400)]
Revert "windows: include cmp_Cmd_Ref_3_en_US component"

This reverts commit 96f7d4d3e6ba75d40e7b47acb728a8dbef8c1a01.
Not until we have man3 in 1.6 do we need this.

Change-Id: If8490d6f66a220fe08995c011fee04d57d8e9adc
Reviewed-on: http://gerrit.openafs.org/5019
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agomake 1.6.0pre7
Derrick Brashear [Wed, 13 Jul 2011 23:26:22 +0000 (19:26 -0400)]
make 1.6.0pre7

update versions for 1.6.0pre7

Change-Id: I0efa0e544638de8f6f9d617d02072144f6fdd1ed
Reviewed-on: http://gerrit.openafs.org/5011
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: ChangeLog for 1.5.9907
Jeffrey Altman [Fri, 8 Jul 2011 13:49:51 +0000 (09:49 -0400)]
Windows: ChangeLog for 1.5.9907

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>
(cherry picked from commit 30d68e6934810e3cfc67518d36cb8be26d6542b8)

Change-Id: I899f89d277d816bf429e90c09bf69f1703fd82e1
Reviewed-on: http://gerrit.openafs.org/5010
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd make dist and make srpm targets
Simon Wilkinson [Wed, 13 Jul 2011 10:53:57 +0000 (11:53 +0100)]
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.

Reviewed-on: http://gerrit.openafs.org/4984
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f775c0fb6f9191dcf5d226bfddbf82f52cd1116c)

Change-Id: I03b4f02d979bbc851e043e5979a54d00f9c52439
Reviewed-on: http://gerrit.openafs.org/5009
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorpms: Use git version information
Simon Wilkinson [Tue, 12 Jul 2011 16:58:16 +0000 (17:58 +0100)]
rpms: Use git version information

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

(cherry picked from commit 6a27e228bac196abada96f34ca9cd57f32e31f5c)
Reviewed-on: http://gerrit.openafs.org/4983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ibfe38e924eb53e279aaeff77882957a32ebb279b
Reviewed-on: http://gerrit.openafs.org/5008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Initialise list before error exit when cloning
Simon Wilkinson [Wed, 13 Jul 2011 13:35:48 +0000 (14:35 +0100)]
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.

Reviewed-on: http://gerrit.openafs.org/5001
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit beda3b239a13903d4bcd9a5d91d5ff562962cb5a)

Change-Id: I3e3c4b8565e373f74bb95416e4c9b101d02fd78f
Reviewed-on: http://gerrit.openafs.org/5007
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser: remove pragma requiring ultranew gcc
Derrick Brashear [Thu, 14 Jul 2011 02:47:57 +0000 (22:47 -0400)]
volser: remove pragma requiring ultranew gcc

this won't fly with the gcc in the field most places. move along.
(cherry picked from commit XXX)

Change-Id: I7ca987e05502c0ffc75f826b40200467bf0abfbb
Reviewed-on: http://gerrit.openafs.org/5015
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser: Actually return errors from ListOneVolume
Simon Wilkinson [Wed, 13 Jul 2011 13:33:57 +0000 (14:33 +0100)]
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.

(cherry picked from commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f)
Reviewed-on: http://gerrit.openafs.org/5000
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I72e82d014ea2320a095bb4a3281449d250a52d3b
Reviewed-on: http://gerrit.openafs.org/5006
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: not safe to dereference before locking
Jeffrey Altman [Wed, 13 Jul 2011 12:15:04 +0000 (08:15 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/4985
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 130155ff3c48f2da2433b359588346b4438d24a2)

Change-Id: I02e83faa889bb55b025253bbd1c51a389434eee4
Reviewed-on: http://gerrit.openafs.org/5014
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRevert "rx: prevent connection channel assignment race"
Derrick Brashear [Wed, 13 Jul 2011 13:55:21 +0000 (09:55 -0400)]
Revert "rx: prevent connection channel assignment race"

This reverts commit 3620b51779846175b51f82d677838c7cb4dc181d.

Change-Id: Idf8d95fe8fec0bdd94e9f9fc1c30695fb52604fa
Reviewed-on: http://gerrit.openafs.org/4986
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agomacos: note additional vfs features
Derrick Brashear [Tue, 12 Jul 2011 17:46:53 +0000 (13:46 -0400)]
macos: note additional vfs features

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

Reviewed-on: http://gerrit.openafs.org/4973
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4470d849ec731c97dd2fb02dc6cbfe777949b510)

Change-Id: Iee356a8424efe3c79745bf1bf5a1553c988d9d12
Reviewed-on: http://gerrit.openafs.org/4982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: prevent connection channel assignment race
Jeffrey Altman [Sun, 10 Jul 2011 02:43:45 +0000 (03:43 +0100)]
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.

(cherry picked from commit 99b43273c0203881ea3d2d50f0abf000cdc0b03e)
Reviewed-on: http://gerrit.openafs.org/4963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I90ad0dc1f67df2bcaca1da0bb459e730541876cb
Reviewed-on: http://gerrit.openafs.org/4981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Add <sys/queue.h> header for <sys/lockf.h>
Antoine Verheijen [Fri, 8 Jul 2011 17:13:59 +0000 (11:13 -0600)]
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).

Reviewed-on: http://gerrit.openafs.org/4956
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 3559e5c8edd90ffb17e8f3b722ff014654bae336)

Change-Id: I75103e0fb327fec91ae00647598450a30cc2cf23
Reviewed-on: http://gerrit.openafs.org/4980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRed Hat: use repoquery to find kernels in build script
Ken Dreyer [Thu, 7 Jul 2011 14:39:10 +0000 (10:39 -0400)]
Red Hat: use repoquery to find kernels in build script

Remove the custom yum Python code in favor of repoquery.

Reviewed-on: http://gerrit.openafs.org/4926
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1accef4e77c8cad518d728d15fbd194bebd49f33)

Change-Id: Ie68a006852d1564fa2da226a006a4e137d7cd5ed
Reviewed-on: http://gerrit.openafs.org/4979
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: always open dscp in smb_ReceiveNTTranCreate
Jeffrey Altman [Mon, 11 Jul 2011 22:49:58 +0000 (23:49 +0100)]
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

Reviewed-on: http://gerrit.openafs.org/4967
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 27af8b4b537236d8c678465d034721dd220641c8)

Change-Id: Id4abbc179fc1410b3d45bfc9c69814f683ebcb57
Reviewed-on: http://gerrit.openafs.org/4977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: check namei linktable header magic
Michael Meffie [Tue, 12 Jul 2011 12:15:31 +0000 (08:15 -0400)]
salvager: check namei linktable header magic

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

Reviewed-on: http://gerrit.openafs.org/4968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 82e772bed034ea278e7a7a1b4422d75cc14576dd)

Change-Id: I7c8b25da015e028f0a642bbfcf7d0d28bbcc16dd
Reviewed-on: http://gerrit.openafs.org/4976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agowindows: include cmp_Cmd_Ref_3_en_US component
Jeffrey Altman [Sat, 9 Jul 2011 14:29:05 +0000 (15:29 +0100)]
windows: include cmp_Cmd_Ref_3_en_US component

when building installers actually include the html 3 man pages

Reviewed-on: http://gerrit.openafs.org/4961
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 88b4e2e52799cfa5999cbc22873407ec8b77766a)

Change-Id: I40aacc81c43ec2d142886c9ce11a684c910c37b2
Reviewed-on: http://gerrit.openafs.org/4962
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: out of order lock smb v3 locking
Jeffrey Altman [Fri, 8 Jul 2011 19:27:22 +0000 (15:27 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/4955
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit da6c97678f530ca76334613e229337a75f94e297)

Change-Id: I6b530366c74fd45ba585fd7af4615a1dc96ac055
Reviewed-on: http://gerrit.openafs.org/4960
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Improve logging for StoreMini and cm_BufWrite
Jeffrey Altman [Wed, 6 Jul 2011 22:37:02 +0000 (18:37 -0400)]
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.

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>
(cherry picked from commit 21854e03eb6fe70a70ea5fecde5c4ef8074e28c9)

Change-Id: I3bd5d7d834ddfa11044cf3f44af108f0554096b6
Reviewed-on: http://gerrit.openafs.org/4953
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Refactor cm_Unlock*() to avoid code duplication
Jeffrey Altman [Wed, 6 Jul 2011 22:34:05 +0000 (18:34 -0400)]
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.

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>
(cherry picked from commit 1ac219f537f75ac5835f750d4c9e5f4dc684c2de)

Change-Id: I4dc2a37557e3370f711f6a11743f39df6344676b
Reviewed-on: http://gerrit.openafs.org/4952
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Do not probe new servers from cm_UpdateVolumeLocation
Jeffrey Altman [Wed, 6 Jul 2011 22:19:31 +0000 (18:19 -0400)]
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().

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>
(cherry picked from commit 1a56229910a67cc782959beb45f56d244d6b3c4f)

Change-Id: Iaf41b1c6c1aa84791a02451533be0e66aaf85fd1
Reviewed-on: http://gerrit.openafs.org/4951
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agovol: Don't always FDH_REALLYCLOSE on linktable ops
Andrew Deason [Fri, 1 Jul 2011 21:58:06 +0000 (16:58 -0500)]
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.

Reviewed-on: http://gerrit.openafs.org/4903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 78e39417af6d2b87f0cbda0b5d3bb3e4859dc0ba)

Change-Id: I28f5abee59265403362f3f1472a9fa21a52597c0
Reviewed-on: http://gerrit.openafs.org/4949
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Do not clear salv state on fssync salvage
Andrew Deason [Fri, 1 Jul 2011 19:25:05 +0000 (14:25 -0500)]
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.

Reviewed-on: http://gerrit.openafs.org/4900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1ecac71e50e75ce5a45e297d57c480e850975af7)

Change-Id: I313f4c4093f3b4f5ee501ef7537d05b557946a70
Reviewed-on: http://gerrit.openafs.org/4948
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Granular multiPage detection
Andrew Deason [Wed, 29 Jun 2011 18:51:22 +0000 (13:51 -0500)]
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: Idd39fd4811ea03aa7eee62f85f1a0c74c9c5e402
Reviewed-on: http://gerrit.openafs.org/4896
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 31a001f60e5fe729b315f679d1d43b367bd74ea5)
Reviewed-on: http://gerrit.openafs.org/4927
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRevert "Rx: When call receive is done, send ack all packet"
Jeffrey Altman [Thu, 30 Sep 2010 14:48:58 +0000 (10:48 -0400)]
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.

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>
(cherry picked from commit 358099b21c5c888c02bf3754702ae623378c507d)

Change-Id: I7accb0e176c6143d87bb7809ead7ced63b9d86dd
Reviewed-on: http://gerrit.openafs.org/4946
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Do not attach a specialStatus'd vol
Andrew Deason [Tue, 21 Jun 2011 21:25:14 +0000 (16:25 -0500)]
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.

Reviewed-on: http://gerrit.openafs.org/4874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47)

Change-Id: I3593a50b5867c671fe462abd40b50dcbbd2c5204
Reviewed-on: http://gerrit.openafs.org/4945
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Clear summary in RecordHeader
Andrew Deason [Tue, 21 Jun 2011 23:08:21 +0000 (18:08 -0500)]
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.

Reviewed-on: http://gerrit.openafs.org/4876
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 926ce3d35018050bdbe8e00011884954d6b0fd80)

Change-Id: Ia617153da8762394659b7c7816e6f3d24af6c4d2
Reviewed-on: http://gerrit.openafs.org/4944
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoBuild a separate copy of vlib for dasalvager
Andrew Deason [Tue, 21 Jun 2011 22:51:32 +0000 (17:51 -0500)]
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.

(cherry picked from commit f2d067b4e48500004236b181dd5a25454f352daf)
Reviewed-on: http://gerrit.openafs.org/4875
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Change-Id: Id65a30ced198853bc6c376153671def71dd600d1
Reviewed-on: http://gerrit.openafs.org/4943
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Do not overwrite specialStatus in attach2
Andrew Deason [Tue, 21 Jun 2011 19:58:42 +0000 (14:58 -0500)]
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.

Reviewed-on: http://gerrit.openafs.org/4873
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 25688bc2e7e8da83b4bf22d7cdc3e0214eadc455)

Change-Id: I4316be912a5a30856914059984f45782bece0cdd
Reviewed-on: http://gerrit.openafs.org/4942
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Exit fast restart on non-duplicate ACK
Simon Wilkinson [Sat, 18 Jun 2011 14:50:08 +0000 (15:50 +0100)]
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.

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>
(cherry picked from commit 6b833f575743d4a826750bb6913cd53232a8867f)

Change-Id: I51b4de1146df032ff6e1273d8c832bded770e177
Reviewed-on: http://gerrit.openafs.org/4941
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Don't limit the # of packets sent in recovery
Simon Wilkinson [Sat, 18 Jun 2011 12:17:07 +0000 (13:17 +0100)]
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.

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>
(cherry picked from commit 91b351e88bdb56bfdfc2f5f16f64bb7522796581)

Change-Id: I673980bdee6d1316cb363f12d32c96fb2577cb27
Reviewed-on: http://gerrit.openafs.org/4940
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Don't wait for TQ busy when entering recovery
Simon Wilkinson [Sat, 18 Jun 2011 12:01:35 +0000 (13:01 +0100)]
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.

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>
(cherry picked from commit 0b9c9e9973e8d32cdfe1fc884fb2c310cedc0404)

Change-Id: I47525eb4cf0bb6d049094c7f98f8cc79be9ef51e
Reviewed-on: http://gerrit.openafs.org/4939
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Enter loss recovery when we retransmit
Simon Wilkinson [Sat, 18 Jun 2011 11:43:44 +0000 (12:43 +0100)]
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.

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>
(cherry picked from commit e8c4fc4f37912a5d30694caef45d27374e9201e7)

Change-Id: I5ee6aa255a0b923f445dde2f1e9f0abf98dbe623
Reviewed-on: http://gerrit.openafs.org/4938
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Add Karn-style backoffs to RX retransmits
Simon Wilkinson [Sat, 18 Jun 2011 10:58:57 +0000 (11:58 +0100)]
rx: Add Karn-style backoffs to RX retransmits

When we retransmit a packet, we may be doing so because the RTT of the
connection has grown dramatically larger than earlier within the call.
However, RX doesn't permit all ACKs to retransmitted packets to be
counted within the RTT calculation.

So, adopt the same approach as Karn developed for TCP, and as described
in detail in RFC2988. When a retransmit event occurs, backoff the
connection RTT by doubling its value, and hold at this doubled value
until either another retransmit occurs (in which case we back off again,
up to a predetermined ceiling), or we receive an ACK packet which we
can use within the RTT calculation, in which case we drop back down to
the newly measured value.

This change replaces the per-packet backoff strategy originally
implemented in RX (which, whilst allowing resent packets more chance of
arriving, doesn't help with computing a correct RTT).

Reviewed-on: http://gerrit.openafs.org/4865
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>
(cherry picked from commit 0118fb5387e656e515d78d48497a48f1e04a1152)

Change-Id: I697eac14f9b4be5c8726f0386e516cb49995f665
Reviewed-on: http://gerrit.openafs.org/4937
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Make clock_Add correctly add to itself
Simon Wilkinson [Sat, 18 Jun 2011 10:48:45 +0000 (11:48 +0100)]
rx: Make clock_Add correctly add to itself

With the existing clock_Add code, the following:
    struct clock a = {2, 800000};
    clock_Add(&a, &a);
gives a clock value of {6, 600000}, rather than the expected {5, 60000}.

This is because the ordering of instructions leads it to double count
the carry on the seconds field. Reorder the instructions so that the
carry is correctly applied.

Reviewed-on: http://gerrit.openafs.org/4864
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 784babbea1247660f39463403233589a74c6e73b)

Change-Id: I1e97e9734d04f898dabad59a88afc929d8888e90
Reviewed-on: http://gerrit.openafs.org/4936
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Remove resending logic into its own function
Simon Wilkinson [Sat, 18 Jun 2011 10:35:30 +0000 (11:35 +0100)]
rx: Remove resending logic into its own function

Create a new function, rxi_Resend, which is the entry point to running
the transmit queue as a result of a resend event. This concentrates all
of the resend logic into one place, removes the need for
rxi_StartUnlocked, and means that rxi_Start's arguments don't need to
match those of an event handler.

(cherry picked from commit 280c80152522f32cf34deae96696b1db8aaaa9bb)
Reviewed-on: http://gerrit.openafs.org/4863
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ia8b28be53d7c37fbfd877364930d7dc4a4d52e37
Reviewed-on: http://gerrit.openafs.org/4935
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Don't let timeouts force fast recovery
Simon Wilkinson [Mon, 25 Oct 2010 09:14:12 +0000 (10:14 +0100)]
rx: Don't let timeouts force fast recovery

The current RX implementation goes into fast recovery whenever a
timeout occurs. This is incredibly wasteful, particularly on fast
connections. So, remove this in favour of TCP style behaviour.

(cherry picked from commit 36e2d13b55085c996d38b30d003296c602ef8ee3)
Reviewed-on: http://gerrit.openafs.org/3138
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I5b5b154d78183621c160537172d7c0a3789114e6
Reviewed-on: http://gerrit.openafs.org/4934
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: complete fix for starting rexmit timers
Derrick Brashear [Thu, 7 Jul 2011 20:56:28 +0000 (16:56 -0400)]
rx: complete fix for starting rexmit timers

1.6-only change. the pullup of e7066a9c30047e787d72f02dd1c28e5e473e494b
(as dab406baf28c19710b4a451ae2516dfa1ebeee29)
missed this because the code in 1.6 was structured differently at the time.

Change-Id: I38e9db1dcc681ae4eecc0f3abd634052b9f93ca0
Reviewed-on: http://gerrit.openafs.org/4933
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRX: rxi_PrepareSendPacket drops call lock; WaitforTQ required
Simon Wilkinson [Sat, 6 Nov 2010 19:18:14 +0000 (15:18 -0400)]
RX: rxi_PrepareSendPacket drops call lock; WaitforTQ required

Since rxi_PrepareSendPacket drops the call->lock during
processing the caller must perform a rxi_WaitforTQ prior
to manipulating the transmit queue.

Reviewed-on: http://gerrit.openafs.org/3279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit cb7a5ce44470112d3ba5e341322bb9e7d029e101)

Change-Id: I17a863d46f65fca904a22abccb849c8a8c0997ee
Reviewed-on: http://gerrit.openafs.org/4932
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Fix resend accounting
Simon Wilkinson [Mon, 25 Oct 2010 08:16:09 +0000 (09:16 +0100)]
rx: Fix resend accounting

rxi_Start flagged itself as 'resending' whenever it flushed the
transmit queue due to a resend event. However, it would flush the
entire transmit queue at this point, rather than only transmitting
packets that require a resend. When running with large window sizes
this results an a large number of packets erroneously being marked
as resent.

Instead, let SendXmitList decide whether a packet is being
retransmitted by using the presence of a serial number. This takes
advantage of the fact that a retransmitted packet must be the only
entry in a packet list - we just flag the packet list, instead of
having to maintain counters for each individual packet.

(cherry picked from commit e84193ca2a9cef5a13403d291435eb5ad47f5b41)
Reviewed-on: http://gerrit.openafs.org/3135
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I1c8da9639b9739bf88a925b7af98c25b3eaeda8c
Reviewed-on: http://gerrit.openafs.org/4931
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Don't maintain maxSerial
Simon Wilkinson [Fri, 5 Nov 2010 00:23:23 +0000 (00:23 +0000)]
rx: Don't maintain maxSerial

There were no users within the code of the rx connection maxSerial
element, and maintaining it required locking on a critical path. So,
get rid of it.

Reviewed-on: http://gerrit.openafs.org/4797
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 6a22a2f4b7aa0d960cea17b419003986f6184d58)

Change-Id: I465e73b7cc7c57b384cd2652bbc8825a898b8bbc
Reviewed-on: http://gerrit.openafs.org/4930
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRx: Consolidate wait for tq busy and make its use uniform
Jeffrey Altman [Tue, 12 Oct 2010 14:53:43 +0000 (10:53 -0400)]
Rx: Consolidate wait for tq busy and make its use uniform

rxi_WaitforTQBusy() is now used wherever a wait for the transmit
queue is required.  It returns either when the transmit queue is
no longer busy or when the call enters an error state.

Having made this change it is clear that call->currentPacket is
not always validated when the call->lock is reacquired which may be
true when rxi_WaitforTQBusy() is called.

(cherry picked from commit e45abc6cc20236b9e91c23cb6f8e90f51b6a4a99)
Reviewed-on: http://gerrit.openafs.org/2966
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Change-Id: I3492d351581549872b8332a626dae344757c6a6e
Reviewed-on: http://gerrit.openafs.org/4929
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoChange wiki ref to wiki.openafs.org from stanford.edu
Jeff Blaine [Wed, 29 Jun 2011 02:58:29 +0000 (22:58 -0400)]
Change wiki ref to wiki.openafs.org from stanford.edu

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

Reviewed-on: http://gerrit.openafs.org/4897
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a4e3c3be697bb99ee4846c99550cd2b52929cdca)

Change-Id: I7d1da2d26eb8cb9f1f7c231ec70b8f9486c0d146
Reviewed-on: http://gerrit.openafs.org/4947
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Change the way that the RTT timer is applied
Simon Wilkinson [Sat, 18 Jun 2011 09:46:53 +0000 (10:46 +0100)]
rx: Change the way that the RTT timer is applied

RX maintains a retryTime for every packet that it has transmitted,
which is held as the time that that packet was sent, plus the smoothed
RTT of the connection. If a packet is in the queue with a retryTime
older than the current time, then it is resent at the first opportunity.
In some circumstances, this first opportunity will be as a result of
the resend event timer expiring, in others it will happen as part of
a normal queue run.

There are a number of problems with this approach on congested networks.

Firstly, on a network with a large window size, which is in "normal"
flow, it means that we will never actually perform fast retransmit as
the timeout for this packet will have expired before we have received
any further ACKs. This is because, on a network with a relatively stable
RTT the ACK for packet n+1, n+2, or n+3 cannot arrive before the
expected time of arrival of the ACK for packet n. As we retry
immediately this expected time of arrival has passed, we never have the
opportunity of using these later ACKs to learn that packet n is lost.

Secondly, the fact that we may resend packets from a "normal" queue run,
rather than as a result of a resend event, means that there is no clear
entry point for resends. As resends should be assumed to be a result of
network congestion, and result in both the call throttling back, and the
RTT being increased, this lack of a clean entry point makes things
tricky.

As a solution, this patch changes the way in which retransmit times are
applied to use the algorithm described in RFC2988.

*) Whenever we send a new packet, we start a timer for the current call
   rto value if one isn't already running.
*) Whenever we receive an ACK that acknowledges new data, and we have
   packets that are sent but not yet acknowledged, we restart the
   retransmit timer using the current rto value.

This alogrithm solves the first problem, as it means that if the
connection is still flowing, we will continue to receive ACKs, and we
can enter fast retransmit.

In implementation terms, we longer track a retryTime per packet, and
instead simply record if a packet has been sent or not. Packets which
have been sent may only be resent as a result of a resend timer
expiring, or of entering fast retransmit, so solving the second issue.

(cherry picked from commit a80a88e8ba7ac5e2afc5188add482f4e5323128e)
Reviewed-on: http://gerrit.openafs.org/4862
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>
Change-Id: I023c9b52b104f8930f8d0dd628612cec2226fee0
Reviewed-on: http://gerrit.openafs.org/4918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Use a structure for the xmit list
Simon Wilkinson [Mon, 25 Oct 2010 08:06:53 +0000 (09:06 +0100)]
rx: Use a structure for the xmit list

Switch to using a structure to hold the xmit list so that it's a
little bit clearer what the rxi_SendXmitList function is actually doing

(cherry picked from commit ad3b5997c6da17927312f4618d8bb4f7fc542a64)
Reviewed-on: http://gerrit.openafs.org/3134
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I6534f5c40e890af916752bf2647a14f9c386e004
Reviewed-on: http://gerrit.openafs.org/4917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Compute smoothed RTT per call, not per peer.
Simon Wilkinson [Fri, 17 Jun 2011 21:06:54 +0000 (22:06 +0100)]
rx: Compute smoothed RTT per call, not per peer.

RX uses the TCP RTT smoothing algorithm as described in RFC2988.
However, the TCP algorithm is designed to accept samples from a
single connection, accepting a new sample once per RTT.
RFC2988 suggests that "when multiple samples are taken
per RTT the [ alogrithm ] may keep an inadequate RTT history."

In RX's implementation, we use a single instance of this alogrithm
per peer, and input all of the samples from all of the active calls
and connections into this same instance. This leads to us taking
a significantly (potentially many magnitudes) larger number of samples
per RTT, and rapidly losing the RTT history. With RX's implementation,
short lived network events may easily bias the RTT, and cause large
numbers of packets to time out.

This change fixes this by moving the RTT calculation onto a per call
basis. We still update the peer with our caclulated value, so that new
calls may be created with an RTT corresponding to the current value for
the connection, rather than having to start high and converge downwards.

(cherry picked from commit 39484c6e57cf993a713b4a989d1c0c227e6f496c)
Reviewed-on: http://gerrit.openafs.org/4861
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I5b33323ceed7231bd70e43284d83dfe1db144188
Reviewed-on: http://gerrit.openafs.org/4916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Reorganise transmit queue walk
Simon Wilkinson [Sun, 5 Jun 2011 10:04:12 +0000 (11:04 +0100)]
rx: Reorganise transmit queue walk

The transmit queue is stored in the order that we transmitted the
packets (by sequence number). This means that we can do all of the
ACK processing by just doing a single walk of this queue, rather
than having to walk the queue multiple times, once for each type of
ACK.

This clarifies the queue processing, and should reduce the amount of
time that we spending iterating large transmit queues.

(cherry picked from commit fe7d38f3205bd879e961f5849ed64df5b495388a)
Reviewed-on: http://gerrit.openafs.org/4796
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Change-Id: I85dd1d1706227599a48c7f75ca1947af0b5184bf
Reviewed-on: http://gerrit.openafs.org/4915
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Add RX_CALL_ACKALL_SENT flag and rxi_SendAck processing
Jeffrey Altman [Sun, 5 Jun 2011 22:41:24 +0000 (18:41 -0400)]
rx: Add RX_CALL_ACKALL_SENT flag and rxi_SendAck processing

3cd3715e608b801b4848399e42cb47464e6e3cc3 modified rxi_ReceiveDataPacket
to send an ACKALL whenever RX_CALL_RECEIVE_DONE is set on the call.
This produced the potential for a race with ACKs that set the
firstPacket value to 'rnext' when the receive queue for the call
has yet to be emptied.  From the perspective of receiver the ACK
was already processed and does not require a response since the
previously received ACKALL acknowledged the delivery of all data
packets to the application.  When sending ACKs after ACKALL it is
therefore required that firstPacket be set to the sequence number
after the last unprocessed packet in the receive queue.

Thanks to Simon Wilkinson for his extensive assistance in identifying
the problem and the development of this patchset.

Reviewed-on: http://gerrit.openafs.org/4798
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit cd326b2f54c3397468807c32ce0834f73c9d5d1b)

Change-Id: Ic4fa021eb33462ddf759ce0d7a8845edf1ecbed5
Reviewed-on: http://gerrit.openafs.org/4914
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: do not rxi_AckAll for one data packet call
Jeffrey Altman [Sun, 5 Jun 2011 20:02:46 +0000 (16:02 -0400)]
rx: do not rxi_AckAll for one data packet call

rxi_ReceiveDataPacket() calls rxi_AckAll() when the call reaches
the RX_CALL_RECEIVE_DONE state to permit the caller to empty the
transmit queue.  That reduces the memory consumption of the caller
and avoids unnecessary retransmits which the call is in process.

If the call data consists of a single packet it is possible that
Ping ACK packets sent as part of connection establishment could
race with the ACKALL and be delivered out of order.  If the Ping
ACK is delivered second, it will be ignored by the peer forcing
a two second delay in connection establishment.  To avoid the race
do not send an ACKALL for a single packet call.

Reviewed-on: http://gerrit.openafs.org/4799
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit ff30293624a7e31d585b9e8f2e1a439cf87b6524)

Change-Id: Ic64917c40aa29f9e99c434ab2f9ba2e4abc38883
Reviewed-on: http://gerrit.openafs.org/4913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Reverse the consumption order of idle queue
Simon Wilkinson [Sat, 14 May 2011 07:55:50 +0000 (08:55 +0100)]
rx: Reverse the consumption order of idle queue

Currently, the rx server thread idle queue is used in an LRU manner.
This means that we round robin requests between all of the threads
configured on a given system, which means that we end up thrashing
CPU caches on machines whose workload doesn't require that all of
the configured threads be used.

Change this so that we always use the most recently idle thread. This
isn't as "fair" to all of our waiting threads, but should mean that we
scale better on SMP machines, as a thread that is recently idle is
likely to have been recently scheduled.

Performance numbers to follow ...

Reviewed-on: http://gerrit.openafs.org/4871
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 5614305853f0f87a2418a6fb7ca472a8ef966084)

Change-Id: I6b961a470adfe053ecd85af05821e42898fd7847
Reviewed-on: http://gerrit.openafs.org/4912
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Remove incorrect backoff code
Simon Wilkinson [Fri, 17 Jun 2011 19:35:59 +0000 (20:35 +0100)]
rx: Remove incorrect backoff code

The ACK packet handling routine contains code which causes the
RTT to backoff if the selective ACK response indicates that there is
a missing packet. The comment justifies this code as being in line
with Phil Karn's work on TCP.

However, the TCP behaviour is that we backoff when we enter resend. Both
TCP and RX have difficulty computing RTTs for resent packets due to the
ambiguous ACK problem. Whilst RX is slightly better than TCP in this
regard, we can't always tell whether an ACK refers to the original, or
resent packet, so resent packets are unable to contribute to the RTT.
This means that if the RTT ends up too low for the connection, and we
start resending every packet, the RTT will never grow to account for
this, as we never feed it any packet samples.

Karn's solution to this was to backoff (double) the RTT value when we
resend a packet, and then to not drop it back down until we receive an
ACK that we can count. This means that we will always get a new sample
for the connection, and the RTT will grow again.

The original author confirms that the current behaviour in RX is
incorrect, so simply remove it with this patchset.

Reviewed-on: http://gerrit.openafs.org/4860
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit b65944973a24e9365dc1ff118ded4c3a1e25f782)

Change-Id: I4d2766d98883dad4f27ff4c52e2a03a49733f89f
Reviewed-on: http://gerrit.openafs.org/4911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Account for delayed ACKS when computing RTO
Simon Wilkinson [Fri, 17 Jun 2011 18:38:29 +0000 (19:38 +0100)]
rx: Account for delayed ACKS when computing RTO

RX currently only soft ACKs every second packet, therefore a soft ACK
may be delayed by a period of time (currently 100ms, although RX did
expose this as a public variable in earlier versions).

RTT values are computed using only non-delayed ACKs, so the timeout
is a smoothed average of the exact time taken to send and directly
ACK a packet. Therefore, if the peer ends up using a delayed ACK for
the packet, using just the RTT will cause that packet to be timed out.

A while ago, this was dealt with by padding the calculated RTT with an
additional 350ms. This was then removed, and changed to a 350ms minimum
value. When this caused large numbers of spurious resends, the padding
was restored, but with a 20ms default value. As noted above, 20ms is
too low, as we may wait for up to 100ms before sending an ACK.

This patch changes minPeerTimeout so that it does what it says on
the tin - sets a minimum value below which the peer timout may not
fall. It then adds to either this value, or the calculated one, 200ms
of padding. This makes our padding identical to TCPs, and allows some
future leway as to the softAckDelay value.

Reviewed-on: http://gerrit.openafs.org/4859
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 699330682f3cb001bf1bfbeaffd806600ccf69e8)

Change-Id: Ibe06f46c9ac846fb0381c467242e5c3b439c8907
Reviewed-on: http://gerrit.openafs.org/4910
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: Make rx_softAckDelay & rx_lastAckDelay private
Simon Wilkinson [Fri, 17 Jun 2011 18:12:09 +0000 (19:12 +0100)]
rx: Make rx_softAckDelay & rx_lastAckDelay private

The values of these two parameters directly affect the modifiers
that are needed in the peer's RTT calculations, and so can not
arbitrarily be changed by applications.

lastAckDelay has been 400ms since the first OpenAFS release, and
that value is used as a modifier when computing the timeout of the
last packet. It is likely that any change which made this value
longer than 400ms would have detrimental effects on deployed clients

softAckDelay has been 100ms for a similar time period. We have
chopped and changed the value of minPeerTimeout, so it is unclear
what the maximal value for this parameter is. For much of OpenAFS's
life, minPeerTimeout was a 350ms padding value, which suggests that
copying TCP, and setting the maximal value at 200ms would be a safe
option. For now, however, leave it at 100ms to avoid unexpected
side effects.

hardAckDelay is not addressed by this patch set, as all ACK packets
sent from the application thread are marked as delayed, and so
currently have no part in computing RTT times. It is likely, however,
that any changes to the hard ACK timeout should be very carefully
considered.

Reviewed-on: http://gerrit.openafs.org/4858
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec)

Change-Id: I7976d8d11007c0f597ede707db7cbb617956bd29
Reviewed-on: http://gerrit.openafs.org/4909
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoDocumented vos restore -creation and -lastupdate
Jeff Blaine [Sat, 18 Jun 2011 00:35:17 +0000 (20:35 -0400)]
Documented vos restore -creation and -lastupdate

Culled info from commit 21592fe6 by Kris Hees.  These allow
one to specify how to set the creation date and last update
date at volume restore.

Reviewed-on: http://gerrit.openafs.org/4852
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 800a5642a0b9ff514519b4af30b4d0dadd471480)

Change-Id: Ib0d71a34242cdc42753518a454479bccaac0094a
Reviewed-on: http://gerrit.openafs.org/4908
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoTreat Linux 3 as Linux 2.6
Anders Kaseorg [Tue, 14 Jun 2011 19:24:42 +0000 (15:24 -0400)]
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.

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>
(cherry picked from commit 34bdd979fc487843c26f15655b94eac7c8f98fee)

Change-Id: Ibbedc447ea4b2dfa61f06a4b0b87a5bc884f711a
Reviewed-on: http://gerrit.openafs.org/4907
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoWindows: MergeStatus before SyncOpDone
Jeffrey Altman [Mon, 27 Jun 2011 13:31:54 +0000 (09:31 -0400)]
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.

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>
(cherry-picked from 51fa590e704c77c0e9ba873ecb854448885030a5)

Change-Id: Ic50241081e52b70bf7b6bd7d92df205f7184f7c8
Reviewed-on: http://gerrit.openafs.org/4895
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>
14 years agoWindows: TRANS2_FIND_FIRST2 for _._AFS_IOCTL_._
Jeffrey Altman [Thu, 23 Jun 2011 21:51:22 +0000 (17:51 -0400)]
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.

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>
(cherry-picked from 9f77a2d6b3d571a928261563763913c8c6ee2938)

Change-Id: Iab58557350fa099c903b0c2b555e5cc2027daafc
Reviewed-on: http://gerrit.openafs.org/4894
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>
14 years agoWindows: Fix SMB_COM_NEGOTIATE for MS11-043
Jeffrey Altman [Fri, 24 Jun 2011 03:49:32 +0000 (23:49 -0400)]
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

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>
(cherry-picked from 7532b05221caf2c382d9e8c9ca5af4a284566920)

Change-Id: I67eb2b293228cacb4df20ac072beaf03f2111c55
Reviewed-on: http://gerrit.openafs.org/4893
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>
14 years agoWindows: shell extension is multithreaded
Jeffrey Altman [Wed, 8 Jun 2011 06:22:41 +0000 (02:22 -0400)]
Windows: shell extension is multithreaded

Since the shell extension is multithreaded and it is possible
for more than one thread to be executing in the gui2fs.cpp module
at a time, it is not safe to use a single static 'space' buffer
by more than one thread at a time.   Move the buffer into the
stack of each function that uses it so that we have thread safety.

Reviewed-on: http://gerrit.openafs.org/4819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 418a70feedb5574d28c3fbe513333b0fb102a3ca)

Change-Id: I467c2b8cd00b6b248b3c50270da470cebd4b6a5f
Reviewed-on: http://gerrit.openafs.org/4892
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>
14 years agoFBSD: do not install kdump
Ben Kaduk [Fri, 17 Jun 2011 06:44:46 +0000 (02:44 -0400)]
FBSD: do not install kdump

Since it's just an empty file, installing it is rather silly.

Reviewed-on: http://gerrit.openafs.org/4849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 327f516477b3dbf6ed6302c706bbb2bf41ae7907)

Change-Id: I904095a9143c0aedc0e96d64793200eca7649934
Reviewed-on: http://gerrit.openafs.org/4853
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoUnbreak make dest for FBSD
Ben Kaduk [Wed, 30 Mar 2011 02:26:50 +0000 (22:26 -0400)]
Unbreak make dest for FBSD

It turns out that we do need an afs.rc.fbsd that is set up for
transarc paths in this directory.  To get it to work properly
will require the user to symlink to it from a dir that gets
checked by rcorder, but them's the breaks.

Reviewed-on: http://gerrit.openafs.org/4378
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 0b69fd6d5631482a786c2223a7dec0b2c9a07f92)

Change-Id: Ifd921019898954414a6d107702786c546d661bd4
Reviewed-on: http://gerrit.openafs.org/4855
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoEnable -afsdb in the Red Hat packages.
Ken Dreyer [Wed, 15 Jun 2011 18:21:27 +0000 (14:21 -0400)]
Enable -afsdb in the Red Hat packages.

Reviewed-on: http://gerrit.openafs.org/4844
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0a318b5bb9d0f5940eeffa092f6adae025d560de)

Change-Id: I08e117bf25137099b7d550f4ec397ee987ef4ab0
Reviewed-on: http://gerrit.openafs.org/4856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoFBSD: do not FlushAllVCaches
Ben Kaduk [Fri, 17 Jun 2011 06:22:34 +0000 (02:22 -0400)]
FBSD: do not FlushAllVCaches

In normal operation, any AFS vcache with associated data will have
an associated vnode, which will be on the list of vnodes associated
with the /afs mountpoint.  We already call FreeBSD's vflush() in
our afs_unmount, which walks the list of vnodes associated with the
mountpoint and calls vgonel() on them, which calls VOP_CLOSE and
VOP_RECLAIM on the vnode.  Our implementation of VOP_RECLAIM already
calls FlushVCache, so in normal operation, FlushAllVCaches() will
be a no-op.
However, in the presence of bugs, it is actively harmful, causing
panics.  For example, if a vnode has been reclaimed but FlushVCache
failed (which we cannot report back since the VFS will panic in this
case), and we attempt to flush it again, the associated vnode has
already been cleaned up and we will panic.  Likewise if our list of
vcaches becomes corrupt and has a vcache with bad or missing vnode
for some other reason, we will panic.

Since there is no gain in normal operation and abnormal operation
is more likely to panic than save data, skip the extra flush.

Reviewed-on: http://gerrit.openafs.org/4847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 03a54723eaf23b2aad0d026ba5f1a8e7343b3763)

Change-Id: I866fb196f8368362bcd673ffb4908ab21a46c544
Reviewed-on: http://gerrit.openafs.org/4854
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoAlso install afszcm.cat for i386_fbsd
Ben Kaduk [Tue, 7 Jun 2011 15:30:18 +0000 (11:30 -0400)]
Also install afszcm.cat for i386_fbsd

The change gerrit/4760 enabled the use of gencat to actually build
this file, but failed to also change installation logic, so it was
sitting unused in the build tree.  Fix this, and install the file.
This allows us to remove a shell case statement which had formerly
been needed to enforce this restriction.

Reviewed-on: http://gerrit.openafs.org/4815
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 445a8b5461c66160552136214a1d8d97de15967e)

Change-Id: Ic39fecb824be58a8890c665dedcd1eff2b4f9bdc
Reviewed-on: http://gerrit.openafs.org/4848
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agodoc: let configure find the XML tools if possible
Chas Williams (CONTRACTOR) [Thu, 2 Jun 2011 23:00:47 +0000 (19:00 -0400)]
doc: let configure find the XML tools if possible

configure should attempt to find the XML tools we need to process
the documentation.  if it can't, it should provide a safe default.
still allow the user to override via command line.

Reviewed-on: http://gerrit.openafs.org/4766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit cc2bc3e17ff5f7a10c515e309f8fec47a6fa14b6)

Change-Id: I4773affa193b5210da6416dd8b4321bd3f471429
Reviewed-on: http://gerrit.openafs.org/4794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agokvno invocation correction, language cleanup, afs/cell principal preferred
Jeff Blaine [Fri, 27 May 2011 19:49:52 +0000 (15:49 -0400)]
kvno invocation correction, language cleanup, afs/cell principal preferred

Properly show kvno command syntax, add information about preferring
'afs/cell' for the principal over 'afs', and changed "noted this down"
to "made note of"

Reviewed-on: http://gerrit.openafs.org/4740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 07f461e8e35147af605ebc86c139b31d2db0bb28)

Change-Id: If37ab2164a13c6f4b745aaf221337ba56eede043
Reviewed-on: http://gerrit.openafs.org/4793
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: print_addrs never receives multi-homed addrs
Simon Wilkinson [Tue, 31 May 2011 07:31:55 +0000 (08:31 +0100)]
vos: print_addrs never receives multi-homed addrs

The magic address that tells the vlserver that a host is multi-homed,
and to look up the multi-homed address structure is an internal
implementation feature, which shouldn't be exposed to clients.

print_addrs is only ever called with the results of VL_GetAddrsU, which
has already converted any multi-homed pointers, so it doesn't need the
logic to handle them itself.

Reviewed-on: http://gerrit.openafs.org/4757
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 23e433f10414d771937cbea5510b6006b6a7b063)

Change-Id: I24df764211d99d84b116d1031b05de61b38c3397
Reviewed-on: http://gerrit.openafs.org/4792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoxstat: cope with different size timeval structures
Michael Meffie [Fri, 24 Sep 2010 01:18:36 +0000 (21:18 -0400)]
xstat: cope with different size timeval structures

In xstat_fs_test and afsmonitor, try to display the xstat data
from the fileserver even if the fileserver has differently sized
timeval structures, or different word ordering, as the xstat
client program.

Reviewed-on: http://gerrit.openafs.org/2986
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c0a55111d726b26d07661957a65e4d59f155d5e6)

Change-Id: I3bef968538c90d6e261142c60a817b4b9e2ad228
Reviewed-on: http://gerrit.openafs.org/4791
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agolinux: rpm: Fix SELinux attributes on /afs when installing openafs-client package
Jonathan Billings [Wed, 1 Jun 2011 15:05:11 +0000 (11:05 -0400)]
linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package

Since the directory /afs isn't included in the package manifest, but
rather created in a script in the openafs-client package, it never
gets the appropriate SELinux attributes that are required to mount a
volume (mnt_t).

This change fixes the problem by running '/sbin/restorecon' (if it is
an executable that exists) on the /afs directory after the
openafs-client package is installed, right after the directory is
created.

Reviewed-on: http://gerrit.openafs.org/4763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc)

Change-Id: I5944c16f558f2651250d122f547fbfd71519c1d1
Reviewed-on: http://gerrit.openafs.org/4786
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoEnable gencat for i386_fbsd_*
Ben Kaduk [Tue, 31 May 2011 19:25:35 +0000 (15:25 -0400)]
Enable gencat for i386_fbsd_*

The machines certainly have a /usr/bin/gencat, and I see nothing
in history to indicate a reason for this prevention.
Allow the 32-bit machines to build afszcm.cat and make packaging
more uniform between architectures.

Reviewed-on: http://gerrit.openafs.org/4760
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 55a41d00057106913ce2aba50772a56bc994a9a4)

Change-Id: Icd3b85c99e8a41407355f94e561042c13ca15293
Reviewed-on: http://gerrit.openafs.org/4785
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agolibafs: Do not osi_FlushPages for dirs
Andrew Deason [Thu, 17 Mar 2011 21:32:00 +0000 (16:32 -0500)]
libafs: Do not osi_FlushPages for dirs

Directory contents are never mapped or stored in pages, so dealing
with page invalidation on directories is just overhead. So make
osi_FlushPages a no-op when we're given a directory, which can avoid a
lot of locks and other processing (particularly when we are called in
afs_getattr in BOZONLOCK_ENV).

Reviewed-on: http://gerrit.openafs.org/4259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a6f18413edceed1b0d532005eb62cb1886e7a6f3)

Change-Id: I48dafa5fb442cfc92fb673f2b26e1034fc44c0c7
Reviewed-on: http://gerrit.openafs.org/4730
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolinux: add read_descriptor_t configure test and ifdef
Christof Hanke [Thu, 26 May 2011 05:46:32 +0000 (07:46 +0200)]
linux: add read_descriptor_t configure test and ifdef

With linux 2.6.8 the struct read_descriptor_t changed.
Add a configure-test and respective ifdef to deal with that.

Reviewed-on: http://gerrit.openafs.org/4719
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b)

Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77
Reviewed-on: http://gerrit.openafs.org/4726
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoautoconf: add test for typedef'd structs
Christof Hanke [Wed, 25 May 2011 20:16:59 +0000 (22:16 +0200)]
autoconf: add test for typedef'd structs

AC_CHECK_LINUX_STRUCT does not work for structs which are typedef'd.
The gcc will complain with "error: storage size of ‘_test’ isn’t known"
and fail the test.
Thus the new test-macro AC_CHECK_LINUX_TYPED_STRUCT.

Reviewed-on: http://gerrit.openafs.org/4718
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit baf7656f666e0d47047c545561345e7803b8a141)

Change-Id: I7feca884d7796ccd3a490d6b81e745c644d9c8f1
Reviewed-on: http://gerrit.openafs.org/4725
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFBSD: VIMAGE support
Ben Kaduk [Thu, 26 May 2011 05:11:14 +0000 (01:11 -0400)]
FBSD: VIMAGE support

Starting in FreeBSD 8.0, there is support for multiple virtual
network stacks (generally to be exposed to separate jail(8) environments).
It is enabled as a kernel configuration option, so our builds against
GENERIC have not failed, but we fail to build when options VIMAGE
is present.  Fix our variable references accordingly.

Submitted-by: Hiroki Sato of freebsd.org
Reviewed-on: http://gerrit.openafs.org/4721
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 9703b023cc0f5088eab5135acf7417e90ebbb2cd)

Change-Id: I058ed4fd637f205701e5aab4d88d65386097f9c0
Reviewed-on: http://gerrit.openafs.org/4724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: note parms file deprecation
Derrick Brashear [Wed, 25 May 2011 21:05:53 +0000 (17:05 -0400)]
viced: note parms file deprecation

/vice/file/parms is unsupported and will be removed later. 1.6 only change.
master version will remove it.

Change-Id: Id41ca57c1331fb59b87f7f6a06281b640a8c9879
Reviewed-on: http://gerrit.openafs.org/4720
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: disable bulkstat
Derrick Brashear [Wed, 25 May 2011 19:31:40 +0000 (15:31 -0400)]
macos: disable bulkstat

1.6 only change. there's still an issue where potentially
multiple contexts reference a vnode which needs to be finalized; the fixup
is successful but there's no hint to other threads to reref before proceeding
(no actual troublesome access while waiting for the fixup as the vnode
will not have actually been CStatd yet)

Change-Id: Ib72f69b74c94b7cac74a9a01a54a8872e32f9717
Reviewed-on: http://gerrit.openafs.org/4717
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agodes: generated files should not require objects needed in libdes
Derrick Brashear [Tue, 24 May 2011 18:36:04 +0000 (14:36 -0400)]
des: generated files should not require objects needed in libdes

1.6 only change, since DES is dead. don't require the same misc.o
in both libdes and when generating generated files to making, as
make dependencies then throw away valid input.

Change-Id: Icf6a211e66d7390ac73fa1effb89a0c4a131666f
Reviewed-on: http://gerrit.openafs.org/4713
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: ChangeLog for 1.5.9906 (1.6.0pre6)
Jeffrey Altman [Mon, 23 May 2011 17:26:20 +0000 (13:26 -0400)]
Windows: ChangeLog for 1.5.9906 (1.6.0pre6)

Reviewed-on: http://gerrit.openafs.org/4706
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from ba76149a57f0cfd92672580b7047a557f159ee52)

Change-Id: Id400d48bf5e8699558133b4b7812a2703a4508e5
Reviewed-on: http://gerrit.openafs.org/4707
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoReplace uintptr_t type cast with uintptrsz in afs_vcache.c
Antoine Verheijen [Tue, 17 May 2011 15:40:15 +0000 (09:40 -0600)]
Replace uintptr_t type cast with uintptrsz in afs_vcache.c

A recent change (commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0)
to afs_vcache.c contains a call to afs_warn() whose second parameter
contains a "(uintptr_t)" type cast as part of a double type cast.
This presents an issue on some systems, such as OpenBSD, where this
object type is defined in a header that is not presently included.
This change modifies that type cast to instead use the AFS-internal
"(uintptrsz)" type which should provide the same effect.

Note that an earlier version of this patch attempted to remove the
"offending" type cast as redundant but it was pointed out that some
systems require this kind of cascading type cast when casting pointers
to integers to deal with possible size issues.

Reviewed-on: http://gerrit.openafs.org/4671
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b3004fbd5007d400a4cd3fb2a5b1c52d98618aab)

Change-Id: I3c7452d1f09dc7fdbcffe9b047e4ec682ac6ea03
Reviewed-on: http://gerrit.openafs.org/4705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomake 1.6.0pre6
Derrick Brashear [Sun, 22 May 2011 15:40:46 +0000 (11:40 -0400)]
make 1.6.0pre6

update for 1.6.0pre6 the various build strings

Change-Id: Ic5deaa84f28cc39e955a0fcb1472a849d9feb4a3
Reviewed-on: http://gerrit.openafs.org/4703
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Flush vcaches in afs_shutdown
Andrew Deason [Tue, 10 May 2011 19:16:06 +0000 (14:16 -0500)]
libafs: Flush vcaches in afs_shutdown

Currently, a few platforms (linux, linux24, solaris, irix) flush all
vcaches during shutdown. However, they do this before calling
afs_shutdown(), resulting in afs_FlushVCache queueing VCBs and
possibly trying to give the callbacks back to the server.

Instead of this, perform the flushes in afs_shutdown itself, so we do
this after we try to give up all callbacks to all servers, and we do
this while afs_shuttingdown is set, so we don't try to queue VCBs.
This also consolidates some of the duplicated code to flush all
vcaches, and now does this for all platforms.

Reviewed-on: http://gerrit.openafs.org/4641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0)

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