Commit Graph

8257 Commits

Author SHA1 Message Date
Simon Wilkinson
da18ca4175 rx: Fix bracing on rx_clock macro arguments
Add brackets around the arguments in the clock helper macros, so that
these can be called with more complex parameters.

Change-Id: I09b333dcde96ef56fab8d5ada89eb0744cdb1690
Reviewed-on: http://gerrit.openafs.org/3030
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-23 12:55:43 -07:00
Simon Wilkinson
290495fab1 rx: More improvments to RTT calculation
Move the decision about whether a packet contributes to the peer's
rount trip time into the CalculateRoundTripTime function, and improve
the criteria used.

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

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

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

Change-Id: I6d978a118e2bd0694484376b586dd4eaa64cdd8c
Reviewed-on: http://gerrit.openafs.org/3029
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-23 12:53:46 -07:00
Jeffrey Altman
5c8981e040 Rx: Treat rx_minPeerTimeout not as a minimum but as padding
An improved RTT and timeout calculation algorithm is being
developed but until we have it, treat rx_minPeerTimeout not as
a minimum value for the timeout but as padding to be added to
the measured RTT when computing the peer timeout value.

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

Change-Id: Iff5e81d7cf1366e1810f118bf4825274696769c9
Reviewed-on: http://gerrit.openafs.org/3026
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-23 12:44:15 -07:00
Jeffrey Altman
c8f47626e2 Rx: Fix socket() handling so errors are properly detected
socket() returns an osi_socket which on Windows is an
unsigned type (HANDLE).  Therefore, tests of osi_socket < 0
will never identify when the INVALID_SOCKET value is returned.
On Windows, the OSI_NULLSOCKET is assigned to INVALID_SOCKET.
Replace all comparisons of (osi_socket < 0) with
(osi_socket == OSI_NULLSOCKET) as a means of detecting errors.

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

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

Change-Id: Ibc392eeb733851f56dbc7398cb252a4753b95275
Reviewed-on: http://gerrit.openafs.org/3027
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-23 12:43:59 -07:00
Charles Hannum
046f230ed4 linux fh_to_dentry can return err
handle e.g. ESTALE from  fh_to_dentry (in this case via
d_obtain_alias and fat_fh_to_dentry) so we print a meaningful
error when we lose.

Change-Id: If9f53776e0df4bfecf704943110a62b8c98684ce
Reviewed-on: http://gerrit.openafs.org/3028
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-22 13:18:57 -07:00
Chas Williams (CONTRACTOR)
350620e947 afs: fix SOLARIS builds conflicting 'u' define
Including <sys/user.h> does the following (which is rather
unfriendly):

This causes problems for the tokenJar u member.  I renamed u to
content, but there might be better choices for the name.

Change-Id: I3c8cd97e5868ee1ba78c2b2c4951d1af08664b77
Reviewed-on: http://gerrit.openafs.org/3023
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-22 08:31:48 -07:00
Jeffrey Altman
e356090ba2 Windows: Use rx_Readv / rx_Writev
When USE_RX_IOVEC is defined, cm_BufWrite() will utilize rx_Writev()
instead of rx_Write() and cm_GetBuffer() will use rx_Readv() instead
of rx_Read() to improve throughput.

LICENSE MIT

Change-Id: Ib70dfd4fd7a79c9ce36ef4fd8f4bb46a946621fd
Reviewed-on: http://gerrit.openafs.org/2999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 22:31:48 -07:00
Jeffrey Altman
6f3938e80a Windows: Fix i386_w2k and i386_nt40 path construction
Now that DEST and OBJ are defined in terms of AFSROOT
do not DESTDIR and OJT in terms of AFSROOT.

Change-Id: I196b4d0c93d2122c0b29f423213871db788c5ef5
Reviewed-on: http://gerrit.openafs.org/3025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 13:27:11 -07:00
Jeffrey Altman
64f732764c Windows: Improve cm_SyncOpDone logging
Change-Id: I2b2b9fa5067ea0927bbbdf2dcad433ebb84d2a66
Reviewed-on: http://gerrit.openafs.org/3022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 07:51:48 -07:00
Jeffrey Altman
5880a57627 Windows: remove unnecessary prototype from smb.c
Remove rx_StartClientThread() prototype.

Change-Id: I89377528a7497b06302bf8fa9cb71a192afc1c0a
Reviewed-on: http://gerrit.openafs.org/3021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 07:51:20 -07:00
Jeffrey Altman
49e57b8c3b Windows: optimize cm_BkgDaemon()
In cm_BkgDaemon test for CM_SCACHEFLAG_DATASTORING before
cm_ServerAvailable() in order to avoid unnecessary work.

LICENSE MIT

Change-Id: I75f88212a18d765790c9435de17e3b0fa735a7ab
Reviewed-on: http://gerrit.openafs.org/3020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 07:50:58 -07:00
Jeffrey Altman
dd01970f44 Windows: remove warnings from cm_daemon.c
Properly cast void * to long and int to LPVOID to avoid warnings.

Change-Id: Iaa48bd9247df21efbbed4422a156c67208c128d6
Reviewed-on: http://gerrit.openafs.org/3019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-21 07:50:36 -07:00
Jeffrey Altman
bc810f4ac0 Windows: prototype cm_PerformanceTuningInit()
Change-Id: Iffb1f05495a44ad0b95ed315cea5ae4771be1b8b
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>
2010-10-21 07:50:11 -07:00
Jeffrey Altman
3f2f327df4 Rx: prototype rx_StateClienThread()
Change-Id: I74c04229667d672005bd9a4abeab5309a1c97d7e
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>
2010-10-21 07:49:35 -07:00
Jeffrey Altman
929ca25d6d Rx: rx_stats_active not RXDEBUG
In rx_StatsOnOff() the assignment to rx_stats_active should not
be protected by RXDEBUG.

Change-Id: I5eb84f6d7049c4d923010e53a49ee7eb321495f4
Reviewed-on: http://gerrit.openafs.org/3016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-20 20:49:43 -07:00
Chas Williams (CONTRACTOR)
da400a24a7 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.

Change-Id: I4a070b2964805f45c0593c80a2604c4e4cd26ff7
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>
2010-10-20 16:41:32 -07:00
Chas Williams (CONTRACTOR)
dcb40c9fb8 Allow private implementations of osi_AllocSmall/LargeSpace
NBSD seemed to already do this at one point but was partly disabled.
This patches generalizes this feature by adding a define to disable the
standard pool macros.  Linux's slab based allocator should out perform
this single threaded allocator/pool.

Change-Id: Id8d498c11874b7d87736968b99f7ca023af4af36
Reviewed-on: http://gerrit.openafs.org/2998
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-19 12:02:38 -07:00
Derrick Brashear
1a48bb7952 atomic mutex don't recursive enter
enter pairs with exit, and not, say, enter

Change-Id: I7fe76c7ba125f9384205904318564173583e8b22
Reviewed-on: http://gerrit.openafs.org/3006
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-19 07:08:41 -07:00
Derrick Brashear
12570db7c9 vutil use lockfile mutex macros for lockfile mutex
we have macroes; let's use them. makes later changes easier.

Change-Id: If128930f659c34592c27503a02d64b67d7f60a84
Reviewed-on: http://gerrit.openafs.org/2996
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:37:56 -07:00
Derrick Brashear
787137104b afs assert should use afs abort
we already have a portability abort macro. use it.

Change-Id: I6919cf1b2d399ad4d1ca8b7b845848a9a2208cf9
Reviewed-on: http://gerrit.openafs.org/3000
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:37:36 -07:00
Simon Wilkinson
f7799a35c5 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.

Change-Id: I9d3794426393f9e0da7932b05acd8f4028a12cb3
Reviewed-on: http://gerrit.openafs.org/2960
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:20:11 -07:00
Andrew Deason
9fa496d11f RX: Add rx_InterruptCall
Add rx_InterruptCall, to cause a call to error out and wakeup anyone
waiting to write or read to that call.

Change-Id: I0747ac9107dac6b9a6d8b8c59120a756416aad58
Reviewed-on: http://gerrit.openafs.org/2982
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:19:54 -07:00
Jeffrey Altman
525ea8b60c 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.

Change-Id: Ia5237d9ca0707b39fe623639233b748b6798063e
Reviewed-on: http://gerrit.openafs.org/2997
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:19:09 -07:00
Simon Wilkinson
4e71409fe1 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.

Change-Id: I9ad850872a1a62050e774c911302a65bb8a59525
Reviewed-on: http://gerrit.openafs.org/2958
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:18:12 -07:00
Derrick Brashear
98688ddf70 shakeloosevcaches drop xvcache during dentry ops
denote that we slept and drop xvcache while doing dentry
flushing.

Change-Id: If597e4153bddce4631383d4c2e1da1faacb720a5
Reviewed-on: http://gerrit.openafs.org/2944
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-18 10:01:02 -07:00
Derrick Brashear
78502b61b3 rename afs/assert.h to afs/afs_assert.h
provide a private assert header which does not
pollute the normal namespace for the assert header.

further changes will modify pthread operations to not use
generic assert as a "did it work", which breaks if NDEBUG is set

Change-Id: I43a95c0aa31ad2e772bce9142356fd5c5bedac6c
Reviewed-on: http://gerrit.openafs.org/2995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-17 14:19:44 -07:00
Andrew Deason
5e9676144b 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.

Change-Id: I362302a1a59fbe324f7f3e926f02177c24a5577d
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>
2010-10-15 16:26:42 -07:00
Andrew Deason
ebfc586fd2 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

Change-Id: I6e81a419c797944bfed569aac529b9694702823d
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>
2010-10-15 16:25:42 -07:00
Russ Allbery
ffe445483a 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).

Change-Id: I378fe2f769703e43800c185f0934c77dd97b1c7b
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>
2010-10-15 14:03:16 -07:00
Derrick Brashear
9846ccc949 add objc build rules to make-type makefiles
sadly this needs to be here unless we want os-specific includes
of e.g. shared, lwp, pthreads makefiles for extra rules. as long
as no .m files are built in generic makefiles, this is a reasonable
approach.

Change-Id: Ibea9f47131189f4b13760d0c50a0bc6b43815ce3
Reviewed-on: http://gerrit.openafs.org/2991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-15 11:31:10 -07:00
Derrick Brashear
0adb2d758c 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"

Change-Id: I81d70dc72e777503c8d1e588ae6cba6f33c6dc44
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>
2010-10-15 11:30:51 -07:00
Jeffrey Altman
3616cdc306 Rx: use osi_Assert/osi_Panic instead of assert
Avoid using the openafs src/util/assert.h implementation for Rx
and Rx security classes.  Use the built-in osi_Assert() and osi_Panic()
functionality instead.  This avoids all references to assert.h except
for rx_pthread.c (Unix only) which requires it for the assert()
references in the src/util/pthread_nosigs.h macros.

Change-Id: I5fbfcd57da381e02e716e7688a58918aed05c50f
Reviewed-on: http://gerrit.openafs.org/2987
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>
2010-10-14 23:31:53 -07:00
Jeffrey Altman
c494161819 Util: include assert.h in pthreads_nosig.h when required
If assert() will be used within pthreads_nosig.h, include assert.h.
Also, permit assert() to be a macro that is a no-op by always evaluating
the expression.

Change-Id: I8c790dcb8cb98f75028343e5de94b91ab891daad
Reviewed-on: http://gerrit.openafs.org/2988
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>
2010-10-14 23:30:59 -07:00
Chas Williams (CONTRACTOR)
8652f146ab Rx: fix dpf() usage with regard to trailing \n's
instead of checking to see if we need to add a trailing newline for the
messages, just make sure dpf() is always called with one.

Change-Id: I4aec74fcb18c0696e403e69cf54a4be9dbfb98f7
Reviewed-on: http://gerrit.openafs.org/2981
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-14 23:29:41 -07:00
Marc Dionne
c2e063e274 LINUX/osi_vnodeops.c: minor coding style fixes
Re-indent and correct a few coding style issues in this section
of code.  In particular, it clears up possible confusion on the
scope of the preceding if statement.

Purely cosmetic, no functional changes.

Change-Id: Id6dea6326c9878b41f821de00267f75195fea394
Reviewed-on: http://gerrit.openafs.org/2989
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-14 16:58:37 -07:00
Jeffrey Altman
6208ac3589 Rx: function return type on separate line
Change-Id: I99546f2f7ebea0dd796d6c017acdeaf40c3fc711
Reviewed-on: http://gerrit.openafs.org/2978
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-14 14:28:01 -07:00
Andrew Deason
0a4a03ae68 Parallel I/O extensions to namei backend
This adds the ability for certain namei operations (currently only
ListViceInodes) to occur across multiple different threads in
parallel. Currently this is only enabled when built with the
not-yet-existant AFS_SALSRV_ENV.

Originally written by Tom Keiser.

Change-Id: I392653670378dbca3007e98a0cb09fe4474dd262
Reviewed-on: http://gerrit.openafs.org/1864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-14 06:49:23 -07:00
Marc Dionne
59927e2005 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.

Change-Id: Ic4baa24e2497f43791e069ce2c5c87fa21813f9f
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>
2010-10-14 06:47:46 -07:00
Tom Keiser
ca58739ebc rx: fix typo in rx_atomic Solaris backend
Fix typo so rx builds again on Solaris.

Change-Id: I328e05937b376c659bb42ba8db51f512b14da6f3
Reviewed-on: http://gerrit.openafs.org/2980
Tested-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-13 23:04:49 -07:00
Andrew Deason
ba96ebba71 LINUX: old kernel warning fixes
- osi_vfsop.c: struct super_block, not superblock

 - osi_vnodeops.c: initialize bypasscache

Change-Id: I8492faeda632a05c080013cef71a95c60ab7c931
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>
2010-10-13 21:06:26 -07:00
Tom Keiser
a91da7a7b9 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.

Change-Id: Ic920e45d55f7d1773585a5c0b004c722355b5725
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>
2010-10-13 21:03:36 -07:00
Hans-Werner Paulsen
0af2b14304 wrong rule to make afsd_fuse
in src/afsd/Makefile.in the rule to make afsd_fuse was not modified to
recognise CFLAGS_afsd_fuse.o

Change-Id: Iae7863362a3cc7920d68e0c96f57433143664c27
Reviewed-on: http://gerrit.openafs.org/2972
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>
2010-10-13 20:59:29 -07:00
Marc Dionne
1a6d4c162a Linux: fix aklog -setpag to work with ktc_SetTokenEx
The bit of code that allows aklog -setpag to work with recent
linux needed to be moved along with the change from ktc_SetToken
to ktc_SetTokenEx.

While we're in this bit of code, make it depend on the definition
of the syscall in the user space headers instead of relying on a
kernel configure test.

Change-Id: I0e556b514986b5d06daabcff67ecd51b0e4becdd
Reviewed-on: http://gerrit.openafs.org/2976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-13 20:33:38 -07:00
Simon Wilkinson
bdc8aa160b rx: Don't count unknown packets as missing
Just because a packet is in the transmit queue, don't assume that
the other side has instantly seen it! Currently, if we receive an
ACK packet which doesn't include the entire transmit queue, then we
will end backing off, even if we haven't sent the packets.

Restrict this behaviour to packets which are implicitly acked (or
otherwise) by the sender.

Change-Id: I2d63cd27d6d748007f87ff303f3fd64549a6208d
Reviewed-on: http://gerrit.openafs.org/2959
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-13 20:03:55 -07:00
Jeffrey Altman
e45abc6cc2 Rx: Consolidate wait for tq busy and make its use uniform
rxi_WaitforTQBusy() is now used wherever a wait for the transmit
queue is required.  It returns either when the transmit queue is
no longer busy or when the call enters an error state.

Having made this change it is clear that call->currentPacket is
not always validated when the call->lock is reacquired which may be
true when rxi_WaitforTQBusy() is called.

Change-Id: Ibf297f1447755be2abd39a81063cc7efd7f7a08b
Reviewed-on: http://gerrit.openafs.org/2966
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-13 20:02:58 -07:00
Simon Wilkinson
09aec1539d 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.

Change-Id: Iff64979fa1caeed2ba57d915fecb7ce823f345cf
Reviewed-on: http://gerrit.openafs.org/2957
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-13 20:02:05 -07:00
Andrew Deason
7d6080a841 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: I681dce7f359bf71333e69ceab8186bdc1d54d8dc
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>
2010-10-13 19:52:17 -07:00
Andrew Deason
48aca4a605 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.

Change-Id: I1aabcfd19656d5130eaa0e41e0974b3b4427add1
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>
2010-10-13 19:51:52 -07:00
Tom Keiser
198447ee71 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.

Change-Id: I4d58f8c599dcc3b17f8cfd76e88dac12097207c1
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>
2010-10-13 02:55:44 -07:00
Tom Keiser
9577ec85c9 trailing commas make xlc a sad panda
IBM VAC xlc_r throws parse errors when enumeration definitions have
trailing commas; let's avoid that.

Change-Id: I586fd6ed544bcbab444cc1d0964315a00b4d34b3
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>
2010-10-13 02:53:16 -07:00