]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
15 years agoWindows: Cleanup build scripts; no include\afs or include\rx
Jeffrey Altman [Mon, 11 Oct 2010 19:00:08 +0000 (15:00 -0400)]
Windows: Cleanup build scripts; no include\afs or include\rx

As part of the build system cleanup, minimize the number of
directories in which include\afs and include\rx paths are included
by default.  To acheive this goal the windows openafs dirent.h is
moved from include\afs to include, references whenever possible to
openafs headers included in include\afs or include\rx are prefixed
with afs\ or rx\ as appropriate.

Some source files or directories have a broad range of interdependencies
that make separation quite challenging.  For those directories or files
the inclusion of the path is added at the smallest possible level.
At some point in the future the WINNT\afsd\ headers should be moved
from include\afs to include\WINNT and should be installed there first
and then referenced internally from that location instead of from the
WINNT\afsd directory.  That will permit further cleanup to be performed.

Reviewed-on: http://gerrit.openafs.org/2961
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 091b6e19d14b8d7c7396496d050fff5d067791a9)

Change-Id: I4f26ea2c3db67c164236dc84b78084822b562b95
Reviewed-on: http://gerrit.openafs.org/3167
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agomake openafs 1.5.78
Derrick Brashear [Wed, 27 Oct 2010 03:28:57 +0000 (23:28 -0400)]
make openafs 1.5.78

update version strings and such

Change-Id: Ia3c8bff95ea72708d815d74a35a55d4348d560f2
Reviewed-on: http://gerrit.openafs.org/3168
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: move debug break in afsd_notifier
Jeffrey Altman [Tue, 26 Oct 2010 02:58:51 +0000 (22:58 -0400)]
Windows: move debug break in afsd_notifier

move the debug break before the cache dump occurs
so that a debugger will be signalled faster when
a panic condition occurs.

Reviewed-on: http://gerrit.openafs.org/3147
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1664a2642b56febc08af8f95250a6d64761a525f)
Change-Id: I25a0eaaacb44555c1ddf5f538ef9c6792f6dac59
Reviewed-on: http://gerrit.openafs.org/3156
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Fix starting of transmit timers
Simon Wilkinson [Mon, 25 Oct 2010 19:50:29 +0000 (20:50 +0100)]
rx: Fix starting of transmit timers

The code used to start the transmit timer once for every set of packets
that it sends. However, these packets might be sent individually or in
clumps, with blocking for sendmsg, and on peer->lock, between each set
of packet sends. This has the effect of, even on a very stable network,
producing a high degree of variation in RTTs and timeouts. This is a
particular issue where the connection size is larger, as the number of
packets being sent individually under the one timer grows too.

Fix this by moving timer initialisation to SendList. This already takes
the peer lock, so obtain the timeout value here too. This means that
each jumbo gram, or individual packet (where jumbograms are disabled)
is sent with its own start time, and stabilises RTTs.

(cherry picked from commit e7066a9c30047e787d72f02dd1c28e5e473e494b)
Reviewed-on: http://gerrit.openafs.org/3137
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I64edd961e7e9cd615e07cc3f32d9bf71f74c8c8e
Reviewed-on: http://gerrit.openafs.org/3155
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 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: I43102ffc961d33255c995f4ff84142b7203cd11b
Reviewed-on: http://gerrit.openafs.org/3154
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Refactor transmit queue wakeup
Simon Wilkinson [Mon, 25 Oct 2010 08:52:10 +0000 (09:52 +0100)]
rx: Refactor transmit queue wakeup

Refactor all of the places where we wake up the transmit queue into
a common helper function.

Reviewed-on: http://gerrit.openafs.org/3136
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 802d50bc4e220b9bf404ac1ee36720023986d98e)
Change-Id: I4db12f228e5f10f7ab4a68604828823f6b783677
Reviewed-on: http://gerrit.openafs.org/3153

15 years agoWindows: Fix math error in rx_Writev processing
Jeffrey Altman [Tue, 26 Oct 2010 03:05:00 +0000 (23:05 -0400)]
Windows: Fix math error in rx_Writev processing

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3148
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e848f3c2160745228e0f770f8daf4fffcca7507a)
Change-Id: I5f31ae8500ace8e5a95f21510cb7c3eaae547aee
Reviewed-on: http://gerrit.openafs.org/3152
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Use rx_Readv / rx_Writev
Jeffrey Altman [Sun, 17 Oct 2010 04:35:36 +0000 (00:35 -0400)]
Windows: Use rx_Readv / rx_Writev

When USE_RX_IOVEC is defined, cm_BufWrite() will utilize rx_Writev()
instead of rx_Write() and cm_GetBuffer() will use rx_Readv() instead
of rx_Read() to improve throughput.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e356090ba21395e110b8a403a5efaf725ca3ffc8)
Change-Id: I0afb35343d111fd32c0ee65d8ab976a65c27e1a5
Reviewed-on: http://gerrit.openafs.org/3151
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorename some variables in rxperf
Chas Williams (CONTRACTOR) [Fri, 1 Oct 2010 13:58:52 +0000 (09:58 -0400)]
rename some variables in rxperf

sendtimes and recvtimes are actually the data byte counts to be
exchanged during an rpc test not an iteration count as implied
by their names

Reviewed-on: http://gerrit.openafs.org/2876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9d912b6f1c4f3d242429c66291107b2badd166e4)
Change-Id: Ie18184f5d6d911ba18ad216cb3726378333f6213
Reviewed-on: http://gerrit.openafs.org/3036

15 years agoWindows: register idle dead timeout error
Jeffrey Altman [Mon, 14 Jun 2010 13:43:31 +0000 (09:43 -0400)]
Windows: register idle dead timeout error

be like the unix cache manager and set an error code
so idle dead time is enforced on sending.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3033
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit f943a4eb524434d25ecf99cba0843ded13aef176)
Change-Id: I8ede65aef843af358455126301067d0b889ae9a8
Reviewed-on: http://gerrit.openafs.org/3143
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Backup and restore configuration across installs
Asanka C. Herath [Mon, 18 Oct 2010 08:52:34 +0000 (04:52 -0400)]
Windows: Backup and restore configuration across installs

The MSI installer for OpenAFS does not preserve configuration data
across installs.  This patch creates a backup of specific
configuration registry values when uninstalling OpenAFS and uses this
backup when subsequently installing OpenAFS.

Reviewed-on: http://gerrit.openafs.org/2977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1418b4fec23459aafec4b5a787e2c2b89f6af1f1)
Change-Id: I4eab1a4a3ea33bdcd7ccb27aea0927eed16892ca
Reviewed-on: http://gerrit.openafs.org/3142
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Make Rx PMTU discovery configurable; disable by default
Jeffrey Altman [Sat, 23 Oct 2010 19:45:36 +0000 (15:45 -0400)]
Windows: Make Rx PMTU discovery configurable; disable by default

Disable PMTU discovery by default.  Permit it to be enabled
with the RxPMTUDiscovery TransarcAFSDaemon\Parameter value.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3032
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 2c12b80a4fdb8323ff3fdd194ff1994ad0a0b8e1)
Change-Id: Ic5b3d8e267bc10ee1802e5c391f87d37d605bec9
Reviewed-on: http://gerrit.openafs.org/3141
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Tidy up variables in RTT calc
Simon Wilkinson [Sat, 23 Oct 2010 14:07:42 +0000 (15:07 +0100)]
rx: Tidy up variables in RTT calc

We used to do rttp = &thisRtt, and then use rttp and thisRtt to
interchangably refer to the same data. This is just confusing, and
unnecessary. Replace all of the occurences of rttp with &thisRtt.

Take the opportunity to use the Clock_IsZero macro rather than doing
an explicit zero clock check.

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

Change-Id: If2ad45645bc27af3a8ecd97f047b5558c73b173d
Reviewed-on: http://gerrit.openafs.org/3144
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Fix bracing on rx_clock macro arguments
Simon Wilkinson [Sat, 23 Oct 2010 14:16:17 +0000 (15:16 +0100)]
rx: Fix bracing on rx_clock macro arguments

Add brackets around the arguments in the clock helper macros, so that
these can be called with more complex parameters.

Reviewed-on: http://gerrit.openafs.org/3030
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 da18ca41751b43576f6652a16f69260e0c6ac0d6)
Change-Id: Ie560d081e160ec1518c6d3fd307455ae8d219651
Reviewed-on: http://gerrit.openafs.org/3128
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: More improvments to RTT calculation
Simon Wilkinson [Sat, 23 Oct 2010 13:51:56 +0000 (14:51 +0100)]
rx: More improvments to RTT calculation

Move the decision about whether a packet contributes to the peer's
rount trip time into the CalculateRoundTripTime function, and improve
the criteria used.

Previously, we only computed the RTT if we had not retransmitted. This
is bad, because it means that places where we have backed off in order
to retransmit never actually lengthen the RTT, and so the RTT is kept
artificially low, and we see a large number of retransmits. Instead,
use the serial of the ACK packet to determine which transmission is
being acknowledged, and if it is the first, or the last, transmission
use the appropriate sent time to calculate the RTT.

If we have no serial in the ACK (for a delayed ack, for example), or
if the serial doesn't match (where a single acknowledgement is soft
acking a number of packets), fall back to only using the ack if the
packet has not be retransmitted.

Also, avoid multiple counting of packets which have arrived as part
of a jumbogram by only permitting the last packet in a jumbogram to
contribute to the RTT. This avoids giving the RTT of jumbograms more
weight than those of normal packets - doing so would pull down the
RTT, as it in effect favours packets which have not be retransmitted.

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 290495fab1b2a8f1dc842cb2dd6de2d9922169c6)
Change-Id: I13fef02ad3c456614cd71227e6a0ae8b4a3f5c72
Reviewed-on: http://gerrit.openafs.org/3127
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Treat rx_minPeerTimeout not as a minimum but as padding
Jeffrey Altman [Thu, 21 Oct 2010 18:13:03 +0000 (14:13 -0400)]
Rx: Treat rx_minPeerTimeout not as a minimum but as padding

An improved RTT and timeout calculation algorithm is being
developed but until we have it, treat rx_minPeerTimeout not as
a minimum value for the timeout but as padding to be added to
the measured RTT when computing the peer timeout value.

With this change rx does not begin to send large numbers of
resends when the RTT begins to exceed the rx_minPeerTimeout
value.  Timeout triggered resends at the moment can force rx
into fast recovery mode which in turn kills performance.  It
is better to avoid that problem for now.

Reviewed-on: http://gerrit.openafs.org/3026
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 5c8981e0404287f2aa46390d3a9e8a52261906ab)
Change-Id: I82cf73cc8153d9aba669dc581231a88949b6ec4d
Reviewed-on: http://gerrit.openafs.org/3126
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Fix socket() handling so errors are properly detected
Jeffrey Altman [Thu, 21 Oct 2010 18:23:18 +0000 (14:23 -0400)]
Rx: Fix socket() handling so errors are properly detected

socket() returns an osi_socket which on Windows is an
unsigned type (HANDLE).  Therefore, tests of osi_socket < 0
will never identify when the INVALID_SOCKET value is returned.
On Windows, the OSI_NULLSOCKET is assigned to INVALID_SOCKET.
Replace all comparisons of (osi_socket < 0) with
(osi_socket == OSI_NULLSOCKET) as a means of detecting errors.

In addition, do not pass socket() the protocol value 0 when
IPPROTO_UDP is what is desired.

Finally, perror() on Windows never reports any error from Winsock.
perror() is a CRT function.  To get the real socket error
WSAGetLastError() must be called and its value be written to
stderr.

Reviewed-on: http://gerrit.openafs.org/3027
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit c8f47626e2428449bfb64844e46fe5ad6b8e0f1c)
Change-Id: Ib9aada7b549e661eaf965747011ffbe85e306d4d
Reviewed-on: http://gerrit.openafs.org/3125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agolinux fh_to_dentry can return err
Charles Hannum [Fri, 22 Oct 2010 18:50:56 +0000 (14:50 -0400)]
linux fh_to_dentry can return err

handle e.g. ESTALE from  fh_to_dentry (in this case via
d_obtain_alias and fat_fh_to_dentry) so we print a meaningful
error when we lose.

Reviewed-on: http://gerrit.openafs.org/3028
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 046f230ed4dde4c31d849893eec750437135342e)
Change-Id: I5c3084346631e4f07987d1dab2b1b891dbefbda0
Reviewed-on: http://gerrit.openafs.org/3124

15 years agoWindows: Fix i386_w2k and i386_nt40 path construction
Jeffrey Altman [Thu, 21 Oct 2010 18:09:53 +0000 (14:09 -0400)]
Windows: Fix i386_w2k and i386_nt40 path construction

Now that DEST and OBJ are defined in terms of AFSROOT
do not DESTDIR and OJT in terms of AFSROOT.

Reviewed-on: http://gerrit.openafs.org/3025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 6f3938e80a79a4a3684565a6960bce18e167aea4)
Change-Id: I4f084faaa5e058bb16045552135c70ac0a1683d3
Reviewed-on: http://gerrit.openafs.org/3122
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Improve cm_SyncOpDone logging
Jeffrey Altman [Wed, 20 Oct 2010 23:35:10 +0000 (19:35 -0400)]
Windows: Improve cm_SyncOpDone logging

Reviewed-on: http://gerrit.openafs.org/3022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 64f732764cab7387943647285d5e5203f0c74218)
Change-Id: I5345fe5912afb7b41f7c27f12b3df3862f04a5de
Reviewed-on: http://gerrit.openafs.org/3121
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: remove unnecessary prototype from smb.c
Jeffrey Altman [Wed, 20 Oct 2010 23:31:19 +0000 (19:31 -0400)]
Windows: remove unnecessary prototype from smb.c

Remove rx_StartClientThread() prototype.

Reviewed-on: http://gerrit.openafs.org/3021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 5880a576273c3b5f7683937df42bacf506007ba2)
Change-Id: I0b61600b48239fbd30d8e8a13cc73fe33e4fe5df
Reviewed-on: http://gerrit.openafs.org/3120
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: optimize cm_BkgDaemon()
Jeffrey Altman [Wed, 20 Oct 2010 23:29:32 +0000 (19:29 -0400)]
Windows: optimize cm_BkgDaemon()

In cm_BkgDaemon test for CM_SCACHEFLAG_DATASTORING before
cm_ServerAvailable() in order to avoid unnecessary work.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 49e57b8c3b5e13f7ce48c6be5677827d970df5fa)
Change-Id: Ib33babf87605c8f93ee87e8f7c8084e213eedbc4
Reviewed-on: http://gerrit.openafs.org/3119
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: remove warnings from cm_daemon.c
Jeffrey Altman [Wed, 20 Oct 2010 23:28:26 +0000 (19:28 -0400)]
Windows: remove warnings from cm_daemon.c

Properly cast void * to long and int to LPVOID to avoid warnings.

Reviewed-on: http://gerrit.openafs.org/3019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit dd01970f440cc68fbd71a1544ee655131f42be51)
Change-Id: If6743a5b341f40f42955638d5e2f09b3cb24924f
Reviewed-on: http://gerrit.openafs.org/3118
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: prototype cm_PerformanceTuningInit()
Jeffrey Altman [Wed, 20 Oct 2010 23:26:06 +0000 (19:26 -0400)]
Windows: prototype cm_PerformanceTuningInit()

Reviewed-on: http://gerrit.openafs.org/3018
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit bc810f4ac04fb6385e57d235f976d3f42f83e28a)
Change-Id: Ib328db77b9783e3d6ecae3d719c8e85952b10488
Reviewed-on: http://gerrit.openafs.org/3117
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: prototype rx_StateClienThread()
Jeffrey Altman [Wed, 20 Oct 2010 23:25:00 +0000 (19:25 -0400)]
Rx: prototype rx_StateClienThread()

Reviewed-on: http://gerrit.openafs.org/3017
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 3f2f327df4d8cbac927e290d03d78611f7b12a69)
Change-Id: I04ef0f93571ca450adf4e1b33268cf9c100822b9
Reviewed-on: http://gerrit.openafs.org/3116
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: rx_stats_active not RXDEBUG
Jeffrey Altman [Wed, 20 Oct 2010 23:23:11 +0000 (19:23 -0400)]
Rx: rx_stats_active not RXDEBUG

In rx_StatsOnOff() the assignment to rx_stats_active should not
be protected by RXDEBUG.

Reviewed-on: http://gerrit.openafs.org/3016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 929ca25d6d3fef07ea7c103dcd43a2658cdf71bd)
Change-Id: Id8bc93ec669333e8016d0958eb5c0fd87b76d9e0
Reviewed-on: http://gerrit.openafs.org/3115
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: remove spurious compare for maxDgramPackets
Chas Williams (CONTRACTOR) [Wed, 20 Oct 2010 13:06:35 +0000 (09:06 -0400)]
rx: remove spurious compare for maxDgramPackets

maxDgramPackets is initially assigned this value after correcting
for the wire endian.  This compare is harmless on little endian
since the network endian value will typically be huge and redundant
on big endian machines.

Reviewed-on: http://gerrit.openafs.org/3015
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 da400a24a7c9d5ac1595f10e0c76df5a461aa5dc)
Change-Id: I3e8c77e30021055192951765bb823b635775e128
Reviewed-on: http://gerrit.openafs.org/3114
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Simplify round trip time calculation
Simon Wilkinson [Mon, 11 Oct 2010 17:25:38 +0000 (13:25 -0400)]
rx: Simplify round trip time calculation

Move the logic for deciding whether to compute RTT out of PeerNetStats
and into the callers. This means that we can share decisions about
whether a packet is ACK'd or not, and avoid uneccessary multiple tests
and function calls.

This change also stops us from computing RTT times for packets outside
of the set of explicit ACKs that we have received. This means that we
no longer compute RTTs for packets that are on the transmit queue, but
not yet on the wire.

Reviewed-on: http://gerrit.openafs.org/2960
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f7799a35c5942ba4feda3bc8c848cdaa8e0b7b76)
Change-Id: Idf4ba83ba187fd97caa85d0d042662c3b12efa02
Reviewed-on: http://gerrit.openafs.org/3113

15 years agoRx: Do not compute RTT on non-last packets of a jumbogram
Jeffrey Altman [Sat, 16 Oct 2010 17:14:03 +0000 (13:14 -0400)]
Rx: Do not compute RTT on non-last packets of a jumbogram

A jumbogram is constructed as a series of rx packets that are
all sent at once and acknowledged at the same time.  Computing the
RTT for all of the packets that makes up the jumbogram provides
the jumbogram RTT more weight than for a non-jumbogram packet.
To restore fairness, only compute the RTT for the last packet of
a jumbogram.  The non-last packets with have the RX_JUMBO_PACKET flag
set in the packet header.

Reviewed-on: http://gerrit.openafs.org/2997
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 525ea8b60cc198f7e12da7a1aaffdcad2bb3ef21)
Change-Id: Ide4c225516dc7585b49ba7b244b56446297c74d1
Reviewed-on: http://gerrit.openafs.org/3112

15 years agoRx: Reject out of order ACK packets
Simon Wilkinson [Mon, 11 Oct 2010 17:14:02 +0000 (13:14 -0400)]
Rx: Reject out of order ACK packets

Our RX implementation virtually guarantees that we will see out of
order ACK packets, even on well behaved networks, as we send acks
simultaneously from multiple threads.

Currently we only reject out-of-order ACKS which change the window
position (so a window that advances, can never go back). However,
we fail to deal with the explicit acknowledgement portion of the ACK
packet in the same way...

For example, if we have a packet A that acknowledges packets 1 and 2,
and then a packet B acknowledging 1,2,3 and 4. If B arrives before A,
then we mark 1, 2, 3, 4 as acknowledged, and then treat the arrival of
A as nAcking 3 and 4. This has the same effect as an explicitly stated
nack, triggers an early and unnecessary resend and may, in some situations,
cause the call to go into congestion avoidance.

We can solve this using the previousPacket field of the ACK. This
indicates the last packet seen by the peer. In the same way as
firstPacket, this should never go backwards, and so can be used to
detect out of order acknowledgements, and reject them.

Reviewed-on: http://gerrit.openafs.org/2958
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4e71409fe1305cde4b9b341247ba658d8d24f4d0)
Change-Id: Idc064d5950b4235a303a933d046546b67add6623
Reviewed-on: http://gerrit.openafs.org/3111

15 years agoshakeloosevcaches drop xvcache during dentry ops
Derrick Brashear [Thu, 7 Oct 2010 17:41:22 +0000 (13:41 -0400)]
shakeloosevcaches drop xvcache during dentry ops

denote that we slept and drop xvcache while doing dentry
flushing.

Reviewed-on: http://gerrit.openafs.org/2944
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 98688ddf70cbfe21d22e5832b2f50d626b4183e9)
Change-Id: I6db42ba9cb1614fd86616d6b425f821c3199620c
Reviewed-on: http://gerrit.openafs.org/3110

15 years agopts: Specifically check for group id 0
Andrew Deason [Fri, 15 Oct 2010 21:35:32 +0000 (16:35 -0500)]
pts: Specifically check for group id 0

For consistency with the code checking user ids in createuser, check
for a specified group id of 0 specifically and give a slightly
different error message for it.

Reviewed-on: http://gerrit.openafs.org/2994
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.com>
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 5e9676144bc3d9b186495a06d14581a4fc97beff)
Change-Id: I37434f1ad44ed1fad41cf454291c91e0b046ec80
Reviewed-on: http://gerrit.openafs.org/3109
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agopts: Prevent creating negative user ids
Andrew Deason [Fri, 15 Oct 2010 21:37:55 +0000 (16:37 -0500)]
pts: Prevent creating negative user ids

User ids cannot be negative (those are groups). So, error out if a
negative id is specified for createuser.

FIXES 128343

Reviewed-on: http://gerrit.openafs.org/2993
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.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 ebfc586fd2d00085a384763cc519c2af6ce5223e)
Change-Id: I6a107dc5a1a6d98823f5377657856ca41566cb2b
Reviewed-on: http://gerrit.openafs.org/3108
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoReturn SRV record ports in network byte order
Russ Allbery [Thu, 14 Oct 2010 20:41:45 +0000 (13:41 -0700)]
Return SRV record ports in network byte order

Convert the port extracted from the SRV record return to network byte
order before assigning it to the port array.

The port in a SRV record is extracted by pulling out the high byte
and low byte and then mathematically combining them, which implicity
converts from network byte order to host byte order.  However, the
callers of afsconf_LookupServer expect the port array to be returned
in network byte order since ports are assigned without modification
to the .sin_port field of a struct sockaddr_in.  See also the byte
order of the default afsdbPort value.

Reported by Jan Christoph Nordholz (Debian Bug#600228).

Reviewed-on: http://gerrit.openafs.org/2985
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 ffe445483a07c751202a1ef06136f70402ec895d)
Change-Id: I918ed4acdcfecbe1f879746d80b501714f1e775f
Reviewed-on: http://gerrit.openafs.org/3107
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoOSX prefspane use Kerberos Preferences for defaults
Derrick Brashear [Tue, 12 Oct 2010 13:05:24 +0000 (09:05 -0400)]
OSX prefspane use Kerberos Preferences for defaults

if we have forwardable tickets, e.g., as a pref, get those.
and so on. this way tickets AFS got are not "Weird"

Reviewed-on: http://gerrit.openafs.org/2965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0adb2d758c23e1c02d5894d2c534b685999d821c)
Change-Id: I76449230243425c7f14df5ff9795bcdc3076fbdb
Reviewed-on: http://gerrit.openafs.org/3106

15 years agoLinux: fix statfs configure test
Marc Dionne [Wed, 13 Oct 2010 23:11:25 +0000 (19:11 -0400)]
Linux: fix statfs configure test

The change to the statfs configure test that was made for 2.6.36
broke the test for older kernels.  The new test is based on a call,
and that will generate a warning but not an error when the arguments
don't match the prototype.

Take another tack, and revert to the old style test, but with the
simple_statfs function instead of vfs_statfs.

Reviewed-on: http://gerrit.openafs.org/2975
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 59927e20052c3f075e0269e46691bc94c3974f86)
Change-Id: I0f4c548d450b3c1019ff9c013edbc967cafe6c24
Reviewed-on: http://gerrit.openafs.org/3105
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX: old kernel warning fixes
Andrew Deason [Wed, 13 Oct 2010 16:27:03 +0000 (11:27 -0500)]
LINUX: old kernel warning fixes

 - osi_vfsop.c: struct super_block, not superblock

 - osi_vnodeops.c: initialize bypasscache

Reviewed-on: http://gerrit.openafs.org/2973
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ba96ebba7197420b1511bd1aae9db495398e038a)
Change-Id: I3c98809bf8763c03a6f1c27e7ebe68ddb8ad1318
Reviewed-on: http://gerrit.openafs.org/3104

15 years agodon't release Volume lightweight ref too early
Tom Keiser [Wed, 13 Oct 2010 05:10:09 +0000 (01:10 -0400)]
don't release Volume lightweight ref too early

FSYNC_com_VolOff was releasing its lightweight ref before the error handling
code for VGetVolumeByVp_r was executed; this code needs to dereference the
Volume pointer for some of its logic.  This was unsafe since
VCancelReservation_r() could have resulted in the Volume object being freed.
Move VCancelReservation_r() below the error handling block.  NB: the error
handling block now relies upon the goto done/deny to cancel its lightweight
ref.

Reviewed-on: http://gerrit.openafs.org/2968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a91da7a7b91ce0c4584092cd666eca89d39b8abf)
Change-Id: Ie84351628fd112aa1724180a08dba10f0903a016
Reviewed-on: http://gerrit.openafs.org/3103

15 years agorx: Don't malloc the xmit list
Simon Wilkinson [Sun, 10 Oct 2010 12:04:41 +0000 (08:04 -0400)]
rx: Don't malloc the xmit list

Building the transmit list happens in a time critical section of
code. Using malloc to allocate the list which holds the packets to
be transmitted slows down this critical section. Instead, just
allocate the space as part of the call structure.

Locking of xmitList is somewhat tricksy, as the call->lock is
dropped over calls to sendmsg(). However, the xmitList is protected
by the TQ_BUSY call flag, which prevents multiple threads from
usign the transmit queue, and hence the xmitList, simultaneously.

Reviewed-on: http://gerrit.openafs.org/2957
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 09aec1539dbe4e4c72ec7acadf2d25e6f93c5982)
Change-Id: I589fa248a124a15248e23b6154e193e4d136fde8
Reviewed-on: http://gerrit.openafs.org/3102
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Permit ADAPT_WINDOW code to build
Jeffrey Altman [Sun, 19 Sep 2010 17:46:34 +0000 (10:46 -0700)]
Rx: Permit ADAPT_WINDOW code to build

Add missing fields to rx data structures.

Update variable references.

Reviewed-on: http://gerrit.openafs.org/2783
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit be91260047627fb4fffeeed73c7f24c80448c673)
Change-Id: I2f5db5cc88919e61d09d5d1dbbb2679c0b9d1415
Reviewed-on: http://gerrit.openafs.org/3101

15 years agoRX: Force sane timeout values
Andrew Deason [Fri, 8 Oct 2010 16:51:30 +0000 (11:51 -0500)]
RX: Force sane timeout values

Currently we do not check the specified timeout values when someone
changes a connection's dead, idle, or hard dead time. However, if the
conn's dead time is larger than the other two times, a loss of network
activity will result in one of the other timeouts getting triggered
first.

To prevent this and possibly other problems from happening, force a
connection's timeouts to always obey the relationship
secondsUntilDead <= idleDeadTime <= hardDeadTime, by checking these
values whenever they are changed.

Change-Id: Ib9a0c65d91b4dc61c8d00381c8266b88b1d89b81
Reviewed-on: http://gerrit.openafs.org/2947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 7d6080a841ff8c91052fa708d5be3b582f8a971d)
Reviewed-on: http://gerrit.openafs.org/3065
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRX: Adjust all timeouts for RTT
Andrew Deason [Wed, 6 Oct 2010 22:24:02 +0000 (17:24 -0500)]
RX: Adjust all timeouts for RTT

Previously only the deadTime RX network timeout was getting adjusted
for the peer's rtt and rtt_dev values. Do this for the idle and hard
timeouts as well, since a higher RTT is going to make everything
potentially take longer.

Reviewed-on: http://gerrit.openafs.org/2967
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 48aca4a605fa46b677a50687d6ea911fbe7d2032)
Change-Id: I1496e5bff75deeb1210eac6fba8a9a7fe70c6e5f
Reviewed-on: http://gerrit.openafs.org/3064
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoupdate fssync-debug to handle the VOL_LOCKED flag
Tom Keiser [Wed, 13 Oct 2010 06:15:36 +0000 (02:15 -0400)]
update fssync-debug to handle the VOL_LOCKED flag

Allow fssync-debug to dump the VOL_LOCKED flag, rather than the
current behavior of printing absolutely nothing when this flag
is asserted.  In addition, increase the flag buffer size since
it turns out we would truncate if all nine flags were asserted
at once.

Reviewed-on: http://gerrit.openafs.org/2971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 198447ee71ca6510b760141395af5002daab2424)
Change-Id: Ia0ef7444577a8fb6480302a080397ee8674245cd
Reviewed-on: http://gerrit.openafs.org/3063
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agotrailing commas make xlc a sad panda
Tom Keiser [Wed, 13 Oct 2010 05:27:56 +0000 (01:27 -0400)]
trailing commas make xlc a sad panda

IBM VAC xlc_r throws parse errors when enumeration definitions have
trailing commas; let's avoid that.

Reviewed-on: http://gerrit.openafs.org/2970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 9577ec85c967ce4eb0c5a5ab45761a25da30038a)
Change-Id: Idbd4e6521246e5f7133b4582181af856f0acc530
Reviewed-on: http://gerrit.openafs.org/3062
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoUse bigger I/O sizes for the memcache
Chas Williams (CONTRACTOR) [Thu, 7 Oct 2010 15:05:50 +0000 (11:05 -0400)]
Use bigger I/O sizes for the memcache

There doesn't seem to be a need to limit the rx message size when
using rx_WritevAlloc.  If there arent enough rx buffers to hold
the entire message at once, it will simply return less space.

Reviewed-on: http://gerrit.openafs.org/2943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6880d4a3a227f6c05332ef799123e0a05b190aa9)
Change-Id: I3d6ef65eeff2e59d662cd7f406bd5b8c1d3b11c6
Reviewed-on: http://gerrit.openafs.org/3061

15 years agoLINUX: Build fixes for older kernels
Andrew Deason [Thu, 7 Oct 2010 16:04:04 +0000 (11:04 -0500)]
LINUX: Build fixes for older kernels

Error and warning fixes for older kernels in osi_compat.h:

 - In afs_posix_test_lock, remove the assignment in the conditional to
   silence a warning

 - Call getsockopt for kernel_getsockopt, instead of setsockopt

 - Missing end brace in afs_try_to_freeze

 - Prototype find_exported_dentry, since Linux doesn't give us one

Reviewed-on: http://gerrit.openafs.org/2946
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e279ae77a7e9babcace78b67c40ccc959161d77a)
Change-Id: If61e12ea02d90980f2ec4b9503a26aff841161f6
Reviewed-on: http://gerrit.openafs.org/3060

15 years agorx: Don't call gettimeofday for every packet ack
Simon Wilkinson [Tue, 5 Oct 2010 20:21:38 +0000 (21:21 +0100)]
rx: Don't call gettimeofday for every packet ack

Every time we receive an ACK packet, we call gettimeofday() for
every entry in the transmit queue that's permanently ack'd by that
packet. Instead, just make a note of the time when we start
processing the packet queue, and use it for every packet in the
queue.

This shaves around 5% off rxperf's runtime with a window size of 128.

Reviewed-on: http://gerrit.openafs.org/2956
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 e16d7b7d6a6980fbda3186a578fb7e26fc334194)
Change-Id: Ib77ea09f2b2334ccae269a5e24519cd8b0f0875a
Reviewed-on: http://gerrit.openafs.org/3059
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoFix rxperf includes
Simon Wilkinson [Mon, 11 Oct 2010 19:15:04 +0000 (15:15 -0400)]
Fix rxperf includes

Don't use raw includes for "rx.h" and friends - instead include them
from the appropriate place in our include tree.

Reviewed-on: http://gerrit.openafs.org/2962
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e95c8eaaf53dee68fe4db14acc0385a6bb84b992)
Change-Id: Ieb534d407635e79d181156f7fa6c70b6b8477e93
Reviewed-on: http://gerrit.openafs.org/3058
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Do not issue RXAFS change RPCs on known RO volumes
Jeffrey Altman [Sat, 9 Oct 2010 07:06:07 +0000 (03:06 -0400)]
Windows: Do not issue RXAFS change RPCs on known RO volumes

If the cm_scache_t is known to be on a RO volume, do not permit
RXAFS_xxx RPCs that would attempt to make a change to the volume
to be issued to the file server.  Instead, return CM_ERROR_READONLY
immediately.   This avoids triggering the abort threshold for
the current connection on the file server.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 7f742f45a2aaa9dcb400aa1dc35ce617876fe7fd)
Change-Id: I7e58f35956be8f1acd4ebfbd407ddde6b8bcb136
Reviewed-on: http://gerrit.openafs.org/3057
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoExtract the .version file when building the srpm file
Phillip Moore [Thu, 7 Oct 2010 23:25:09 +0000 (19:25 -0400)]
Extract the .version file when building the srpm file

If you are building the source and binary rpms from a released
tarball, instead of a real git repo, the .version file is required by
build-tools/git-version.  With out this, the version defaults to
UNKNOWN, and although the source rpm will build, it won't compile.

Reviewed-on: http://gerrit.openafs.org/2948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a2888f6d405150933bc31d1470ca2426bdf77c50)
Change-Id: I2443cced5105a0e31ffe04c156370b75e06ced97
Reviewed-on: http://gerrit.openafs.org/3056
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRevert "FBSD: in lookup, when ISDOTDOT, unlock dvp"
Ben Kaduk [Fri, 8 Oct 2010 04:20:57 +0000 (00:20 -0400)]
Revert "FBSD: in lookup, when ISDOTDOT, unlock dvp"

This reverts commit 96e433aebdd5699f02c205df2cce38927cd19a88.

It was not properly tested, fails to compile on some systems,
and destabilizes the client.

Reviewed-on: http://gerrit.openafs.org/2951
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 50b99f85cae778ab270590d1282fd9d84a0e6ca3)
Change-Id: Ifde4220ea5f2f987b8e6f1fd3e4ba3ee93e31c8c
Reviewed-on: http://gerrit.openafs.org/3055

15 years agoAdded missing CLI argument dropped during last commit.
Phillip Moore [Tue, 5 Oct 2010 20:10:19 +0000 (16:10 -0400)]
Added missing CLI argument dropped during last commit.

Oops -- when removing the -cell arguments to the bos commands, the
"admin" username argument to "bos adduser" was mistakenly removed as
well.

Reviewed-on: http://gerrit.openafs.org/2940
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1a0239fba5855c5fed418f057bd5397d412e907)
Change-Id: Ib28e6f6ce9cced9d44cfccbb02c10289acd818e1
Reviewed-on: http://gerrit.openafs.org/3054

15 years agoFBSD: in lookup, when ISDOTDOT, unlock dvp
Ben Kaduk [Wed, 6 Oct 2010 03:30:35 +0000 (23:30 -0400)]
FBSD: in lookup, when ISDOTDOT, unlock dvp

Keeping dvp locked when vp is its parent can lead to deadlock.
Always unlock dvp, not just for 6 and earlier.

Reviewed-on: http://gerrit.openafs.org/2942
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c2ed2577f9c16df3088158fb593d7aab6e8690d0)
Change-Id: I4479a8941b8c53aed1949134e171133d338919bb
Reviewed-on: http://gerrit.openafs.org/3053

15 years agoWindows: do not leak cm_volume_t objects from LRU queue
Jeffrey Altman [Tue, 5 Oct 2010 15:32:05 +0000 (11:32 -0400)]
Windows: do not leak cm_volume_t objects from LRU queue

The LRU queue is where volume objects are recycled from.
Therefore if they are removed then they must be put back.

Remove extraneous operations from cm_AdjustVolumeLRU().

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 77456c07945659ff1254732aa8e428e6301e5ee6)
Change-Id: I0de6b6cfe1598ae09471b25a506f34bfe577c2a7
Reviewed-on: http://gerrit.openafs.org/3052
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Reduce dependence on call->lock
Simon Wilkinson [Sat, 2 Oct 2010 03:17:56 +0000 (23:17 -0400)]
rx: Reduce dependence on call->lock

This patch reduces our dependence on call->lock, by allowing more
of the reader thread to run lock free.  Doing so requires that
call->mode only be set by the reader thread.  As a result, call->mode
can only be set to RX_CALL_ERROR by rxi_CallError().  The mode is
set to RX_CALL_ERROR by the reader thread immediately after regaining
the call->lock when it has been dropped.

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

15 years agoQuick Start Guide updated for RHEL rpms, and CLI syntax
Phillip Moore [Tue, 5 Oct 2010 16:46:35 +0000 (12:46 -0400)]
Quick Start Guide updated for RHEL rpms, and CLI syntax

The names of the RHEL rpms have been updated to reflect what is
actually published on openafs.org, and the CLI syntax of the commands
run using -noauth have had the unnecessary -cell options removed.

Reviewed-on: http://gerrit.openafs.org/2914
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 51c761706a9945ab40d34b4212bd463fa617636e)
Change-Id: I164fd4a1c4456ce6e8f7e90402d204cc1d2f84f3
Reviewed-on: http://gerrit.openafs.org/3051
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovolserver: Do not return ENOMEM on AIX from XVolListPartitions
Christof Hanke [Tue, 5 Oct 2010 15:01:41 +0000 (17:01 +0200)]
volserver: Do not return ENOMEM on AIX from XVolListPartitions

When calling "vos partinfo" or "vos listpart" towards a server
 running AIX with no partitions attached, it would return a
ENOMEM, because unlike on linux, malloc(0) returns NULL on AIX.
Thus, just don't do any malloc, when we have no partitions anyway.

Reviewed-on: http://gerrit.openafs.org/2912
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 21e1bb9bb46b0e8e2523c3310ea8e602d2b07091)
Change-Id: I88181baf4b4b5d0078593ffb27dedfd3f761db57
Reviewed-on: http://gerrit.openafs.org/3050

15 years agoWindows: Kill AFS_LARGEFILES preprocessor symbol
Jeffrey Altman [Tue, 5 Oct 2010 12:31:22 +0000 (08:31 -0400)]
Windows: Kill AFS_LARGEFILES preprocessor symbol

All builds define AFS_LARGEFILES so kill the symbol and
discard the !AFS_LARGEFILES source code.

Reviewed-on: http://gerrit.openafs.org/2910
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit d73bd5778a22f574a6f065a18f18d4379e9ffb4a)
Change-Id: I34e4a08472573f8ad103df6c556e90838b68117b
Reviewed-on: http://gerrit.openafs.org/3048
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agovol: Log ignored dirs that look like partitions
Andrew Deason [Sun, 3 Oct 2010 23:27:19 +0000 (18:27 -0500)]
vol: Log ignored dirs that look like partitions

If we see a /vicep*-like directory when we VAttachPartitions, and we
ignore it because it lacks an AlwaysAttach, log that we ignored it.
This may make things less confusing to admins that just try to create
a /vicep* directory and don't know why it doesn't work.

Feature suggested by Jason Edgecombe.

FIXES 128221

Reviewed-on: http://gerrit.openafs.org/2893
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 4803d50bdb8cdeae2c3f86b5c09e853573bc49eb)
Change-Id: I5d26d0b0edbd5eb11345c4be937d7ff986f46855
Reviewed-on: http://gerrit.openafs.org/3047
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovos release: Force full dump on RO_DONTUSE sites
Andrew Deason [Fri, 10 Sep 2010 20:52:34 +0000 (15:52 -0500)]
vos release: Force full dump on RO_DONTUSE sites

When releasing a volume, currently we perform an incremental dump on
RO_DONTUSE sites if the volume exists on the remote site. Since
RO_DONTUSE implies that we do not expect a site to exist there, delete
the extant volume if we find one and force a full dump.

If we perform an incremental dump, we run the risk of incrementally
dumping to a temporary volume that the administrator is not aware of,
and doesn't have any actual data but has a last update time late
enough that it may be missing some data after the incremental dump. So
to avoid that, force a full dump every time.

Reviewed-on: http://gerrit.openafs.org/2731
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 9fed169b1c5c823fd96cea94daf712b2cf06c901)
Change-Id: I2bb301084fa3d2433cd5bf5f8bfde3b1726f2fae
Reviewed-on: http://gerrit.openafs.org/3046
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agosin_family is not network order
Chas Williams (CONTRACTOR) [Sun, 3 Oct 2010 18:35:46 +0000 (14:35 -0400)]
sin_family is not network order

sin_family isnt sent over the network and therefore doesnt need
htons().  sin_family is essential the same as domain, and no one
does socket(htons(AF_INET), ...)

Reviewed-on: http://gerrit.openafs.org/2891
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 60c4b248893f80431b2ea2a5d558c3536f86611a)
Change-Id: If507801c8df170a88044ff9c87b9a97c076ca222
Reviewed-on: http://gerrit.openafs.org/3045

15 years agoWindows: Ensure that cm_NameI errors are acted upon promptly
Jeffrey Altman [Wed, 15 Sep 2010 23:06:22 +0000 (01:06 +0200)]
Windows: Ensure that cm_NameI errors are acted upon promptly

There are many cases in the SMB server where an error from cm_NameI()
was either ignored or not acted upon until several other operations
are performed that could result in the same error being repeated.
This is a mistake which did not have negative side effects until
additional checks for callback status were added recently.

At present, if a CM_ERROR_ACCESS error is returned and ignored,
subsequent attempts to operate on the same cm_scache_t will result
in additional queries to the file server that will also end in an
abort response.  This can trigger the file server to delay responses
to the client.

This patchset ensures that all cm_NameI() errors are acted upon
promptly.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2887
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 565ab7aa8e751c06d03c3ab0034915572c29ef7c)
Change-Id: Ie690178b7709851d1c7f75d6cb0353cddf1866ff
Reviewed-on: http://gerrit.openafs.org/3044
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Fix Parent(path) computation to permit mp and symlink creation
Jeffrey Altman [Wed, 15 Sep 2010 23:01:06 +0000 (01:01 +0200)]
Windows: Fix Parent(path) computation to permit mp and symlink creation

The parent path computation was leaving trailing slashes on the
path names which prevented the creation of mount points and symlinks
when UNC paths were used that contained mount points.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2886
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 6ad0e5b529dbfd7a2401a0622eb4ea5269124ceb)
Change-Id: I55e67817c019dceab045973171bd53db468dfc2c
Reviewed-on: http://gerrit.openafs.org/3043
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: raise rx_minPeerTimeout to 20ms
Jeffrey Altman [Sat, 2 Oct 2010 03:47:11 +0000 (23:47 -0400)]
Rx: raise rx_minPeerTimeout to 20ms

At 2ms it is possible for the packet we are sending to be resent
just about immediately as the retryTime computation occurs before
the send takes place and not afterwards.  If the network send blocks,
the retryTime may have already expired.

We do not want rx_minPeerTimeout to be too large though because the
value will end up being used as the backoff time period when the
actual RTT for the connection is less than the rx_minPeerTimeout
value.  Extensive testing shows 20ms to be an adequate compromise
that avoids the vast majority of unnecessary resends without
unnecessarily slowing down the connection if a packet is in fact
lost.

Reviewed-on: http://gerrit.openafs.org/2881
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b62cacf889a6a231a97951baad6594e4066880bd)
Change-Id: Ieb4d8126477f9c8b293b8690a2e7f206de7ea92d
Reviewed-on: http://gerrit.openafs.org/3042

15 years agoRx: When call receive is done, send ack all packet
Jeffrey Altman [Thu, 30 Sep 2010 14:48:58 +0000 (10:48 -0400)]
Rx: When call receive is done, send ack all packet

When all of the packets for a call have been received,
immediately send an ack all packet to the peer.  This permits
the peer to free the contents of the transmit queue and cancel
all pending resend events.

Reviewed-on: http://gerrit.openafs.org/2871
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 3cd3715e608b801b4848399e42cb47464e6e3cc3)
Change-Id: I782e92935a04ce10b410b67043ea41fee262c1d5
Reviewed-on: http://gerrit.openafs.org/3041

15 years agoadd option to rxperf to use rx_Readv() instead of rx_Read()
Chas Williams (CONTRACTOR) [Fri, 1 Oct 2010 13:40:16 +0000 (09:40 -0400)]
add option to rxperf to use rx_Readv() instead of rx_Read()

rx_Readv() is a bit "faster" than rx_Read() and typically used by most
afs transaction.

server% rxperf server
client% rxperf client -c send -s server
SEND: threads   1, times        100, bytes      1048576:            2073 msec

server% rxperf server -v
client% rxperf client -c send -s server
SEND: threads   1, times        100, bytes      1048576:             983 msec

Reviewed-on: http://gerrit.openafs.org/2877
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 12e6531f0079597280e1b3961738af55d682d3f5)
Change-Id: Ia54818dddd693dfe5b41e8459f55453dd1c8361f
Reviewed-on: http://gerrit.openafs.org/3040

15 years agoWindows: Pass Volume Root Fid to cm_Analyze after RXAFS_GetVolumeStatus
Jeffrey Altman [Sat, 2 Oct 2010 04:49:38 +0000 (00:49 -0400)]
Windows: Pass Volume Root Fid to cm_Analyze after RXAFS_GetVolumeStatus

RXAFS_GetVolumeStatus can return VNOVOL, VMOVED, etc.  In order to
process them and update volume state a fid must be passed to cm_Analyze().
Use the volume root fid.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2883
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 59e6ac8a5c354b746a4b984f4a10af91ebeef5f3)
Change-Id: I20a902e9e3074334764954faf297200e5dc60b80
Reviewed-on: http://gerrit.openafs.org/3133
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Negative Caching for Volume Lookups
Jeffrey Altman [Thu, 16 Sep 2010 12:23:41 +0000 (14:23 +0200)]
Windows: Negative Caching for Volume Lookups

If a volume lookup returns VL_NOENT or VL_BADNAME, cache the negative
response for five minutes.  This prevents volume lookup storms caused
by the same volume lookup being performed repeated during a short
time period.  This can happen if mount points to volumes that do not
exist are present in a directory that is being evaluated by Windows
Explorer or Common Control File Dialogs.

This functionality is implemented by storing the most recent update
time for the volume group as part of the cm_volume_t.  A non-existing
volume group is identified with a new CM_VOLUMEFLAG_NOEXIST flag.
The presence of the lastUpdateTime value also permits volume location
information to expire at lastUpdateTime + lifetime instead of expiring
all volume information simultaneously each lifetime period.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2771
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 a00da7d2c9a66f1e5984ec2b3bd3efe10793e1c9)
Change-Id: I3603e746a6df1834612647931cc09228428842db
Reviewed-on: http://gerrit.openafs.org/3132
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoexempt instant timeouts from mtu discovery
Derrick Brashear [Fri, 1 Oct 2010 03:57:11 +0000 (23:57 -0400)]
exempt instant timeouts from mtu discovery

if we set lastReceiveTime to 0 to hint that no net, honor that here as
"just time out"

Reviewed-on: http://gerrit.openafs.org/2875
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 0ecc90f3cd3f5a7c96b3689ab0c5f6a42edc3ed0)
Change-Id: Ic85f7ea234a50935c5fad9804d459b6198902e4c
Reviewed-on: http://gerrit.openafs.org/3038
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoDAFS: Raise LogLevel for per-chain vol stats
Andrew Deason [Tue, 14 Sep 2010 14:45:10 +0000 (10:45 -0400)]
DAFS: Raise LogLevel for per-chain vol stats

Only report detailed per-chain volume statistics on shutdown/SIGXCPU
if LogLevel is 125 (or 25 for smaller per-chain stats). If a
fileserver is configured with a large -vhashsize, printing out stats
for each chain can take awhile and use up a nontrivial amount of disk
space for logging, so only print out these stats if we're asked for
them.

Reviewed-on: http://gerrit.openafs.org/2759
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e04f17704a4ceb242ea0b01abd225f89fa0979e7)
Change-Id: I86499a2d73dbcdf04445e9f4976ef81e8f2d24ab
Reviewed-on: http://gerrit.openafs.org/3037
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoconfigure: --with-linux-kernel-packaging should default to disabled
Chas Williams (CONTRACTOR) [Wed, 29 Sep 2010 22:21:25 +0000 (18:21 -0400)]
configure: --with-linux-kernel-packaging should default to disabled

the test for this build feature is reversed.  by default, the value for
with_linux_kernel_packaging will not be defined which makes the existing
test pick MPS='SP' instead of LINUX_WHICH_MODULES.  based on the configure
help messages, this would appear to be an opt-in not an opt-out.

...
Optional Packages:
...
  --with-linux-kernel-packaging
                          use standard naming conventions to aid Linux kernel
                          build packaging (disables MPS, sets the kernel
                          module name to openafs.ko, and installs kernel
                          modules into the standard Linux location)
...

Reviewed-on: http://gerrit.openafs.org/2869
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 87e96c30e069a2379365c9947a311e700cf51c4d)
Change-Id: Id46afcb341104795c8e206261a2b1dfac289f37b
Reviewed-on: http://gerrit.openafs.org/2938
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoafsd's -mem_alloc_sleep is obselete -- update documentation
Chas Williams (CONTRACTOR) [Thu, 30 Sep 2010 18:27:35 +0000 (14:27 -0400)]
afsd's -mem_alloc_sleep is obselete -- update documentation
to reflect this.

Reviewed-on: http://gerrit.openafs.org/2874
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2bcd9044f747315cc1ea00b8c63982307edcc6c7)
Change-Id: If1b79a5659be16bdf056ae89af284eb47e82c4c7
Reviewed-on: http://gerrit.openafs.org/2937

15 years agoDAFS: document the limits of -vhashsize
Andrew Deason [Thu, 2 Sep 2010 18:11:32 +0000 (13:11 -0500)]
DAFS: document the limits of -vhashsize

You can only specify a -vhashsize between 6 and 28 (inclusive).
Document that in the dafileserver man page.

Reviewed-on: http://gerrit.openafs.org/2650
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7e12632cd2c8e07baa5e6c8aecd5311870771133)
Change-Id: Ibe7da6f9916c1664050c28d136fe887b35a540ba
Reviewed-on: http://gerrit.openafs.org/2936

15 years agolinux define ucontext properly
Derrick Brashear [Wed, 29 Sep 2010 18:15:24 +0000 (14:15 -0400)]
linux define ucontext properly

ucontext requires glibc version info to engage.
glibc info comes from features.h, which if we include afs_sysnames.h,
we get... so, let's swap these.

Reviewed-on: http://gerrit.openafs.org/2868
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 364691145698c8f9b87466cd9d9e2c54f8c6aaa9)
Change-Id: Id9b143811a988095cda9d8f09b67732e3d18156b
Reviewed-on: http://gerrit.openafs.org/2935

15 years agoWindows: Set NTDDI_VERSION when setting _WIN32_WINNT
Asanka Herath [Mon, 30 Aug 2010 19:36:50 +0000 (15:36 -0400)]
Windows: Set NTDDI_VERSION when setting _WIN32_WINNT

Reviewed-on: http://gerrit.openafs.org/2866
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e9fafac6cba6e024f08e8743d60b7853a2940ba2)
Change-Id: I04ff519adef8f9050d29d3236a28a979bd6f734b
Reviewed-on: http://gerrit.openafs.org/2934
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRX: Tidy reader data locking
Simon Wilkinson [Sun, 26 Sep 2010 14:48:54 +0000 (15:48 +0100)]
RX: Tidy reader data locking

Data which is accessed only by the reader thread doesn't need to be
protected by call->lock

Remove the call->lock protection where it isn't required, which makes
certain read/write calls lock free.

Stop rx_ResetCall from manipulating reader thread data. This data will
be zero'd and cleared when the reader thread calls rx_EndCall, and
doesn't need to be reset by the Listener thread.

The change which made rx_ResetCall reset reader thread information
was originally part of 559ea99b. It caused race conditions that were
fixed by adding additional lock protection in d0cc6e, 4dadd2 and
423ab97e. This commit reverts portions of all of those changes. It
is safe to not clear the iovc in ResetCall because any NewCall must
be balanced by a corresponding EndCall in the reader thread, and
EndCall does the appropriate freeing of reader elements.

Reviewed-on: http://gerrit.openafs.org/2856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit cbaef553978b7d81ba6d7b7721bcea97fe41870a)
Change-Id: I64b315fdc2f6b33b2fe9690060c2f0cca0cc2ae6
Reviewed-on: http://gerrit.openafs.org/2933
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoMore FBSD syscall tweaking
Ben Kaduk [Wed, 29 Sep 2010 00:03:25 +0000 (20:03 -0400)]
More FBSD syscall tweaking

We're now properly registered in syscalls.master for HEAD
(i.e. proto-9.0) and RELENG_8 (proto-8.2), which means that
afs3_syscall is prototyped in sys/sysproto.h .  Accordingly,
don't declare it in afs_prototypes.h for those cases.

Also add FBSD82_ENV checks for the new syscall-registration code,
and cast afs3_syscall to sy_call_t* for the sysent structure.

Reviewed-on: http://gerrit.openafs.org/2864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 791b7a4c660ef468286eb6f51e66b4faa4bb6c7b)
Change-Id: I6c58f2f08dafa5a0db98febde8f2fcb6781225e1
Reviewed-on: http://gerrit.openafs.org/2932
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Limit window size to max acks
Simon Wilkinson [Mon, 27 Sep 2010 22:50:23 +0000 (23:50 +0100)]
rx: Limit window size to max acks

The RX ack packet can only acknowledge 255 packets at once. In the
current implementation, this limits our maximum window size to 255,
as we can't acknowledge any packets we receive outside of that window
size.

Reviewed-on: http://gerrit.openafs.org/2857
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 50920c0384189a6c635ca58c38bf7c942c0446b2)
Change-Id: I523afdacfc2a50239219d6d39cbea58ca22fee2e
Reviewed-on: http://gerrit.openafs.org/2931
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovolser: Set but not used variables
Marc Dionne [Sat, 11 Sep 2010 15:11:18 +0000 (11:11 -0400)]
volser: Set but not used variables

Fix instances of variables defined and set but never used in the
volser directory.

Spotted by gcc 4.6

Reviewed-on: http://gerrit.openafs.org/2852
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0cac17105b632f495a8000a06a721e0bb163e2f4)
Change-Id: I7aa9b2673359f374ecf4cf4c63eaa9ad9ed20171
Reviewed-on: http://gerrit.openafs.org/2930

15 years agopam test should return an int in main
Derrick Brashear [Sun, 26 Sep 2010 11:28:46 +0000 (07:28 -0400)]
pam test should return an int in main

change things so we conform with the usual prototype for main()

Reviewed-on: http://gerrit.openafs.org/2850
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9d790e18fadc318305b58809c0715c4e07c82b85)
Change-Id: Ibfd1dd69024c00c08308d69315c6cf971a6e0932
Reviewed-on: http://gerrit.openafs.org/2929

15 years agoviced, tviced: Set but not used variables
Marc Dionne [Sat, 11 Sep 2010 00:40:56 +0000 (20:40 -0400)]
viced, tviced: Set but not used variables

Remove or ifdef out some variables that are set but never used.

Spotted by gcc 4.6

Reviewed-on: http://gerrit.openafs.org/2853
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 a2de10a1705a88ef652f4489383801a15c938a12)
Change-Id: Ic9186fd94a00445097af96e67eaeac1cc4b16915
Reviewed-on: http://gerrit.openafs.org/2928
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agotubik: minor Makefile cleanups
Marc Dionne [Sat, 25 Sep 2010 19:28:37 +0000 (15:28 -0400)]
tubik: minor Makefile cleanups

Rework the install targets for udebug to avoid warnings in the case
where afssrvbindir = bindir

Remove commented out compile line for udebug

Reviewed-on: http://gerrit.openafs.org/2851
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 e6c9cf2466e849753db99b48b0da26665ef0a0e3)
Change-Id: Iab023770f7d28f2e8b205ae5572d12e2c14dd742
Reviewed-on: http://gerrit.openafs.org/2927
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorxperf: Really set UDP buffer size
Simon Wilkinson [Mon, 27 Sep 2010 10:47:51 +0000 (11:47 +0100)]
rxperf: Really set UDP buffer size

On Unix, the UDP buffer size has to be set before we open any sockets.
Otherwise, the default (64k) buffer size is used and never changed.

Move the calls to SetUdpBufSize in rxperf.c so that the -u command
line option actually has an effect.

Reviewed-on: http://gerrit.openafs.org/2855
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e23f3ae22f11433713860b37b89a94b12fd70e8d)
Change-Id: I11dbe7bef29cb1ef105f831b5909f9a611385efb
Reviewed-on: http://gerrit.openafs.org/2926
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoFix rxperf so that it works with pthreads
Simon Wilkinson [Sun, 26 Sep 2010 14:20:22 +0000 (15:20 +0100)]
Fix rxperf so that it works with pthreads

*) Don't allocate 512K on the stack
*) Don't pass stack allocated data into pthread_create()

Reviewed-on: http://gerrit.openafs.org/2854
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 8c0498699366f7e40253d00604da3d9043b32851)
Change-Id: Iadf2c5512e50aa3f10ee583dddfe5d580e0542bf
Reviewed-on: http://gerrit.openafs.org/2925
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoUpdate Debian packaging to 1.5.77-2 release
Russ Allbery [Sat, 25 Sep 2010 23:42:57 +0000 (16:42 -0700)]
Update Debian packaging to 1.5.77-2 release

Contains DKMS robustness fixes, improvements to the defaults for the
module build, and cleanup of the openafs-client init script.  Updates
the build system for the new demand-attach binary naming and for the
changes to supported configure options.  Fixes some issues with
afs-newcell.  Forces disabling of the Linux syscall probing in kernel
module builds, since no supported Debian kernel allows this and it
causes problems.  Update debhelper to V8, which allows simplification
of debian/rules and debian/module/rules.

Reviewed-on: http://gerrit.openafs.org/2849
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d272f05059a4b467ee41a2a0d8781e9f9c4c250)
Change-Id: Ic0468c79db043651889b2a9b2e18b0246acf7c71
Reviewed-on: http://gerrit.openafs.org/2924

15 years agoscout: display fetch and store counts as unsigned
Michael Meffie [Thu, 23 Sep 2010 14:15:57 +0000 (10:15 -0400)]
scout: display fetch and store counts as unsigned

Fetches and stores are already defined as unsigned, so format
them as unsigned values when displaying in scout. This fixes
the bug where scout shows those counts as negative values on
busy servers which have been running for a while.

Reviewed-on: http://gerrit.openafs.org/2843
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e28bb036b85ea90c0ecf8d52a17043374c1fef3a)
Change-Id: If4d0a72b94e743dd336f31b4c21da7e68f800f11
Reviewed-on: http://gerrit.openafs.org/2923
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Big windows make us sad
Simon Wilkinson [Thu, 23 Sep 2010 16:41:47 +0000 (17:41 +0100)]
rx: Big windows make us sad

The commit which took our Window size to 128 caused rxperf to run
40 times slower than before. All of the recent rx improvements have
reduced this to being around 2x slower than before, but we're still
not ready for large window sizes.

As 1.6 is nearing release, reset back to the old, fast, window size
of 32. We can revist this as further performance improvements and
restructuring happen on master.

Reviewed-on: http://gerrit.openafs.org/2844
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit a99e616d445d8b713934194ded2e23fe20777f9a)
Change-Id: I6080c69ba51c8743b8c48bf0e0b7dd481185688d
Reviewed-on: http://gerrit.openafs.org/2922
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agolibafsrpc depends on rxstat and fsint
Simon Wilkinson [Thu, 23 Sep 2010 14:01:58 +0000 (15:01 +0100)]
libafsrpc depends on rxstat and fsint

... in the same way as shlibafsrpc

Reviewed-on: http://gerrit.openafs.org/2842
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4884de5bc8b5a984eeb5927685308874296e88b8)
Change-Id: Iad2820d94c42c4f43fa22803680bfd56221fa97b
Reviewed-on: http://gerrit.openafs.org/2921
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorxperf: Add build rules to build a pthreaded version
Simon Wilkinson [Thu, 23 Sep 2010 09:42:25 +0000 (10:42 +0100)]
rxperf: Add build rules to build a pthreaded version

The pthreaded version of rxperf is much more interesting than the
LWP one now, so add some rules so that Unix can play with it too.

Reviewed-on: http://gerrit.openafs.org/2841
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c21c90515ac37862a6002441790a721489fa89a8)
Change-Id: Ie8c26191e6d7603dcd6a99ef9938efb33dea1e33
Reviewed-on: http://gerrit.openafs.org/2920

15 years agorxperf: Fix the Unix build again
Simon Wilkinson [Thu, 23 Sep 2010 09:40:02 +0000 (10:40 +0100)]
rxperf: Fix the Unix build again

Fix the Unix build of rxperf again

Reviewed-on: http://gerrit.openafs.org/2840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c87377834701195fe98d75ad34324bc1748e13a0)
Change-Id: I50f7a69e1f88ca814d7d9b508464cb49da6231f7
Reviewed-on: http://gerrit.openafs.org/2919

15 years agotests: Fix objdir builds
Simon Wilkinson [Fri, 17 Sep 2010 21:03:20 +0000 (22:03 +0100)]
tests: Fix objdir builds

Fix the tests so that they work when we have a separate build
directory.

Reviewed-on: http://gerrit.openafs.org/2828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 259cca4050102e98ade929cc648a69d9f57c07fa)
Change-Id: I5ba19639a8146af23a377bbfd2bfe0cf0911c0ea
Reviewed-on: http://gerrit.openafs.org/2918

15 years agoAdditional functionality for rxperf
Jeffrey Altman [Wed, 22 Sep 2010 23:28:48 +0000 (16:28 -0700)]
Additional functionality for rxperf

Add the ability to initiate multiple pthread threads issuing
calls on the same connection to the server.

Add ability to set max window size.

Add ability to adjust min peer timeout.

Reviewed-on: http://gerrit.openafs.org/2835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9a6dca070733dd5065c37cd044a3d2ded2268b14)
Change-Id: Ifeb786f3f7bf2433ff6f5729773a7e4794511cd6
Reviewed-on: http://gerrit.openafs.org/2917

15 years agorxperf: Fix so it builds on Unix
Simon Wilkinson [Wed, 22 Sep 2010 18:50:47 +0000 (19:50 +0100)]
rxperf: Fix so it builds on Unix

Fix assorted errors in the rxperf utility so that it will build
on Unix.

Reviewed-on: http://gerrit.openafs.org/2834
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit a10f644fd21482559039f79e4a14fd39a83f6f9b)
(cherry picked from commit a421dbb79a96e6ac4ca004c6b65ace313c340c3f)
Change-Id: I80532b781fe758112718ab8d5b268e4005d4376d
Reviewed-on: http://gerrit.openafs.org/2916
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorxkad: Make the test suite build again
Simon Wilkinson [Wed, 22 Sep 2010 16:33:26 +0000 (17:33 +0100)]
rxkad: Make the test suite build again

Make the rxkad stress test suite build again.

Reviewed-on: http://gerrit.openafs.org/2832
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d17adc30027d795068504dc736dac849ed42a884)
Change-Id: I388a7bf87f402cee02695aab4c8d309589995648
Reviewed-on: http://gerrit.openafs.org/2915

15 years agoRx: Permit MakeDebugCall() be be compiled when RXDEBUG is undefined
Jeffrey Altman [Mon, 20 Sep 2010 17:02:18 +0000 (10:02 -0700)]
Rx: Permit MakeDebugCall() be be compiled when RXDEBUG is undefined

If MAKEDEBUGCALL is defined, build MakeDebugCall() even if RXDEBUG
is not defined.

Change-Id: I98d3216e8bf1e1f3b6b62c962d33db316d0f51ac
Reviewed-on: http://gerrit.openafs.org/2818
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ed25a920232cb659c2997c91c5bc92a659ff163a)
Reviewed-on: http://gerrit.openafs.org/2823
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Change minimum peer timeout to 2ms
Jeffrey Altman [Mon, 20 Sep 2010 12:07:08 +0000 (05:07 -0700)]
Rx: Change minimum peer timeout to 2ms

The previous value, 350ms, is historical.  Now that networks are
so much faster, an artificially high timeout value when backed off
results in an extremely long delay before communication can resume.

Change-Id: I6207fb3e5c26a36704abc1f9210af53e0ff1fae6
Reviewed-on: http://gerrit.openafs.org/2815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c77f2f1369fead87acb440134213ebf6d23f8fd7)
Reviewed-on: http://gerrit.openafs.org/2824
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Do not hold call lock across memcpy in rx_ReadProc/rx_WriteProc
Jeffrey Altman [Mon, 20 Sep 2010 12:11:20 +0000 (05:11 -0700)]
Rx: Do not hold call lock across memcpy in rx_ReadProc/rx_WriteProc

1.4.x does not hold the call lock across memcpy operations in
rx_ReadProc, rx_ReadProc32, rx_WriteProc, rx_WriteProc32.  The
claim is that the call curpos, curlen, and nLeft fields which
refer to the current packet being processed will not be touched
by any other thread.  Therefore it is safe to drop the call lock
to permit another thread to add packets to the call while the memcpy
is performed in parallel.

This patchset continues to hold the call lock longer than the
original implementation but does drop it for the length of time
it takes to copy data from the packet buffer to the application
buffer.

Change-Id: I87dacdf541ba50db80ab55e500b38edab5126dc2
Reviewed-on: http://gerrit.openafs.org/2817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e197c19cedaafa0d2bb59212fb171083f2140041)
Reviewed-on: http://gerrit.openafs.org/2822

15 years agoRx: Permit udp buffer size to be set in rxperf
Jeffrey Altman [Mon, 20 Sep 2010 12:10:22 +0000 (05:10 -0700)]
Rx: Permit udp buffer size to be set in rxperf

Change-Id: I4680e038e2965ca8bc13f76955b85e924435c6af
Reviewed-on: http://gerrit.openafs.org/2816
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7b9607639816b19fdf1b70b4c04ba984f9bf3613)
Reviewed-on: http://gerrit.openafs.org/2821

15 years agoWindows: Export additional RX debugging variables from afsrpc.dll
Jeffrey Altman [Sun, 19 Sep 2010 16:17:08 +0000 (09:17 -0700)]
Windows: Export additional RX debugging variables from afsrpc.dll

Export

   rxi_nRecvFrags                          @2008 DATA
   rxi_nSendFrags                          @2009 DATA
   rx_initReceiveWindow                    @2010 DATA
   rx_initSendWindow                       @2011 DATA
   rx_intentionallyDroppedPacketsPer100    @2012 DATA
   rx_intentionallyDroppedOnReadPer100     @2013 DATA

so they can be referenced from pthreaded builds of src/rx/test tools.
Exported variables must be present in both FREE and CHECKED builds.

Change-Id: Ia7f3ee0143679bab1ce74f71dc3a996cda1f18a8
Reviewed-on: http://gerrit.openafs.org/2779
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7ee80a853cebc472d9d9664dbfcccadd1d49d5fc)
Reviewed-on: http://gerrit.openafs.org/2814

15 years agoRx: PrintTheseStats should not be dependent on RXDEBUG
Jeffrey Altman [Sun, 19 Sep 2010 16:14:06 +0000 (09:14 -0700)]
Rx: PrintTheseStats should not be dependent on RXDEBUG

When RXDEBUG is not defined, PrintTheseStats generates an error
even though the statistics are in fact available.  The global
variable rx_packetTypes was not being defined without RXDEBUG.

Make rx_packetTypes defined always and permit statistics to
always be printed.

Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1
Reviewed-on: http://gerrit.openafs.org/2778
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1183f16285be040b7150414c9563a9bceb53210)
Reviewed-on: http://gerrit.openafs.org/2813
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>