7753 Commits

Author SHA1 Message Date
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
Jeffrey Altman
430cefbeac 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>
2010-09-27 08:28:56 -07:00
Simon Wilkinson
ade14eedf3 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
2010-09-27 08:28:47 -07:00
Andrew Deason
1ac380b0d3 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>
2010-09-27 08:28:34 -07:00
Marc Dionne
cb978ebcb6 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>
2010-09-27 08:28:24 -07:00
Andrew Deason
3bbcfde65e 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
2010-09-27 08:28:13 -07:00
Marc Dionne
3313954731 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>
2010-09-27 08:28:01 -07:00
Marc Dionne
bfd269535f 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
2010-09-27 08:27:39 -07:00
Derrick Brashear
b83ceefb2d 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>
2010-09-27 08:27:20 -07:00
Marc Dionne
e18a8f6206 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
2010-09-27 08:27:09 -07:00
Marc Dionne
db86d1a976 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
2010-09-27 08:26:48 -07:00
Simon Wilkinson
0b80be05c2 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
2010-09-27 08:26:37 -07:00
Simon Wilkinson
02f39f7b16 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
2010-09-27 08:26:25 -07:00
Simon Wilkinson
3eb6260147 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
2010-09-27 08:26:14 -07:00
Simon Wilkinson
e106ac54b7 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
2010-09-27 08:26:03 -07:00
Marc Dionne
fb5c2b4c1f Warning fix for gcc 4.5 "operation may be undefined" warnings
The inc_header_word and set_header_word macros make repeated use of their
argument, which triggers many (~30) warnings with gcc 4.5, like this one:

./ptutils.c:473:6: warning: operation on ‘cheader.foreigncount’ may be undefined

Removing the cast to afs_int32 in the macros gets rid of the warning,
and should be safe since we're just getting a small positive integer value
- the offset of the member in the structure - and passing it to the
pr_Write function which expects an afs_int32.

Change-Id: Ie493520f874cddbb4b7f9f7ebe4b3922a848d0d0
Reviewed-on: http://gerrit.openafs.org/2729
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d69914a5f0580f8048072d3b734558ea5b7b2df5)
Reviewed-on: http://gerrit.openafs.org/2789
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-27 08:25:53 -07:00
Michael Meffie
a16b1119b8 manpage correction for restorevol -file option
The restorevol -file option specifies which file to read.

Change-Id: I5c03eaaf8bf82fc6d3fb83ff08e8278257e7b65f
Reviewed-on: http://gerrit.openafs.org/2728
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 92ff0028f2e6a2f24dd5369f9b31e9852bf92abc)
Reviewed-on: http://gerrit.openafs.org/2788
2010-09-27 08:25:46 -07:00
Russ Allbery
e36b4e0068 Update bos create man page for new naming of demand-attach binaries
The demand-attach fileserver binaries now have a "da" prefix.  Adjust
the documentation in the man page for bos create accordingly, and add
the new binaries to SEE ALSO.

Change-Id: Ib70bad87aaf8bfc483ffbfe402db01c178e6c4e4
Reviewed-on: http://gerrit.openafs.org/2830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 82b7327b5ba66c6ddbc898ad383b4e5f2b08ec38)
Reviewed-on: http://gerrit.openafs.org/2845
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-09-24 17:04:12 -07:00
Russ Allbery
a2cf6b8d9f Fix POD errors in fileserver and dasalvager
Fix missing newlines before =back commands.

Change-Id: If8e65c94f48c271c37c1b4bbec1b17d383c8375d
Reviewed-on: http://gerrit.openafs.org/2831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 10281b5be240707ed2eb75bdb68d9d23ff0011c8)
Reviewed-on: http://gerrit.openafs.org/2846
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-09-24 17:00:12 -07:00
Russ Allbery
f7f366d0ee Link dafssync-debug(8) to fssync-debug(8)
The two commands are documented identically for right now, so just link
the dafssync-debug man page to the fssync-debug man page.  Remove the
incorrect statement in the man page that fssync-debug only works with
demand-attach.

FIXES 128166

Change-Id: I812641ad7a345c7f5412c3c97ed1ba393e981639
Reviewed-on: http://gerrit.openafs.org/2836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 68d074d8aa98e76fb85289c69300d17695b98d0b)
Reviewed-on: http://gerrit.openafs.org/2847
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-09-24 16:59:41 -07:00
Simon Wilkinson
ca2a73638f libuafs: Don't #define user
libuafs used to #define user to usr_user, so that any references to
'struct user' would become 'struct usr_user'. However, none of the
kernel code uses struct user, and this #define conflicts with the
definitions in sys/user.h on Linux.

So, just remove it.

Thanks to Russ Allbery for the original problem report.

Change-Id: I7868c8ddade2df626f5ecae597144641dfc551b7
Reviewed-on: http://gerrit.openafs.org/2838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 200a9947f548eb7158e92de62ddaa76fcfe4ba46)
Reviewed-on: http://gerrit.openafs.org/2839
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-09-24 16:57:51 -07:00
Russ Allbery
c12a6ec003 Add NEWS entries for OpenAFS 1.5.77 and 1.5.76
Based on the public announcement for 1.5.77.

Change-Id: Ic368e16e16b03a79de6196a2e355eca0f420de77
Reviewed-on: http://gerrit.openafs.org/2819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0a9e57c45e4412d9dac7050d693a22044ddc1d0f)
Reviewed-on: http://gerrit.openafs.org/2820
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-09-21 13:37:36 -07:00
Steve Simmons
9faff2047e Add new file src/venus/cacheout to things that should be ignored.
Reviewed-on: http://gerrit.openafs.org/2719
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 41acfb91fa7fefae1f9a69aadc187a1403ec5827)
Change-Id: I0d95c9f63a20814fbb882db0b8c063e179d62b9c
Reviewed-on: http://gerrit.openafs.org/2722
2010-09-08 08:42:04 -07:00
Derrick Brashear
dbd2e6c120 openafs 1.5.77
make 1.5.77 in various places we need it

Change-Id: Ic7e487ce76f86f50d2565e75a3b2f7642ecadd87
Reviewed-on: http://gerrit.openafs.org/2713
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
openafs-devel-1_5_77
2010-09-07 21:01:04 -07:00
Derrick Brashear
fba7087c98 ubik recovery and remote use correct file number
the file propagation "out of band" changes should not hardcode recovery
on file 0, but instead work on any file the interface is acting on.
use the provided file number.

Reviewed-on: http://gerrit.openafs.org/2715
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f8ff458ef02d5ef49bc467304e40571d871385c8)
Change-Id: I2cf324c9759f9878c5b37603480a9c803c041641
Reviewed-on: http://gerrit.openafs.org/2717
2010-09-07 21:00:40 -07:00
Jeffrey Altman
fce40951d4 Windows: 1.5.77 Change Log summary
Change-Id: Ic0362956470ddb76fac64d21927b3e51b7980ea6
Reviewed-on: http://gerrit.openafs.org/2710
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 99811e3e5faf5917975d7ec3c3d16e2ed9a5bf50)
Reviewed-on: http://gerrit.openafs.org/2712
2010-09-07 20:48:29 -07:00
Jeffrey Altman
cb498f02f7 Windows: revise NTSTATUS response for ALLBUSY, ALLOFFLINE, and ALLDOWN
Replace STATUS_IO_TIMEOUT with RPC_NT_SERVER_TOO_BUSY for CM_ERROR_ALLBUSY.

Replace STATUS_PATH_NOT_FOUND with RPC_NT_SERVER_UNAVAILABLE for
CM_ERROR_ALLOFFLINE and CM_ERROR_ALLBUSY.

These errors provide a more meaningful message to end users when
a failure occurs.

LICENSE MIT

Change-Id: I34483f8f696285477fa0f8a8dac3b0ff33dee6b4
Reviewed-on: http://gerrit.openafs.org/2663
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 de441ba420b8fc38ce1b36bee06097f21cc6514b)
Reviewed-on: http://gerrit.openafs.org/2714
2010-09-07 20:48:08 -07:00
Jeffrey Altman
fcca1f7bbe Windows: Improve SMB detection of Local System account
Depending on the authentication method, the smb session authenticated
name for the "local system" account may be the nul string.  In this
case it is impossible to use the name to determine if the authenticated
entity is the "local system" account as required by smb_SetToken.
To work around this problem, smb_AuthenticateUserExt() will now obtain
the Security Identifier (SID) for the authenticated account.  The string
representation of the SID will be used in place of the name by
smb_ReceiveV3SessionSetupX() when constructing the smb_user_t object.
A new flag, SMB_USERNAMEFLAG_SID, indicates when the name is in fact
a SID.

smb_userIsLocalSystem() checks for the SMB_USERNAMEFLAG_SID flag and
performs a SID comparison when it is set.

smb_SetToken() will accept either MACHINE\user or a SID string as
the smbname.  It will obtain the SID if possible and create a SID-based
smb_user_t.

It is possible that a SYSTEM service will use an anonymous (S-1-5-7)
SMB connection.  In that case, we also check the RPC Impersonation
SID to see if it is SYSTEM.  If so, the RPC identity supercedes the
SMB identity for SetToken.

smb_IoctlRead, smb_IoctlV3Read and smb_IoctlRawRead are now all
consistent with regards to name processing.

Fixed a couple of comments as well.

FIXES 128022

LICENSE MIT

Change-Id: I8f9ccd4a4dddea52d151288855c7e129e2f31b28
Reviewed-on: http://gerrit.openafs.org/2709
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 19f50c13b4542cc84c33eaca4b2cc6ac0b75eb98)
Reviewed-on: http://gerrit.openafs.org/2711
2010-09-07 20:47:44 -07:00