]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
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>
15 years agoRx: move TSFPQ prototypes from rx_globals.h to rx_protoypes.h
Jeffrey Altman [Sun, 19 Sep 2010 16:08:42 +0000 (09:08 -0700)]
Rx: move TSFPQ prototypes from rx_globals.h to rx_protoypes.h

Function prototypes belong in rx_prototypes.h not in rx_globals.h.

Remove EXT macro from function prototypes as functions do not
require special treatment in order to be exported by a DLL on Windows.

Change-Id: Ieb617db634f2cfa57410e77e276c703311304547
Reviewed-on: http://gerrit.openafs.org/2777
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 00afdbed0ff474aaf45a49b157843af9cb8483ad)
Reviewed-on: http://gerrit.openafs.org/2812
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
15 years agoRx: properly compute dataPacketsReSent statistic
Jeffrey Altman [Sun, 19 Sep 2010 16:03:39 +0000 (09:03 -0700)]
Rx: properly compute dataPacketsReSent statistic

The global dataPacketsReSent statistic should be the sum of all
peer->reSends and dataPacketsSent should not include the count of
resent packets.  Prior to this patchset, dataPacketsSent included
the resent packets and dataPacketsReSent was computed as the number
of requests for Ack instead of the number of packets resent.

Change-Id: I969003f7ec1805d09c14ac342453f86fdb5df99a
Reviewed-on: http://gerrit.openafs.org/2776
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8549ebe0a81ac9a526d13f96ba63e048d8b77aa7)
Reviewed-on: http://gerrit.openafs.org/2811

15 years agoRx: always use tservice variable in rxi_ServerProc
Jeffrey Altman [Sun, 19 Sep 2010 16:00:57 +0000 (09:00 -0700)]
Rx: always use tservice variable in rxi_ServerProc

Since tservice has been assigned to call->conn->service,
use it instead of call->conn->service when calling
executeRequestProc(call)

Change-Id: Id26c4c63f054bcd1e3ef5349900c910e3c9cf2be
Reviewed-on: http://gerrit.openafs.org/2775
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 72cadfd86a0efc0079639671d613005ff403ccc4)
Reviewed-on: http://gerrit.openafs.org/2810

15 years agoWindows: Release builds of Rx should be lean and mean
Jeffrey Altman [Sun, 19 Sep 2010 15:57:02 +0000 (08:57 -0700)]
Windows: Release builds of Rx should be lean and mean

Only build checked builds of Rx with
-DRXDEBUG -DRXDEBUG_PACKET -DRX_TRACK_PACKETS -DRX_REFCOUNT_CHECK

Change-Id: Ib4666d30b1e48eca172331353d9e376b2516f183
Reviewed-on: http://gerrit.openafs.org/2774
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e77c7be7537cbcbee77a297b5b52a6287462462f)
Reviewed-on: http://gerrit.openafs.org/2809
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: Only backoff the peer timeout once
Jeffrey Altman [Mon, 20 Sep 2010 02:48:57 +0000 (19:48 -0700)]
Rx: Only backoff the peer timeout once

If a packet is missing, the peer timeout is backed off to provide
a new starting point for timeout computation.  The backoff state
must be stored in the peer object to ensure that multiple failures
do not result in more than one backoff before a successfully received
packet is available for recomputation.

Change-Id: I6794b3a020801ff421e4ed776afb581962b111a9
Reviewed-on: http://gerrit.openafs.org/2787
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 3b4cad3b78ec5df7253067c70e19c066552d7145)
Reviewed-on: http://gerrit.openafs.org/2808

15 years agoRx: only compute peer bytes sent and received if rx_stats_active
Jeffrey Altman [Sun, 19 Sep 2010 16:47:37 +0000 (09:47 -0700)]
Rx: only compute peer bytes sent and received if rx_stats_active

Computing the bytes sent and received is an expensive operation.
If rx statistics collection has been disabled we should not collect
the peer data.  The most expensive operation is the rx_FindPeer()
call that is performed during rxi_ReadPacket().  rxi_ReadPacket()
is processed by the rx listener thread which must be as fast as
possible.

Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd
Reviewed-on: http://gerrit.openafs.org/2782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d16c8b84ac8cc0251231819bfb0eefc2040322a)
Reviewed-on: http://gerrit.openafs.org/2807

15 years agoRx: avoid lock churn in rxi_ReceiveAckPacket
Jeffrey Altman [Sun, 19 Sep 2010 16:35:03 +0000 (09:35 -0700)]
Rx: avoid lock churn in rxi_ReceiveAckPacket

rxi_ReceiveAckPacket can acquire and drop the conn_data_lock several
times and acquires and drops the peer_lock unnecessarily.  This patchset
adds a variable to track whether the conn_data_lock is held in order
to avoid the need to drop it and reacquire it based upon conditional
operations.  It also relocates the peer->maxPacketSize computations
in order to consolidate the work performed under the peer_lock.

Change-Id: I0bc9e42e8ef198a04315f9f2df529073ce9dfd03
Reviewed-on: http://gerrit.openafs.org/2781
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c59ce29602086f795d5fbaef6a5f88fae9dd2dea)
Reviewed-on: http://gerrit.openafs.org/2806

15 years agoRx: Build rxperf test application on Windows
Jeffrey Altman [Sun, 19 Sep 2010 15:28:21 +0000 (08:28 -0700)]
Rx: Build rxperf test application on Windows

rxperf made assumptions that it was built against LWP, used buffer
sizes for read/write that were too small, made use of non-portable
types, and set signal handlers that are unsupported.

Change-Id: I55515cac0f441116df7fd0aaf100fb3ae99b220f
Reviewed-on: http://gerrit.openafs.org/2773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 449976acd54ff46fd6cdb9a6e12acf3789665bcf)
Reviewed-on: http://gerrit.openafs.org/2805

15 years agoRx: Move rxperf test application to src/rx/tests
Jeffrey Altman [Sun, 19 Sep 2010 15:03:50 +0000 (08:03 -0700)]
Rx: Move rxperf test application to src/rx/tests

rxperf is a test application.  Move it to the tests directory

Change-Id: I946a8026760d860667ea5707d8a3e0d3b895d908
Reviewed-on: http://gerrit.openafs.org/2772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5c3a1ed88de16db4c2081bbf1a4e397ce459bcf3)
Reviewed-on: http://gerrit.openafs.org/2804
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: cleanup testclient and testserver test applications
Jeffrey Altman [Sun, 19 Sep 2010 16:20:01 +0000 (09:20 -0700)]
Rx: cleanup testclient and testserver test applications

Permit testclient and testserver to be built on Windows as
pthreaded applications.

Remove warnings.  Fix prototypes.  Remove variable declarations
for rx library variables defined in rx_globals.h.

Increase the buffer sizes.  Disable use of packet dropping when
the library is built without RXDEBUG.

Change-Id: Ic8483eb64cbed4958baf8fd054e01c7c40832599
Reviewed-on: http://gerrit.openafs.org/2780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7ded3209a2fbd8d0108f9322d708551e93b6ef76)
Reviewed-on: http://gerrit.openafs.org/2803
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: print after BUG() is pretty useless
Simon Wilkinson [Sun, 12 Sep 2010 11:07:59 +0000 (12:07 +0100)]
Linux: print after BUG() is pretty useless

Calling BUG() panics the machine, so having a print statement with
further debugging information after it doesn't help much.

Swap the ordering, so we at least see the message.

Change-Id: I3aa3b8ba5faaa40cef7bb046093b322212eea2b8
Reviewed-on: http://gerrit.openafs.org/2754
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ff100901e0da8d236c7ae8b4d478600146d8f182)
Reviewed-on: http://gerrit.openafs.org/2802

15 years agolibafs: Fix pioctl get/putInt alignment issues
Andrew Deason [Wed, 15 Sep 2010 16:19:33 +0000 (12:19 -0400)]
libafs: Fix pioctl get/putInt alignment issues

We don't know if the buffer for pioctl data is aligned to anything, so
we can't just dereference the given pointer as an int or anything
else. So, just memcpy the data in for ints and such; conveniently,
afs_pd_getBytes and afs_pd_putBytes can do this for us, so just use
that.

Change-Id: Id1abdae55308db6fe1e13f541a5d776daa6af934
Reviewed-on: http://gerrit.openafs.org/2763
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8fd83543b60aefb4b7c5a0116d1538a89f58bbb3)
Reviewed-on: http://gerrit.openafs.org/2801
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovlserver: Set but not used variables
Marc Dionne [Fri, 10 Sep 2010 23:55:39 +0000 (19:55 -0400)]
vlserver: Set but not used variables

Remove some variables that are set but never used in the vlserver
directory:
- n1,n2,n3 and n4 in vlclient.c appear to have never been used even
in the original IBM code
- some variables in vldb_check.c that are no longer used after some
recent changes

Spotted by gcc 4.6

Change-Id: Icd9e7da151b3a485c917ed5bd99eb26998dfa818
Reviewed-on: http://gerrit.openafs.org/2784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ee3538218d342bb74ab849763421b9ec075251b3)
Reviewed-on: http://gerrit.openafs.org/2800
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovolser: Delete timed-out temporary volumes
Andrew Deason [Tue, 14 Sep 2010 16:15:22 +0000 (12:15 -0400)]
volser: Delete timed-out temporary volumes

When a transaction times out on a volume, delete the volume if it is a
temporary volume (destroyMe is set). This prevents half-created
volumes from accumulating, which can take up space and screw up
certain vol ops in some versions.

Change-Id: I94e9adc767b84a2a32d980f508af33b823560950
Reviewed-on: http://gerrit.openafs.org/2760
Tested-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 bc56f5cc97a982ee29219e6f258b372dbfe1a020)
Reviewed-on: http://gerrit.openafs.org/2799

15 years agobutc: Set but unused variables
Marc Dionne [Sat, 11 Sep 2010 17:23:11 +0000 (13:23 -0400)]
butc: Set but unused variables

Remove unused variable taskId

writeData() systematically returns 0, so make it void and adapt
call sites that assigned the return value but never used it.
Also move the function up in the file to avoid the need for a
forward declaration, and make it static since it's only used here.

Spotted by gcc 4.6

Change-Id: I2f61c0395796498175f2cb9131066b00657f99a7
Reviewed-on: http://gerrit.openafs.org/2785
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1796b0f4ad0202ad32e06bb849f443984cf22b5)
Reviewed-on: http://gerrit.openafs.org/2798
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: normalize error return for emulated syscalls
Marc Dionne [Thu, 1 Jul 2010 15:38:20 +0000 (11:38 -0400)]
Linux: normalize error return for emulated syscalls

pagsh and other code expect setpag() and pioctl() to behave like
a regular syscall or pioctl, that is to return -1 on error, with
errno set to the specific error code.
On Linux, the underlying emulation does a straight return of any
error code it gets from the ioctl, and errors are not properly
caught by the callers.

As an example, pagsh won't detect an error from setpag such as
exceeding a keyring quota limit.  With this patch, the user
will see this:

$ pagsh
setpag: Disk quota exceeded
sh-4.1$

The code in proc_afs_syscall is modified to set errno to the error
code and to set errorcode to -1 in case of error.

proc_afs_sycall is reindented while we're changing code there.

FIXES 126230

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

15 years agodisable Rx packet tracking
Derrick Brashear [Wed, 15 Sep 2010 08:26:13 +0000 (04:26 -0400)]
disable Rx packet tracking

minimize the impact of Rx packet tracking. in particular, do no
extra queue scans, which means the rest of the state which tracks
where a packet is now isn't of use. make it possible to re-enable.

Change-Id: I5b9ed039a0394edcea48bb46729cd2ce2f71d4b9
Reviewed-on: http://gerrit.openafs.org/2762
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 4bbf0dae237e01127f4d1a4d913f00e8dad859a3)
Reviewed-on: http://gerrit.openafs.org/2796
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoAlways check return code from iod_Write
Marc Dionne [Sat, 11 Sep 2010 14:46:50 +0000 (10:46 -0400)]
Always check return code from iod_Write

The return code from iod_Write is checked at every call site
in the file, except this one.  Check it, and return VOLSERDUMPERROR
if appropriate.

Spotted by a set but unused warning from gcc 4.6

Change-Id: I84f38a4b3b1e37c25be9c76702b0d2818058454e
Reviewed-on: http://gerrit.openafs.org/2733
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 e0708617b8f5df625b6ad62920665e704f1374f7)
Reviewed-on: http://gerrit.openafs.org/2795

15 years agorx: Set but not used variables
Marc Dionne [Sat, 11 Sep 2010 18:57:17 +0000 (14:57 -0400)]
rx: Set but not used variables

Remove some unused variables in the rx code.
These generate warnings with gcc 4.6.

Change-Id: I1e19c82cd05bcd47a65d77079019f1f0b6704826
Reviewed-on: http://gerrit.openafs.org/2732
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 a8cf472fd1723fa0e5f4edc34e470443c941f017)
Reviewed-on: http://gerrit.openafs.org/2794

15 years agoIgnore *.dSYM files in working directory
Simon Wilkinson [Wed, 8 Sep 2010 07:24:55 +0000 (08:24 +0100)]
Ignore *.dSYM files in working directory

Failed Mac OS X debugging builds leave *.dSYM directories lying
around the tree, which just litter the contents of "git status".

So, ignore them.

Change-Id: Ic2b79f299d724b770bf83cb24f2aac7c4063efdb
Reviewed-on: http://gerrit.openafs.org/2744
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 290204c6e92d61c5b12b90d09e8202731caa0400)
Reviewed-on: http://gerrit.openafs.org/2793

15 years agoAdd config.log to gitignore globally
Simon Wilkinson [Wed, 8 Sep 2010 07:22:57 +0000 (08:22 +0100)]
Add config.log to gitignore globally

When you end up explicitly regenerating chosen Makefiles by
running ../../config.status Makefile, the working tree ends up littered
with config.log files.

Currently, we only ignore config.log in the top directory - extend this
so that it's ignored across the tree.

Change-Id: If3cfec82fbf78e97ee769b36315ba23dcfe8a950
Reviewed-on: http://gerrit.openafs.org/2743
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4a353545c3f0e91cc85d7feb379997a1eda9f6e3)
Reviewed-on: http://gerrit.openafs.org/2792

15 years agoRX: Make the sample client and server build
Simon Wilkinson [Wed, 1 Sep 2010 10:09:46 +0000 (11:09 +0100)]
RX: Make the sample client and server build

Make the RX sample client and server build again

Change-Id: I81ce12eadcb4150dd503e41f9a7fd1a850d31a11
Reviewed-on: http://gerrit.openafs.org/2737
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 71171262602d7f261adbffd5047266e94c4a6f92)
Reviewed-on: http://gerrit.openafs.org/2791

15 years agovlserver: Use com_err for Ubik error messages
Simon Wilkinson [Sat, 11 Sep 2010 07:25:15 +0000 (08:25 +0100)]
vlserver: Use com_err for Ubik error messages

Use com_err to return a sensible string, rather than just an error code,
for errors with Ubik initialisation.

This has the specific benefit that the error when the database directory
doesn't exist, or isn't readable, becomes

    Ubik init failed: file not found when processing dbase"
rather than
    Ubik init failed with code 5382

Change-Id: I5f770377668a7f545cad7e422f28afd7c9f9888d
Reviewed-on: http://gerrit.openafs.org/2735
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 6380213d296c138349c77fa4a51655fac23cfeea)
Reviewed-on: http://gerrit.openafs.org/2790