Commit Graph

8044 Commits

Author SHA1 Message Date
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
Chas Williams (CONTRACTOR)
6880d4a3a2 Use bigger I/O sizes for the memcache
There doesn't seem to be a need to limit the rx message size when
using rx_WritevAlloc.  If there arent enough rx buffers to hold
the entire message at once, it will simply return less space.

Change-Id: Ic1e99432c8e4d21c71f831b8d6aeea9f12b1c99c
Reviewed-on: http://gerrit.openafs.org/2943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-12 19:12:47 -07:00
Simon Wilkinson
5142f16bd3 hcrypto: Tidy up some merge conflicts
There were some (harmless) merge conflicts in the hcrypto Makefile.
Get rid of them.

Change-Id: Iaf67d234d0f9ff24432479b2ae065adb73d5665b
Reviewed-on: http://gerrit.openafs.org/2963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-12 19:11:21 -07:00
Andrew Deason
e279ae77a7 LINUX: Build fixes for older kernels
Error and warning fixes for older kernels in osi_compat.h:

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

 - Call getsockopt for kernel_getsockopt, instead of setsockopt

 - Missing end brace in afs_try_to_freeze

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

Change-Id: Iae56bb0b0405bfd23dfd68a22c1d7922663b1442
Reviewed-on: http://gerrit.openafs.org/2946
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-12 19:07:11 -07:00
Simon Wilkinson
e16d7b7d6a rx: Don't call gettimeofday for every packet ack
Every time we receive an ACK packet, we call gettimeofday() for
every entry in the transmit queue that's permanently ack'd by that
packet. Instead, just make a note of the time when we start
processing the packet queue, and use it for every packet in the
queue.

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

Change-Id: I65c705c575c4a470b49390e7efca33c279a3133c
Reviewed-on: http://gerrit.openafs.org/2956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-12 10:32:19 -07:00
Jeffrey Altman
7e0b9ba7fc Windows: Build hcrypto shared library
Build a single afshcrypto.dll shared library on Windows.
There are no lwp vs pthread differences on Windows due to
the use of the Windows random data sources.

Change-Id: I02e4d7ee437440433a983f3eb361c78ac3cbbca6
Reviewed-on: http://gerrit.openafs.org/2964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-12 08:09:21 -07:00
Jeffrey Altman
091b6e19d1 Windows: Cleanup build scripts; no include\afs or include\rx
As part of the build system cleanup, minimize the number of
directories in which include\afs and include\rx paths are included
by default.  To acheive this goal the windows openafs dirent.h is
moved from include\afs to include, references whenever possible to
openafs headers included in include\afs or include\rx are prefixed
with afs\ or rx\ as appropriate.

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

Change-Id: I5e3a9623071c71db2f4445dc43266fdb3dad2c91
Reviewed-on: http://gerrit.openafs.org/2961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-12 08:07:00 -07:00
Simon Wilkinson
e95c8eaaf5 Fix rxperf includes
Don't use raw includes for "rx.h" and friends - instead include them
from the appropriate place in our include tree.

Change-Id: Ic136b20b571bef3f476de02302404d64cc741171
Reviewed-on: http://gerrit.openafs.org/2962
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-11 12:57:25 -07:00
Simon Wilkinson
d8434eefa7 rx: Indent dpf definition
Indent the CPP macros that define dpf() so that it's a little bit
clearer what's going on.

Change-Id: If2ccd637ac063c8400a16725972418224e9c5140
Reviewed-on: http://gerrit.openafs.org/2955
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-11 12:25:50 -07:00
Heimdal Developers
63592f0bfd Import of code from heimdal
This commit updates the code imported from the external
heimdal git repository to their revision
bf1f62b0a8cf72d32875656a7365f1e14d535dc5
which is described as switch-from-svn-to-git-1605-gbf1f62b

This is locally modified to include the earlier local fix
to sha512.c

Change-Id: I757e636654b713625f7d468da6aa37f1006aaa2a
Reviewed-on: http://gerrit.openafs.org/2954
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-11 12:10:10 -07:00
Simon Wilkinson
16b9038bd4 Heimdal: Import rand-w32.c for hcrypto on Windows
Windows has its own PRNG for hcrypto, so add the necessary file to
our import list.

Change-Id: Iea7a17fa9bfb90b9a9ebd5176936da21b3477bba
Reviewed-on: http://gerrit.openafs.org/2953
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-11 12:09:48 -07:00
Jeffrey Altman
7f742f45a2 Windows: Do not issue RXAFS change RPCs on known RO volumes
If the cm_scache_t is known to be on a RO volume, do not permit
RXAFS_xxx RPCs that would attempt to make a change to the volume
to be issued to the file server.  Instead, return CM_ERROR_READONLY
immediately.   This avoids triggering the abort threshold for
the current connection on the file server.

LICENSE MIT

Change-Id: I9c917e60277d281e32e4609d89b541803824251f
Reviewed-on: http://gerrit.openafs.org/2950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-11 12:08:33 -07:00
Simon Wilkinson
f22ae5f7d8 Unix: Rework build system
Rework the unix build system so that we support taking CFLAGS and
LDFLAGS from the command line, and don't replace them with our own
settings. Also, take the opportunity to bring some sanity and
consistency into our Makefiles.

The standard Makefile.config  now defines rules for LWP, pthreaded
and shared library builds. The CFLAGS settings for these are
called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively.
Similarly named variables are provided for LDFLAGS.

A module may select to use a particular build type for its suffix
rule by including either Makefile.lwp, Makefile.pthread or
Makefile.shared from src/config. This creates an appropriate .c.o
suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and
creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to
build, and link objects. For example:

foo.o: foo.c
	$(AFS_CCRULE) foo.c

foo: foo.o
	$(AFS_LDRULE) foo.o

If a you wish to override the CFLAGS or LDFLAGS for an object build
using these rules (or through the .c.o suffix rule) you can do so,
by defining CFLAGS_<object> or LDFLAGS_<object>. For example:

CFLAGS_foo.o= -DDEBUG
LDFLAGS_foo = -ldebugging

A module may also alter the behaviour of the compile and link steps
module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS.

This functionality is now used throughout the tree:
    *) Suffix rules are used wherever possible, removing a number of
       unecessary build rules.
    *) All link steps are replaced with AFS_LDRULE
    *) All standard compile steps are replaced with AFS_CCRULE
    *) Unusal compile steps are defined, as far as possible, int
       terms of the LWP_ PTH_ and SHD_ variables.
    *) The use of $? has been removed entirely, as it makes it
       impossible to provide build rules with dependency information

Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2
Reviewed-on: http://gerrit.openafs.org/2896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-11 08:00:29 -07:00
Andrew Deason
1466cd755c fssync-debug: exec DAFS version if DAFS detected
If the user requests something that differs depending on whether the
server is DAFS or not, try to exec the DAFS-enabled fssync-debug
(dafssync-debug) for them.

Based on a conversation with Tom Keiser.

Change-Id: If914d63d2eb4605e4d9a9d00af62264ac484c206
Reviewed-on: http://gerrit.openafs.org/2480
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-11 03:45:53 -07:00