7780 Commits

Author SHA1 Message Date
Andrew Deason
2dafa9b57b 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>
2010-10-25 14:46:18 -07:00
Chas Williams (CONTRACTOR)
e567a29f92 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
2010-10-25 14:45:36 -07:00
Jeffrey Altman
2b8a90ad21 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>
2010-10-25 14:45:02 -07:00
Jeffrey Altman
e496c0da54 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>
2010-10-25 14:44:45 -07:00
Jeffrey Altman
d906c07b14 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
2010-10-25 14:44:28 -07:00
Jeffrey Altman
7ca2bb0947 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
2010-10-25 14:43:27 -07:00
Chas Williams (CONTRACTOR)
2dd3b7a8ec 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
2010-10-25 14:38:40 -07:00
Jeffrey Altman
0991d6bed5 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>
2010-10-25 14:34:51 -07:00
Jeffrey Altman
47d79237b6 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>
2010-10-25 14:34:32 -07:00
Derrick Brashear
22cae170a5 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>
2010-10-25 11:03:22 -07:00
Andrew Deason
8d486ba36d 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>
2010-10-25 11:03:07 -07:00
Chas Williams (CONTRACTOR)
0372a9f65d 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>
2010-10-05 12:25:38 -07:00
Chas Williams (CONTRACTOR)
9eb31d7280 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
2010-10-05 12:25:16 -07:00
Andrew Deason
9823df261b 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
2010-10-05 12:24:42 -07:00
Derrick Brashear
2d4bb5a38f 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
2010-10-05 12:23:40 -07:00
Asanka Herath
a6b7c5c0b5 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>
2010-10-05 12:22:45 -07:00
Simon Wilkinson
89c018a72f 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>
2010-10-05 12:21:21 -07:00
Ben Kaduk
67dea45cea 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>
2010-10-05 12:20:31 -07:00
Simon Wilkinson
0054458d07 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>
2010-10-05 12:20:18 -07:00
Marc Dionne
c864ba58f4 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
2010-10-05 12:19:44 -07:00
Derrick Brashear
7243f91d1a 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
2010-10-05 12:18:55 -07:00
Marc Dionne
ce0a56e3ac 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>
2010-10-05 12:18:38 -07:00
Marc Dionne
20c58aa2d0 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>
2010-10-05 12:18:01 -07:00
Simon Wilkinson
fec331439f 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>
2010-10-05 12:17:45 -07:00
Simon Wilkinson
5b4e1b9618 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>
2010-10-05 12:17:24 -07:00
Russ Allbery
0813ec725e 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
2010-10-05 12:17:15 -07:00
Michael Meffie
59667ab5d2 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>
2010-10-05 12:16:33 -07:00
Simon Wilkinson
f74abfb4d0 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>
2010-10-05 11:56:47 -07:00
Simon Wilkinson
96ad6896b4 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>
2010-10-05 11:56:11 -07:00
Simon Wilkinson
588b00f771 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
2010-10-05 11:55:41 -07:00
Simon Wilkinson
8b9e96e0d1 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
2010-10-05 11:55:22 -07:00
Simon Wilkinson
3b1a9ce212 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
2010-10-05 11:54:54 -07:00
Jeffrey Altman
e67d4684ee 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
2010-10-05 11:54:26 -07:00
Simon Wilkinson
f7ceeac38b 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>
2010-10-05 11:53:56 -07:00
Simon Wilkinson
35293ae270 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
2010-10-05 11:52:58 -07:00
Jeffrey Altman
8815bf3992 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>
2010-10-05 07:23:13 -07:00
Jeffrey Altman
a6e4aac08f 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>
2010-09-27 08:32:40 -07:00
Jeffrey Altman
e57578c1d4 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
2010-09-27 08:32:12 -07:00
Jeffrey Altman
2373bef5cc 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
2010-09-27 08:32:03 -07:00
Jeffrey Altman
25a0b9f292 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
2010-09-27 08:31:41 -07:00
Jeffrey Altman
bd9f7b125f 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>
2010-09-27 08:31:31 -07:00
Jeffrey Altman
e7bd67e5bd 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>
2010-09-27 08:31:20 -07:00
Jeffrey Altman
36ce1b03e4 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
2010-09-27 08:31:10 -07:00
Jeffrey Altman
88168412f3 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
2010-09-27 08:31:02 -07:00
Jeffrey Altman
ffaf0a53ad 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>
2010-09-27 08:30:09 -07:00
Jeffrey Altman
e1f1286dc2 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
2010-09-27 08:29:48 -07:00
Jeffrey Altman
6a8e622bbe 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
2010-09-27 08:29:39 -07:00
Jeffrey Altman
ada57bb70e 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
2010-09-27 08:29:28 -07:00
Jeffrey Altman
16ab9e7192 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
2010-09-27 08:29:18 -07:00
Jeffrey Altman
d36d8cb425 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>
2010-09-27 08:29:08 -07:00