The 2.6 code doesn't have an afs_read_super, so remove the
prototype and the outdated comments that reference it.
Reviewed-on: http://gerrit.openafs.org/3199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a546fc1707bc32ecb71d42dd48f91eebe3876439)
Change-Id: Id46c636faaf356bf6d7e08b4e22380f50e8dd944
Reviewed-on: http://gerrit.openafs.org/3226
For DAFS, you want to use 'dasalvager' not 'salvager'. One place was
still referencing 'salvager' in a DAFS example, so fix it.
Reviewed-on: http://gerrit.openafs.org/3217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 81602ffa3b6d981ab96ca17d970e585b7be28e6d)
Change-Id: I65f8e7816c8505cc2daddd4d646b65e6062cf686
Reviewed-on: http://gerrit.openafs.org/3224
Currently, when an error is encountered for an attached volume, we
call VRequestSalvage_r, which makes the volume go into the
VOL_STATE_SALVAGING state. This state implies that the volume is
offline, however, which is not necessarily the case if we're calling
VRequestSalvage_r from, for example, VAllocVnode_r or VUpdateVolume_r.
So now, make a new state called VOL_STATE_SALVAGE_REQ to indicate when
a salvage has been requested but the volume is not offline yet (and
thus is not yet ready to give to the salvager). If VCheckSalvage finds
a volume in this state, it offlines the volume first. The FSSYNC
VOL_OFF handler now checks for this state, and if we're giving the
volume to the salvager, we wait for the volume to exit that state.
VRequestSalvage_r also gains a new flag, VOL_SALVAGE_NO_OFFLINE. This
is to ensure that the existing salvaging code paths for unattached
volumes does not change (for when VRequesetSalvage_r is called from
attach2). If this flag is passed, we do what we used to do, which is
just salvage the volume without offlining it.
Reviewed-on: http://gerrit.openafs.org/2329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0aa7fac246ce044c757530ebe96d3a05c2f33894)
Change-Id: I76db861c862789801d74578c4965a2bc41c2047b
Reviewed-on: http://gerrit.openafs.org/3223
mapcnt is no longer used in either linux client and should be removed
to save a little space/sanity.
Reviewed-on: http://gerrit.openafs.org/3207
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c120f5c9b64a1333f965125dcfc435e922b47356)
Change-Id: I33e3f312ca07e9e2f7f5453495d6695a42e2cc19
Reviewed-on: http://gerrit.openafs.org/3222
Tested-by: BuildBot <buildbot@rampaginggeek.com>
attach2() is required to return with the VOL_LOCK held
even though it is called without it. This must be true
for error conditions as well. Not all error paths are
obtaining the VOL_LOCK before returning. Add out paths for
lock held and lock unheld error cases.
(cherry picked from commit 58901738ad6280d0777dd8e77f8c09cc45da04bc)
Reviewed-on: http://gerrit.openafs.org/3177
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I6918987cd784e4e550c2525b537bda290dbacae8
Reviewed-on: http://gerrit.openafs.org/3221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
because NDEBUG breaks things which happen inside an assert,
be done with that. instead, call osi_Assert wherever possible.
doesn't work for code which builds before rx; those cases we handle
by ensuring no operations happen inside the assert(). side effect:
move all pthread operations wrapped in asserts to MUTEX_mumble and
CV_mumble calls where those exist, so the assertions happen all in
one set of macroes.
Change-Id: I449d0822a39554a1f45b5b509d70e093e7ceb690
Reviewed-on: http://gerrit.openafs.org/3171
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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
(cherry picked from commit 78502b61b3e8b288ce6fec1f66d14d7e2431642a)
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>
Change-Id: Iac34946f9de773ea7489cd75edba220bca2158e3
Reviewed-on: http://gerrit.openafs.org/3172
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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>
(cherry picked from commit 3616cdc306f58f90be1cb4f524aa5720d8d638fe)
Change-Id: I45f839aeba7d7611ab170f6c58cc30547a2e640f
Reviewed-on: http://gerrit.openafs.org/3169
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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>
(cherry picked from commit 091b6e19d14b8d7c7396496d050fff5d067791a9)
Change-Id: I4f26ea2c3db67c164236dc84b78084822b562b95
Reviewed-on: http://gerrit.openafs.org/3167
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
move the debug break before the cache dump occurs
so that a debugger will be signalled faster when
a panic condition occurs.
Reviewed-on: http://gerrit.openafs.org/3147
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1664a2642b56febc08af8f95250a6d64761a525f)
Change-Id: I25a0eaaacb44555c1ddf5f538ef9c6792f6dac59
Reviewed-on: http://gerrit.openafs.org/3156
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The code used to start the transmit timer once for every set of packets
that it sends. However, these packets might be sent individually or in
clumps, with blocking for sendmsg, and on peer->lock, between each set
of packet sends. This has the effect of, even on a very stable network,
producing a high degree of variation in RTTs and timeouts. This is a
particular issue where the connection size is larger, as the number of
packets being sent individually under the one timer grows too.
Fix this by moving timer initialisation to SendList. This already takes
the peer lock, so obtain the timeout value here too. This means that
each jumbo gram, or individual packet (where jumbograms are disabled)
is sent with its own start time, and stabilises RTTs.
(cherry picked from commit e7066a9c30047e787d72f02dd1c28e5e473e494b)
Reviewed-on: http://gerrit.openafs.org/3137
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I64edd961e7e9cd615e07cc3f32d9bf71f74c8c8e
Reviewed-on: http://gerrit.openafs.org/3155
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The current RX implementation goes into fast recovery whenever a
timeout occurs. This is incredibly wasteful, particularly on fast
connections. So, remove this in favour of TCP style behaviour.
(cherry picked from commit 36e2d13b55085c996d38b30d003296c602ef8ee3)
Reviewed-on: http://gerrit.openafs.org/3138
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I43102ffc961d33255c995f4ff84142b7203cd11b
Reviewed-on: http://gerrit.openafs.org/3154
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Refactor all of the places where we wake up the transmit queue into
a common helper function.
Reviewed-on: http://gerrit.openafs.org/3136
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 802d50bc4e220b9bf404ac1ee36720023986d98e)
Change-Id: I4db12f228e5f10f7ab4a68604828823f6b783677
Reviewed-on: http://gerrit.openafs.org/3153
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
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>
(cherry picked from commit e356090ba21395e110b8a403a5efaf725ca3ffc8)
Change-Id: I0afb35343d111fd32c0ee65d8ab976a65c27e1a5
Reviewed-on: http://gerrit.openafs.org/3151
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
sendtimes and recvtimes are actually the data byte counts to be
exchanged during an rpc test not an iteration count as implied
by their names
Reviewed-on: http://gerrit.openafs.org/2876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9d912b6f1c4f3d242429c66291107b2badd166e4)
Change-Id: Ie18184f5d6d911ba18ad216cb3726378333f6213
Reviewed-on: http://gerrit.openafs.org/3036
be like the unix cache manager and set an error code
so idle dead time is enforced on sending.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/3033
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit f943a4eb524434d25ecf99cba0843ded13aef176)
Change-Id: I8ede65aef843af358455126301067d0b889ae9a8
Reviewed-on: http://gerrit.openafs.org/3143
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The MSI installer for OpenAFS does not preserve configuration data
across installs. This patch creates a backup of specific
configuration registry values when uninstalling OpenAFS and uses this
backup when subsequently installing OpenAFS.
Reviewed-on: http://gerrit.openafs.org/2977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1418b4fec23459aafec4b5a787e2c2b89f6af1f1)
Change-Id: I4eab1a4a3ea33bdcd7ccb27aea0927eed16892ca
Reviewed-on: http://gerrit.openafs.org/3142
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
We used to do rttp = &thisRtt, and then use rttp and thisRtt to
interchangably refer to the same data. This is just confusing, and
unnecessary. Replace all of the occurences of rttp with &thisRtt.
Take the opportunity to use the Clock_IsZero macro rather than doing
an explicit zero clock check.
Reviewed-on: http://gerrit.openafs.org/3031
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 58e7b85ab7c3c839c5dd126bd1c254f68a16b73a)
Change-Id: If2ad45645bc27af3a8ecd97f047b5558c73b173d
Reviewed-on: http://gerrit.openafs.org/3144
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add brackets around the arguments in the clock helper macros, so that
these can be called with more complex parameters.
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>
(cherry picked from commit da18ca41751b43576f6652a16f69260e0c6ac0d6)
Change-Id: Ie560d081e160ec1518c6d3fd307455ae8d219651
Reviewed-on: http://gerrit.openafs.org/3128
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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 290495fab1b2a8f1dc842cb2dd6de2d9922169c6)
Change-Id: I13fef02ad3c456614cd71227e6a0ae8b4a3f5c72
Reviewed-on: http://gerrit.openafs.org/3127
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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>
(cherry picked from commit 5c8981e0404287f2aa46390d3a9e8a52261906ab)
Change-Id: I82cf73cc8153d9aba669dc581231a88949b6ec4d
Reviewed-on: http://gerrit.openafs.org/3126
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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>
(cherry picked from commit c8f47626e2428449bfb64844e46fe5ad6b8e0f1c)
Change-Id: Ib9aada7b549e661eaf965747011ffbe85e306d4d
Reviewed-on: http://gerrit.openafs.org/3125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
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>
(cherry picked from commit 046f230ed4dde4c31d849893eec750437135342e)
Change-Id: I5c3084346631e4f07987d1dab2b1b891dbefbda0
Reviewed-on: http://gerrit.openafs.org/3124
Now that DEST and OBJ are defined in terms of AFSROOT
do not DESTDIR and OJT in terms of AFSROOT.
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>
(cherry picked from commit 6f3938e80a79a4a3684565a6960bce18e167aea4)
Change-Id: I4f084faaa5e058bb16045552135c70ac0a1683d3
Reviewed-on: http://gerrit.openafs.org/3122
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
In cm_BkgDaemon test for CM_SCACHEFLAG_DATASTORING before
cm_ServerAvailable() in order to avoid unnecessary work.
LICENSE MIT
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>
(cherry picked from commit 49e57b8c3b5e13f7ce48c6be5677827d970df5fa)
Change-Id: Ib33babf87605c8f93ee87e8f7c8084e213eedbc4
Reviewed-on: http://gerrit.openafs.org/3119
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
In rx_StatsOnOff() the assignment to rx_stats_active should not
be protected by RXDEBUG.
Reviewed-on: http://gerrit.openafs.org/3016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 929ca25d6d3fef07ea7c103dcd43a2658cdf71bd)
Change-Id: Id8bc93ec669333e8016d0958eb5c0fd87b76d9e0
Reviewed-on: http://gerrit.openafs.org/3115
Tested-by: Derrick Brashear <shadow@dementia.org>
maxDgramPackets is initially assigned this value after correcting
for the wire endian. This compare is harmless on little endian
since the network endian value will typically be huge and redundant
on big endian machines.
Reviewed-on: http://gerrit.openafs.org/3015
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit da400a24a7c9d5ac1595f10e0c76df5a461aa5dc)
Change-Id: I3e8c77e30021055192951765bb823b635775e128
Reviewed-on: http://gerrit.openafs.org/3114
Tested-by: Derrick Brashear <shadow@dementia.org>
Move the logic for deciding whether to compute RTT out of PeerNetStats
and into the callers. This means that we can share decisions about
whether a packet is ACK'd or not, and avoid uneccessary multiple tests
and function calls.
This change also stops us from computing RTT times for packets outside
of the set of explicit ACKs that we have received. This means that we
no longer compute RTTs for packets that are on the transmit queue, but
not yet on the wire.
Reviewed-on: http://gerrit.openafs.org/2960
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f7799a35c5942ba4feda3bc8c848cdaa8e0b7b76)
Change-Id: Idf4ba83ba187fd97caa85d0d042662c3b12efa02
Reviewed-on: http://gerrit.openafs.org/3113
A jumbogram is constructed as a series of rx packets that are
all sent at once and acknowledged at the same time. Computing the
RTT for all of the packets that makes up the jumbogram provides
the jumbogram RTT more weight than for a non-jumbogram packet.
To restore fairness, only compute the RTT for the last packet of
a jumbogram. The non-last packets with have the RX_JUMBO_PACKET flag
set in the packet header.
Reviewed-on: http://gerrit.openafs.org/2997
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 525ea8b60cc198f7e12da7a1aaffdcad2bb3ef21)
Change-Id: Ide4c225516dc7585b49ba7b244b56446297c74d1
Reviewed-on: http://gerrit.openafs.org/3112
Our RX implementation virtually guarantees that we will see out of
order ACK packets, even on well behaved networks, as we send acks
simultaneously from multiple threads.
Currently we only reject out-of-order ACKS which change the window
position (so a window that advances, can never go back). However,
we fail to deal with the explicit acknowledgement portion of the ACK
packet in the same way...
For example, if we have a packet A that acknowledges packets 1 and 2,
and then a packet B acknowledging 1,2,3 and 4. If B arrives before A,
then we mark 1, 2, 3, 4 as acknowledged, and then treat the arrival of
A as nAcking 3 and 4. This has the same effect as an explicitly stated
nack, triggers an early and unnecessary resend and may, in some situations,
cause the call to go into congestion avoidance.
We can solve this using the previousPacket field of the ACK. This
indicates the last packet seen by the peer. In the same way as
firstPacket, this should never go backwards, and so can be used to
detect out of order acknowledgements, and reject them.
Reviewed-on: http://gerrit.openafs.org/2958
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4e71409fe1305cde4b9b341247ba658d8d24f4d0)
Change-Id: Idc064d5950b4235a303a933d046546b67add6623
Reviewed-on: http://gerrit.openafs.org/3111
denote that we slept and drop xvcache while doing dentry
flushing.
Reviewed-on: http://gerrit.openafs.org/2944
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 98688ddf70cbfe21d22e5832b2f50d626b4183e9)
Change-Id: I6db42ba9cb1614fd86616d6b425f821c3199620c
Reviewed-on: http://gerrit.openafs.org/3110
For consistency with the code checking user ids in createuser, check
for a specified group id of 0 specifically and give a slightly
different error message for it.
Reviewed-on: http://gerrit.openafs.org/2994
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 5e9676144bc3d9b186495a06d14581a4fc97beff)
Change-Id: I37434f1ad44ed1fad41cf454291c91e0b046ec80
Reviewed-on: http://gerrit.openafs.org/3109
Tested-by: Derrick Brashear <shadow@dementia.org>
User ids cannot be negative (those are groups). So, error out if a
negative id is specified for createuser.
FIXES 128343
Reviewed-on: http://gerrit.openafs.org/2993
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ebfc586fd2d00085a384763cc519c2af6ce5223e)
Change-Id: I6a107dc5a1a6d98823f5377657856ca41566cb2b
Reviewed-on: http://gerrit.openafs.org/3108
Tested-by: Derrick Brashear <shadow@dementia.org>
Convert the port extracted from the SRV record return to network byte
order before assigning it to the port array.
The port in a SRV record is extracted by pulling out the high byte
and low byte and then mathematically combining them, which implicity
converts from network byte order to host byte order. However, the
callers of afsconf_LookupServer expect the port array to be returned
in network byte order since ports are assigned without modification
to the .sin_port field of a struct sockaddr_in. See also the byte
order of the default afsdbPort value.
Reported by Jan Christoph Nordholz (Debian Bug#600228).
Reviewed-on: http://gerrit.openafs.org/2985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ffe445483a07c751202a1ef06136f70402ec895d)
Change-Id: I918ed4acdcfecbe1f879746d80b501714f1e775f
Reviewed-on: http://gerrit.openafs.org/3107
Tested-by: Derrick Brashear <shadow@dementia.org>
if we have forwardable tickets, e.g., as a pref, get those.
and so on. this way tickets AFS got are not "Weird"
Reviewed-on: http://gerrit.openafs.org/2965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0adb2d758c23e1c02d5894d2c534b685999d821c)
Change-Id: I76449230243425c7f14df5ff9795bcdc3076fbdb
Reviewed-on: http://gerrit.openafs.org/3106
The change to the statfs configure test that was made for 2.6.36
broke the test for older kernels. The new test is based on a call,
and that will generate a warning but not an error when the arguments
don't match the prototype.
Take another tack, and revert to the old style test, but with the
simple_statfs function instead of vfs_statfs.
Reviewed-on: http://gerrit.openafs.org/2975
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 59927e20052c3f075e0269e46691bc94c3974f86)
Change-Id: I0f4c548d450b3c1019ff9c013edbc967cafe6c24
Reviewed-on: http://gerrit.openafs.org/3105
Tested-by: Derrick Brashear <shadow@dementia.org>
FSYNC_com_VolOff was releasing its lightweight ref before the error handling
code for VGetVolumeByVp_r was executed; this code needs to dereference the
Volume pointer for some of its logic. This was unsafe since
VCancelReservation_r() could have resulted in the Volume object being freed.
Move VCancelReservation_r() below the error handling block. NB: the error
handling block now relies upon the goto done/deny to cancel its lightweight
ref.
Reviewed-on: http://gerrit.openafs.org/2968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a91da7a7b91ce0c4584092cd666eca89d39b8abf)
Change-Id: Ie84351628fd112aa1724180a08dba10f0903a016
Reviewed-on: http://gerrit.openafs.org/3103
Building the transmit list happens in a time critical section of
code. Using malloc to allocate the list which holds the packets to
be transmitted slows down this critical section. Instead, just
allocate the space as part of the call structure.
Locking of xmitList is somewhat tricksy, as the call->lock is
dropped over calls to sendmsg(). However, the xmitList is protected
by the TQ_BUSY call flag, which prevents multiple threads from
usign the transmit queue, and hence the xmitList, simultaneously.
Reviewed-on: http://gerrit.openafs.org/2957
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 09aec1539dbe4e4c72ec7acadf2d25e6f93c5982)
Change-Id: I589fa248a124a15248e23b6154e193e4d136fde8
Reviewed-on: http://gerrit.openafs.org/3102
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>