]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoWindows: make osi_Log macro safe for if..else
Jeffrey Altman [Sun, 7 Aug 2011 18:11:17 +0000 (14:11 -0400)]
Windows: make osi_Log macro safe for if..else

wrap the osi_Log macro's internal if statement with
a do {...} while(0) block in order to ensure that
it is safe for use in if..else controls without bracing.

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

Change-Id: I954ea5a567bbfd77b02d3e8634a64f877668280e
Reviewed-on: http://gerrit.openafs.org/5211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: adjust scache LRU postion upon deletion
Jeffrey Altman [Thu, 4 Aug 2011 21:25:01 +0000 (17:25 -0400)]
Windows: adjust scache LRU postion upon deletion

If the object represented by a scache object is deleted,
update the LRU position of the scache object to make it
the first object in the LRU queue to be recycled.  This
preserves the cached objects for those that might prove
useful in the future.

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

Change-Id: Icf60ad3127c295e4fca0e99e338ba4c62cd9e392
Reviewed-on: http://gerrit.openafs.org/5210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: LockOrderValidation memory usage optimization
Jeffrey Altman [Thu, 4 Aug 2011 21:15:16 +0000 (17:15 -0400)]
Windows: LockOrderValidation memory usage optimization

Instead of using malloc() and free() to allocation lock reference
structures, cache allocated objects in a free list.  This reduces
memory fragmentation.

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

Change-Id: Ifc8d7b6a92e32557575e24cec7513f890439ce67
Reviewed-on: http://gerrit.openafs.org/5209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: after dir enum adjust dir scache LRU
Jeffrey Altman [Thu, 4 Aug 2011 21:08:45 +0000 (17:08 -0400)]
Windows: after dir enum adjust dir scache LRU

During a directory enumeration the directory scache object
is reference counted so it can't be recycled.  However, if
there are more directory entries than the maximum number
of cached scache objects the directory scache object will
end up being the next object to be recycled after the refcount
is dropped.  Since the directory is clearly a hot object, before
dropping the reference, adjust the scache LRU position so that
it is the last object to be recycled.

Fix the variable name for the directory scache to be 'dscp'
for consistency.

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

Change-Id: Ie4400d769a7ac2d0bfed3ccebe02760619bb76b2
Reviewed-on: http://gerrit.openafs.org/5208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: use %p to print cm_scache_t pointers
Jeffrey Altman [Tue, 2 Aug 2011 22:24:56 +0000 (18:24 -0400)]
Windows: use %p to print cm_scache_t pointers

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

Change-Id: If4ff7b219cce5c631666e0843123f6c7d8dbcec6
Reviewed-on: http://gerrit.openafs.org/5207
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRedHat: Return status values from client init
Will Maier [Sun, 31 Jul 2011 13:24:12 +0000 (14:24 +0100)]
RedHat: Return status values from client init

The init script provided with OpenAFS always returns 0 when the status
subcommand is called, even if the service is not running.

For example:

$ sudo service afs status; echo $?
afsd is stopped
0

This change makes sure the init script exits with the value returned
by the status function from /etc/init.d/functions. With this patch,
the afs init script behaves as expected when used, for example, in a
Chef service resource:

$ sudo service afs status; echo $?
afsd is stopped
3

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

Change-Id: I4103875caba88d61c3edf480f3a7e0b24227a319
Reviewed-on: http://gerrit.openafs.org/5231
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Do not release NULL root vp on unmount
Andrew Deason [Fri, 29 Jul 2011 21:44:11 +0000 (16:44 -0500)]
SOLARIS: Do not release NULL root vp on unmount

When we unmount, and afs_globalVp is NULL (e.g. because root.afs was
unavailable when the client was started), we will panic the machine if
we try to release it. So, if afs_globalVp is NULL when we hit our
unmount handler, don't touch it.

Reported by Andy Cobaugh.

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

Change-Id: Iaa5db97e9fc87d1eb083d20a9fc6a49cbb5a066b
Reviewed-on: http://gerrit.openafs.org/5230
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: spell "vldb" correctly
Derrick Brashear [Mon, 1 Aug 2011 14:58:28 +0000 (10:58 -0400)]
vos: spell "vldb" correctly

i'm not even going to ask.

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

Change-Id: I0188a58363657a0ccf48afef79bf63ff4c4b4f9d
Reviewed-on: http://gerrit.openafs.org/5229
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser doesn't depend on tviced, but on vlserver
Simon Wilkinson [Wed, 3 Aug 2011 17:45:01 +0000 (18:45 +0100)]
volser doesn't depend on tviced, but on vlserver

Nothing within the volser/ directory depends on tviced, so remove the
unecessary dependency. Add an explicit dependency on vlserver, so that
libvldb is available to us.

This is required to get rid of some potential circular loops when we
start including volser objects in libafsauthent

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

Change-Id: I0ff6463cc63093f1c82ed74523256cbdb7fc75c8
Reviewed-on: http://gerrit.openafs.org/5228
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: don't free stack garbage on error
Garrett Wollman [Sun, 7 Aug 2011 03:15:14 +0000 (23:15 -0400)]
vos: don't free stack garbage on error

If wantExtendedInfo is true, then pntr is used uninitialized.
In the other case, UV_ListVolumes will have set it to NULL
before doing anything (even if it returns an error), so this
free() is dead anyway.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5164
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 619b420903c99e48618db0d2f12085111573f279)

Change-Id: Icd76d3ac160ccb04b05445552a9e6d04f053efbb
Reviewed-on: http://gerrit.openafs.org/5227
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobutc: avoid testing stack garbage; remove dead initializer
Garrett Wollman [Sun, 7 Aug 2011 03:49:10 +0000 (23:49 -0400)]
butc: avoid testing stack garbage; remove dead initializer

"code" is unconditionally set early in saveDbToTape() so there's
no need to initialize it.  On the other hand, dumpEntry.id is used
before dumpEntry is initialized, so set it to what appears to be
the expected value before any non-local exits could cause it to be
inspected.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c92f04af6094ce04b1541a1b23b254d3c1421290)

Change-Id: If99aaf327749550623ef5abc3dd077f5291bc899
Reviewed-on: http://gerrit.openafs.org/5226
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: avoid nat ping until connection is attached
Derrick Brashear [Mon, 1 Aug 2011 20:38:46 +0000 (16:38 -0400)]
rx: avoid nat ping until connection is attached

drop nat pings on connections we haven't talked on yet

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

Change-Id: Id64a771f9cb50191a665f5ccb98ec66d991f47bb
Reviewed-on: http://gerrit.openafs.org/5225
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobutc: avoid freeing uninitialized pointer in writeDbDump()
Garrett Wollman [Sun, 7 Aug 2011 03:55:50 +0000 (23:55 -0400)]
butc: avoid freeing uninitialized pointer in writeDbDump()

In error conditions, charList could be freed before it is initialized.
Move the initialization up to before the error checks.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5167
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 43834bff1a2b1af348ff69d538a884bf1070b90c)

Change-Id: I05d1602b3f59b521d7daa3fd23f6609bf14c460e
Reviewed-on: http://gerrit.openafs.org/5224
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoafsd: look in the right place for -splitcache argument
Garrett Wollman [Sun, 7 Aug 2011 04:35:36 +0000 (00:35 -0400)]
afsd: look in the right place for -splitcache argument

The argument to -splitcache is in as->parms[34], not [30].

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5169
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 90ea68979c6740583747d0af500ed4a034eba651)

Change-Id: Iff8072cf8c7b5d9a5d7486fc9778f079fab1426c
Reviewed-on: http://gerrit.openafs.org/5223
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobos: don't dereference a null pointer when printing an error message
Garrett Wollman [Tue, 9 Aug 2011 03:26:38 +0000 (23:26 -0400)]
bos: don't dereference a null pointer when printing an error message

The parameter we are interested in is at MRAFS_OFFSET + 17, not
MRAFS_OFFSET + 13.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5178
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 bf4b2fd3e26dcf2a0db704815e05d77a558d38c6)

Change-Id: I92db9e5ec10054cef4421ab1b2fd0f60baaf07ca
Reviewed-on: http://gerrit.openafs.org/5222
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agotbudb depends on tubik ...
Simon Wilkinson [Wed, 3 Aug 2011 18:07:14 +0000 (19:07 +0100)]
tbudb depends on tubik ...

... so say so in the Makefile

(cherry picked from commit 88725587e97d717086801b2522e4625e5fdeb3a8)
Reviewed-on: http://gerrit.openafs.org/5155
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ibe759403533cd4b2d538cf1cd905c6268a341f0f
Reviewed-on: http://gerrit.openafs.org/5235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: axe static vfs_fsentry
Derrick Brashear [Thu, 11 Aug 2011 14:43:16 +0000 (10:43 -0400)]
macos: axe static vfs_fsentry

for whatever reason, lion 32 bit doesn't like it when this is static.
fine, so it's not static now.

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

Change-Id: I3949fcb69e14c00e0ade2826345be489426d7a04
Reviewed-on: http://gerrit.openafs.org/5220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: avoid aborting on host table exhaustion
Derrick Brashear [Thu, 11 Aug 2011 15:11:01 +0000 (11:11 -0400)]
viced: avoid aborting on host table exhaustion

if we exhaust the host table, instead of aborting, return VBUSY at
the client, to defer until hopefully hosts are freed.

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

Change-Id: Ic761e487ef0cfe402103bf06bd051958b07641b9
Reviewed-on: http://gerrit.openafs.org/5219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorpm: Set executable bits on installed libraries
Jonathan Billings [Thu, 11 Aug 2011 12:48:48 +0000 (13:48 +0100)]
rpm: Set executable bits on installed libraries

Set the executable bits on the libraries installed in libdir.  This
change is important because it causes 'rpmbuild' to generate Provide
tag metadata for the libraries in the package, which is necessary now
that some binaries in other packages have generated Requires tags for
libraries packaged in the base package.  'rpmbuild' will not generate
the Provides tag if the libraries lack executable permission.

This change is part of 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149
on master (the rest of that change isn't applicable to the 1.6 branch)

Change-Id: Ie95d0d5e16745cfbf0d2a733a9421f94a89216ff
Reviewed-on: http://gerrit.openafs.org/5204
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agorpm: remove postinstall message from openafs-client
Andy Cobaugh [Fri, 15 Jul 2011 16:06:12 +0000 (12:06 -0400)]
rpm: remove postinstall message from openafs-client

Printing out information on how to configure cacheinfo and ThisCell
is a bit noisy, and pam_afs.so is probably not what most people
want to use nowadays.

Reviewed-on: http://gerrit.openafs.org/5026
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 30cd8dafa73d90a943f00af05e4841699bc18534)

Change-Id: Ib6b7448b5e123a593d595b73f8102d82d1ae2535
Reviewed-on: http://gerrit.openafs.org/5203
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agorpms: Fix handling of x86 architectures
Simon Wilkinson [Tue, 12 Jul 2011 00:45:10 +0000 (01:45 +0100)]
rpms: Fix handling of x86 architectures

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

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

Change-Id: I16c2a4a6586e63be967b5fb019ede10a24c6cde4
Reviewed-on: http://gerrit.openafs.org/5202
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agorpms: Fix our %version handling
Simon Wilkinson [Mon, 11 Jul 2011 19:21:17 +0000 (20:21 +0100)]
rpms: Fix our %version handling

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

FIXES 130137

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

Change-Id: I047f535b023a01468a3ad169d1742002abb59123
Reviewed-on: http://gerrit.openafs.org/5201
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agokdb: don't dereference a null pointer on corrupt database
Garrett Wollman [Tue, 9 Aug 2011 01:18:15 +0000 (21:18 -0400)]
kdb: don't dereference a null pointer on corrupt database

When iterating through the database, kdb would dereference a
null pointer if it encountered an error retrieving the value
or if the value was not the right length, in code that was clearly
cut-and-pasted from the other branch of an "if" statement where a
specific entry was requested on the command line.  Print the name
of the entry with the problem as was apparently intended.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5174
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 ae6a3929489035ddcd17785abab8900cebd22eb3)

Change-Id: I5c79189f82a636b923c074d3c69cb3b6fef732aa
Reviewed-on: http://gerrit.openafs.org/5188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFBSD: catch up with the disappearance of VOP_GETVOBJECT
Garrett Wollman [Wed, 10 Aug 2011 04:18:28 +0000 (00:18 -0400)]
FBSD: catch up with the disappearance of VOP_GETVOBJECT

The vnode operation VOP_GETVOBJECT disappeared in FreeBSD 6.0, an
embarrassingly long time ago.  Six years ago, a kluge was added
to emulate its behavior, but it did not correctly emulate the
return value of the old VOP implementation.  As a result,
osi_VM_StoreAllSegments() could never actually do anything.  Since we
don't support FreeBSD before 8.0, remove all references to VOP_GETVOBJECT
and examine vp->v_object directly instead.

This has the result that osi_VM_StoreAllSegments() will actually do
something now, which may not be desirable.  (Previously, if somehow
the vnode had no associated VM object, it would crash, and otherwise
it would do nothing at all.)

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3)

Change-Id: I57198967ad022f50af073ac43643f3a55b0801ef
Reviewed-on: http://gerrit.openafs.org/5187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: reset next vcache pointer after reacquiring xvcache
Derrick Brashear [Wed, 10 Aug 2011 13:39:23 +0000 (09:39 -0400)]
macos: reset next vcache pointer after reacquiring xvcache

dropping the xvcache lock means that things can change out from under
us. in case they do, reset the next vcache pointer before looping

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

Change-Id: I2ad487e348f84cd7ced884c920230e3371fce902
Reviewed-on: http://gerrit.openafs.org/5186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: add missing dafs man pages to wix installer
Jeffrey Altman [Tue, 2 Aug 2011 01:40:25 +0000 (21:40 -0400)]
Windows: add missing dafs man pages to wix installer

dafileserver.html
dasalvager.html
davolserver.html

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

Change-Id: Ied99d695c59242903d39249c1d1bb25058d40a24
Reviewed-on: http://gerrit.openafs.org/5151
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: conditionalize mappings of error values
Jeffrey Altman [Mon, 1 Aug 2011 15:05:51 +0000 (11:05 -0400)]
Windows: conditionalize mappings of error values

Visual Studio 10 adds a large number of additional POSIX C99
error values to errno.h.  Wrap each mapping with #ifndef to ensure
that we do not redefine the C runtime errno.h definition.

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

Change-Id: I528547f95ebbe83390924844d21a9e850dc5967d
Reviewed-on: http://gerrit.openafs.org/5148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: unified afs errors must use nt mapping
Jeffrey Altman [Mon, 1 Aug 2011 15:00:55 +0000 (11:00 -0400)]
Windows: unified afs errors must use nt mapping

On Windows, error.h does not provide a complete list of POSIX
C99 error values.  OpenAFS fills in the gaps with a private
error mapping table afs/errmap_nt.h (src/util/errmap_nt.h).
If errmap_nt.h is not included prior to processing unified_afs.h,
values such as ELOOP will be mapped to EIO instead of the unique
value defined by errmap_nt.h.

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

Change-Id: If6582d7242418c15eb007471199a6dfcc6732e3b
Reviewed-on: http://gerrit.openafs.org/5147
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 execute tasks on deleted files
Jeffrey Altman [Fri, 29 Jul 2011 22:09:53 +0000 (18:09 -0400)]
Windows: Do not execute tasks on deleted files

If a cm_BkgDaemon thread finds a queued request whose cm_scache_t
has the CM_SCACHEFLAG_DELETED flag set, do not execute the request
and fail it immediately with CM_ERROR_BADFD.  Any attempt to execute
the request will fail with VNOVNODE from the file server.

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

Change-Id: I92610c215d7d44ceb1894bb3ab7784534a66e452
Reviewed-on: http://gerrit.openafs.org/5146
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: cm_BkgDaemon should not do cm_SyncOp's job
Jeffrey Altman [Thu, 7 Jul 2011 21:51:58 +0000 (17:51 -0400)]
Windows: cm_BkgDaemon should not do cm_SyncOp's job

cm_SyncOp is designed to synchronize operations among multiple
threads.  The background daemon threads should not filter requests
based upon cm_SyncOp states.  Doing so is racy and does not produce
better performance.

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

Change-Id: I2293643bf708c3e87093005d95c7d1203c6f680a
Reviewed-on: http://gerrit.openafs.org/5145
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 release locks on deleted files
Jeffrey Altman [Fri, 29 Jul 2011 22:07:42 +0000 (18:07 -0400)]
Windows: Do not release locks on deleted files

If the cm_scache_t flags include CM_SCACHEFLAG_DELETED, do not
bother releasing an outstanding file lock to the file server.
The lock went away when the file was deleted.  Any attempt to
release will fail with VNOVNODE which is translated locally into
CM_ERROR_BADFD.

If a RXAFS_ReleaseLock RPC fails with VNOVNODE, treat it as
success.

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

Change-Id: I4b70abab200ea50b419e215f4b3f3b4d3d7ab484
Reviewed-on: http://gerrit.openafs.org/5144
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: permit perl command to be explicitly set
Jeffrey Altman [Thu, 28 Jul 2011 19:05:28 +0000 (15:05 -0400)]
Windows: permit perl command to be explicitly set

Add PERL variable to the build system.  If not specified
externally the variable will be set to 'perl'.  However,
ActiveState Perl should be used and not Cygwin Perl.  The build
environment should indicate that by specifying a PERL setting.

SET PERL=c:\perl64\bin\perl.exe

or similar.

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

Change-Id: Ifd5ba10176ba1a7d6fda7506a0a4c250ad1945f6
Reviewed-on: http://gerrit.openafs.org/5143
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoman: add missing pod files to Windows makefile
Jeffrey Altman [Thu, 28 Jul 2011 19:02:14 +0000 (15:02 -0400)]
man: add missing pod files to Windows makefile

Several of the demand attach pod files were not being processed
on Windows.

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

Change-Id: I84663e5313d1845761ba7fe7043448ba000c9ec5
Reviewed-on: http://gerrit.openafs.org/5142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agomerge-pod changes for cygwin and MSWin32 perl
Jeffrey Altman [Thu, 28 Jul 2011 18:59:05 +0000 (14:59 -0400)]
merge-pod changes for cygwin and MSWin32 perl

On Windows, the git repository is checked out as CR-LF.
Tell perl to open the pod file with cr-lf as the end of line.

On Windows, the input file names are of the form podX\foo.pod.in.
Cygwin perl cannot parse the directory for the file name unless
the path separator is converted from \ to /.

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

Change-Id: Ifc4a649ee2b59115632f8d27a00b2bdb794822d1
Reviewed-on: http://gerrit.openafs.org/5141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
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>