]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
15 years agoOpenBSD: Fix variable name typo in osi_vcache.c
Antoine Verheijen [Wed, 1 Dec 2010 22:40:04 +0000 (15:40 -0700)]
OpenBSD: Fix variable name typo in osi_vcache.c

The osi_PostPopulateVCache() routine in the OpenBSD version of
osi_vcache.c tries to use the non-existent variable "vc" instead
of "avc". This fixes it.

Reviewed-on: http://gerrit.openafs.org/3418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit eaaba59773002ca3ba3e15d1aea69ae4b9493359)
Change-Id: Id2e4af53a371c3b9e605752424c74c082d0c4182
Reviewed-on: http://gerrit.openafs.org/3455
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoOpenBSD: Fix use of mstat Length field in osi_vm.c
Antoine Verheijen [Wed, 1 Dec 2010 21:24:26 +0000 (14:24 -0700)]
OpenBSD: Fix use of mstat Length field in osi_vm.c

The code for osi_VM_FlushPages() in osi_vm.c for OpenBSD incorrectly
tries to access field "m.Length" in the vcache structure "avc"
instead of "f.m.Length".

Reviewed-on: http://gerrit.openafs.org/3417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 35daebc577ab11a5fd80d678764a3a681cc5f2f3)
Change-Id: Iffbccfdf0f066d0cb02bb39146afd9520c9bc277
Reviewed-on: http://gerrit.openafs.org/3454

15 years agoOpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above.
Antoine Verheijen [Wed, 1 Dec 2010 20:22:45 +0000 (13:22 -0700)]
OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above.

With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed
from the in_ifaddr structure as part of a cleanup that considers them
unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was
using no longer compiles. On the other hand, the Darwin version of this
routine seems suited to OpenBSD's needs since it doesn't use those fields
so we'll use that version for OpenBSD 4.7 and above instead.

Reviewed-on: http://gerrit.openafs.org/3405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2d2ac3ca5fbd221d297861c0b5c409e9e004545c)
Change-Id: I60c8aeb69484c87b10cdda8a317702d2f80ee849
Reviewed-on: http://gerrit.openafs.org/3453

15 years agoDarwin: Assign correct value to myDstaddr in afsi_SetServerIPRank()
Antoine Verheijen [Wed, 1 Dec 2010 18:54:23 +0000 (11:54 -0700)]
Darwin: Assign correct value to myDstaddr in afsi_SetServerIPRank()

The value in sin->sin_addr.s_addr that's assigned to myDstaddr in the
Darwin version of afsi_SetServerIPRank() is in network byte order but
really needs to be in host byte order.

Note: This patch assumes that change I66f5c790d8c55b359e3550b6d71f3abe040a2820
      has been previously installed. The patch fails otherwise.
Reviewed-on: http://gerrit.openafs.org/3402
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2822416059fe192dc7e3c261b1e93510f2f10f3e)
Change-Id: I6fba524733ecf35e60419d449838e93a7a5255a6
Reviewed-on: http://gerrit.openafs.org/3452

15 years agoDARWIN: Fix processing using rx_ifaddr_* macros in afsi_SetServerIPRank()
Antoine Verheijen [Wed, 1 Dec 2010 18:37:02 +0000 (11:37 -0700)]
DARWIN: Fix processing using rx_ifaddr_* macros in afsi_SetServerIPRank()

The macros rx_ifaddr_address, rx_ifaddr_netmask, and rx_ifaddr_dstaddress
all expand to a call to memcpy() which returns the destination address as
its return value. The test in the DARWIN version of afsi_SetServerIPRank()
for completion when using this macro, however, seems to assume that success
returns zero, which is wrong and results in myAddr, subnetmask, and
myDstaddr always being set to zero. This patch corrects this behaviour.

Reviewed-on: http://gerrit.openafs.org/3401
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8fa01c4d602fac6d5d81b119d0593f02087e4302)
Change-Id: If4a47f57a804a2492659d74a5e930f4a962f1748
Reviewed-on: http://gerrit.openafs.org/3451

15 years agofreebsd: properly track vcache references
Derrick Brashear [Thu, 2 Dec 2010 06:55:34 +0000 (01:55 -0500)]
freebsd: properly track vcache references

previously both root and reclaim could end up leaking refs. fix it.

Reviewed-on: http://gerrit.openafs.org/3424
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6eb1088aad9163ab8d4a4dda513444290c55daa6)
Change-Id: I0c5c8554caf777e8c97529a7d640a79211a0300c
Reviewed-on: http://gerrit.openafs.org/3450

15 years agobalance afs_vcount in non-linux CM
Derrick Brashear [Thu, 2 Dec 2010 06:48:53 +0000 (01:48 -0500)]
balance afs_vcount in non-linux CM

when we dole out a vcache, count it.

Reviewed-on: http://gerrit.openafs.org/3423
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit bd2e024dc230693b1c6cbcfe40d4270a475b02d0)
Change-Id: Ie80dfd0be5e8c5560763b3fa50a27ed766340aa5
Reviewed-on: http://gerrit.openafs.org/3449

15 years agoLinux: 2.6.37 - replace get_sb with mount
Marc Dionne [Wed, 3 Nov 2010 00:54:20 +0000 (20:54 -0400)]
Linux: 2.6.37 - replace get_sb with mount

With kernel 2.6.37 the new entry point for mounting a filesystem
is the mount() operation instead of get_sb().

Replace afs_get_sb with afs_mount if the new operation is
available, and use mount_nodev instead of get_sb_nodev.

Note that this is not strictly required for 2.6.37 since the old
interfaces are still around, but we might as well switch now.

Reviewed-on: http://gerrit.openafs.org/3245
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2ea841feac2de8ade987c18cb7043aacfebe0d83)
Change-Id: I1f17068a1a06654568f30b75c5c65da0100995cd
Reviewed-on: http://gerrit.openafs.org/3251

15 years agoredhat init script fix missing space
Derrick Brashear [Mon, 22 Nov 2010 16:36:55 +0000 (11:36 -0500)]
redhat init script fix missing space

the if [] needed a space before the ]. fix it.

Reviewed-on: http://gerrit.openafs.org/3357
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 53d1fae4c422317dab0b7bf7fb0dedc5eb1f3607)
Change-Id: Iab0a729f44ad32c416c5898078c57d93142d3c5e
Reviewed-on: http://gerrit.openafs.org/3359

15 years agoLinux: Fix prototypes for sys_setgroups_stub and sys32_setgroups_stub
Anders Kaseorg [Sat, 6 Nov 2010 07:15:06 +0000 (03:15 -0400)]
Linux: Fix prototypes for sys_setgroups_stub and sys32_setgroups_stub

Fixes “warning: function declaration isn’t a prototype”.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 14980b477822ecc66e95f8c2a71f0fc11839afbd)

Change-Id: I8bbee19ae1a36b2222df224856d08ea71ce91d83
Reviewed-on: http://gerrit.openafs.org/3306
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: use DEFINE_MUTEX for afs_linux_alloc_sem on newer kernels
Alejandro R. Sedeño [Fri, 5 Nov 2010 21:24:43 +0000 (17:24 -0400)]
Linux: use DEFINE_MUTEX for afs_linux_alloc_sem on newer kernels

DECLARE_MUTEX is gone as of 2.6.37; afs_global_lock switches from
DECLARE_MUTEX to DEFINE_MUTEX at 2.6.16, so do the same here.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3273
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f9409fcdffa594aff9530038a5ac81a2495da3b6)

Change-Id: If14d34183d8a28232f5f38fbe807c23dce1abf1b
Reviewed-on: http://gerrit.openafs.org/3287
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoviced: fix missing host lock in h_Enumerate
Michael Meffie [Thu, 11 Nov 2010 17:17:05 +0000 (12:17 -0500)]
viced: fix missing host lock in h_Enumerate

The global host lock must be held over h_Release_r. Fix the
the case in h_Enumerate where h_Release_r is called without
the global host lock held.

Reviewed-on: http://gerrit.openafs.org/3294
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c8dc68299d47ae4d7f0c9a1354de9ddd37ff86fc)

Change-Id: I10ac0ce495f2784ec270ebb50fc92c983cc0308b
Reviewed-on: http://gerrit.openafs.org/3295
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRedHat: Remove potpourri.h from RedHat SPEC file manifest
Jonathan Billings [Fri, 5 Nov 2010 13:38:43 +0000 (09:38 -0400)]
RedHat:  Remove potpourri.h from RedHat SPEC file manifest

potpourri.h is no longer needed, so it should be removed from the
list of files to be installed.  The missing file was causing the
RPM package build process to fail.

Change-Id: I2226bfa5ce170cce252c8d55c13b23552a682150
Reviewed-on: http://gerrit.openafs.org/3267
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoopenafs 16 merge error on rx mutex inversion fix openafs-devel-1_5_78
Derrick Brashear [Thu, 4 Nov 2010 12:23:52 +0000 (08:23 -0400)]
openafs 16 merge error on rx mutex inversion fix

remove an extra bogus line left when cherry-picking.
(cherry picked from commit d5ce8d19ace9b87816dd36663420136f5f2ad746)

Change-Id: I4fa8cf8c4f0aafc04ffe7a9e48f2437dfb9e19db
Reviewed-on: http://gerrit.openafs.org/3256
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoRX: Add rx_InterruptCall
Andrew Deason [Fri, 8 Oct 2010 20:39:21 +0000 (15:39 -0500)]
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.

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>
(cherry picked from commit 9fa496d11ff2a361b4693034f6caad90da995312)

Change-Id: I2e0f5eb2942830523b19d2596c50d0fba0fc9a1a
Reviewed-on: http://gerrit.openafs.org/3248
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Do not leak cm_volume_t objects from the LRU queue
Jeffrey Altman [Tue, 2 Nov 2010 20:16:20 +0000 (16:16 -0400)]
Windows: Do not leak cm_volume_t objects from the LRU queue

During cm_volume_t object recycling the object is removed
from the LRU to ensure that a single object is not recycled
by multiple threads at the same time.  Before cm_FindVolumeByName()
exits the object must be re-inserted into the LRU if it is not
present.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3220
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 862e29a98aee72918fc25e960556f732ba80522c)
Change-Id: I11847718cb5321ff2b08850786cc147390040f42
Reviewed-on: http://gerrit.openafs.org/3246
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRPM scripts should allow newbinary restart to restart
Derrick Brashear [Wed, 27 Oct 2010 00:13:38 +0000 (20:13 -0400)]
RPM scripts should allow newbinary restart to restart

add a mode where a newbinary restart can be used instead of
condrestart to induce a restart.

also, on upgrade, don't turn on the server RC script if it was
previously manually disabled.

Reviewed-on: http://gerrit.openafs.org/3163
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 812333c9a0d4722142d22186fe9b07b39fe6993b)
Change-Id: I54e58a5bb2ae88bfd4518c248fc9d3377c0c0981
Reviewed-on: http://gerrit.openafs.org/3235

15 years agorx mutex inversion fix
Derrick Brashear [Tue, 2 Nov 2010 18:47:35 +0000 (14:47 -0400)]
rx mutex inversion fix

as discovered by Benjamin Kaduk, we were usually holding rx_refcnt_mutex
but briefly, and here we held it longer, and thus around acquiring freepktQ
mutex. undo it by simply setting STATE_RESET sooner as newcall does.

(cherry picked from commit d5ce8d19ace9b87816dd36663420136f5f2ad746)

Change-Id: Ic4b13dcf09006d3c8171b63f254129fe202e7155
Reviewed-on: http://gerrit.openafs.org/3243
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: protect rx_conn and rx_call refCount field with rx_refcnt_mutex
Jeffrey Altman [Wed, 22 Sep 2010 23:36:03 +0000 (16:36 -0700)]
Rx: protect rx_conn and rx_call refCount field with rx_refcnt_mutex

Add a new global mutex rx_refcnt_mutex to protect the conn->refCount
and call->refCount in place of relying upon the conn->conn_data_lock
and the call->lock.

This will relieve some lock contention with rx_ReceivePacket().

Reviewed-on: http://gerrit.openafs.org/2837
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 5613ea60fc9431dbc87bc8ad6439f9b5af38af5c)

Change-Id: Ie8e72b1c3d68e698048594b5ceddf90910fbc05e
Reviewed-on: http://gerrit.openafs.org/3249
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoviced don't double-print start time
Derrick Brashear [Wed, 27 Oct 2010 18:18:28 +0000 (14:18 -0400)]
viced don't double-print start time

side effect: remove the version which breaks on 64 bit windows

Reviewed-on: http://gerrit.openafs.org/3173
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9749e5284cb8915d5e9b886bd74f1580d5bff28c)
Change-Id: I72975f54e7434f20fac32e4821801d43d13846ce
Reviewed-on: http://gerrit.openafs.org/3242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agodon't duplicate work of ctime_s
Jeffrey Altman [Wed, 27 Oct 2010 18:25:10 +0000 (14:25 -0400)]
don't duplicate work of ctime_s

on windows we use ctime_s for ctim'ing to a buffer. except we
allocate an extra buffer. "uh"

Reviewed-on: http://gerrit.openafs.org/3174
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 46cf6c8f365d25122c550b76be61a880d16f531b)
Change-Id: If9b63e4d8a377bc23be07ab82f3dc73779d95fa1
Reviewed-on: http://gerrit.openafs.org/3241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agowindows: preserve lasterror prior to calling free
Rod Widdowson [Wed, 27 Oct 2010 19:08:28 +0000 (21:08 +0200)]
windows: preserve lasterror prior to calling free

free() destroys GetLastError, so preserve it before giving back all the
buffers.  Then if the create process failed we have something sensible to
log.

Reviewed-on: http://gerrit.openafs.org/3175
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e1ed8ab1d93906e1b556de332fa32601a9a489fc)
Change-Id: I028a96a669fff3db48c05f2d894e9c6ef31fad12
Reviewed-on: http://gerrit.openafs.org/3240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoWindows: fix built in touch
Rod Widdowson [Thu, 28 Oct 2010 17:34:41 +0000 (18:34 +0100)]
Windows:  fix built in touch

Recent versions of windows add a whole bunch of attributes above
A_ARCH.  (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED was what bit be but
encryption of compression would do it).

This makes ~_A_ARCH not a good choice for testing nonwritability
of a file - so files with these new attributes just get silently ignored.

Using an explicit mask is much better.  So do that.

Reviewed-on: http://gerrit.openafs.org/3182
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 68aace4054430105ceaf52ce8e316f3ae01e7dc8)
Change-Id: Ia481b1b36dbecbeca5a9e69dbcd78b7a754f9cc9
Reviewed-on: http://gerrit.openafs.org/3239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agobucoord: parallel make fix
Marc Dionne [Wed, 27 Oct 2010 00:33:41 +0000 (20:33 -0400)]
bucoord: parallel make fix

Fix an instance of a Makefile rule with multiple targets.
This can cause a parallel make to fail when two instances of
compile_et compete to write the same output files.

Spotted by a build failure with a corrupt bc.h header.

Reviewed-on: http://gerrit.openafs.org/3165
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0cc3cc9412c232e2ec799ee1f1a9a90f3e56ab66)
Change-Id: I453e6eced8145a0b361ce4a54baf9f7411128d2f
Reviewed-on: http://gerrit.openafs.org/3238
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoFBSD: fix dumb panic when we can't pfind rxk_Listener
Ben Kaduk [Fri, 29 Oct 2010 02:45:33 +0000 (22:45 -0400)]
FBSD: fix dumb panic when we can't pfind rxk_Listener

The process is only returned locked if the process is found.
Don't try to unlock it if it's not found.

Reviewed-on: http://gerrit.openafs.org/3186
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 832607318b9ad4ab38bb62515cdb4959cc21a656)
Change-Id: Ic4274a4a5640166669714798b909b2efb3b84cdb
Reviewed-on: http://gerrit.openafs.org/3237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoWindows: Finish converting vol apps to pthread only
Jeffrey Altman [Thu, 28 Oct 2010 05:19:17 +0000 (01:19 -0400)]
Windows: Finish converting vol apps to pthread only

The src/vol directory on Windows is one of the rare examples
where a single directory builds both lwp and pthreaded versions
of libraries and executables.  With this patchset the executables
are fully converted from lwp to pthread.  This requires that
afsrpc.dll include the pthread implementations of the threadname,
fasttime, and lock implementations from the LWP directory.
The inclusion within afsrpc.dll permits the dviced and
dvolser directories to avoid rebuilding those object modules.

Reviewed-on: http://gerrit.openafs.org/3181
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5fce5754cee4f466f99681fcd7f42e5735e9776d)
Change-Id: I3b2215f017aae91a91e1a1955f34bf149679223b
Reviewed-on: http://gerrit.openafs.org/3236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoFBSD: lock interlock around v_usecount accesses
Ben Kaduk [Fri, 29 Oct 2010 16:01:04 +0000 (12:01 -0400)]
FBSD: lock interlock around v_usecount accesses

The FreeBSD vnode locking strategy requires that the vnode
interlock be held for all accesses to v_usecount, such as those
used by our VREFCOUNT and VREFCOUNT_GT macros.  Conveniently,
a wrapper function is provided that takes the lock around its
access of the element, vrefcnt().  Use it for our macros.

Reviewed-on: http://gerrit.openafs.org/3195
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b6367aa84b9d1c7529b6f3a12bbfeacc91384ffb)
Change-Id: I41ccb2b84347c4182d5b782faee176c9800d640a
Reviewed-on: http://gerrit.openafs.org/3234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoFBSD: correct and simplify vcache eviction routines
Ben Kaduk [Fri, 29 Oct 2010 07:18:02 +0000 (03:18 -0400)]
FBSD: correct and simplify vcache eviction routines

osi_VM_FlushVCache and osi_TryEvictVCache were both attempting
to be wrappers around vgone(), with some checks before hand.
Implement the latter in terms of the former to prevent
code duplication and propagation of incorrect code.

Additionally, correct the locking around vgone().  The
vnode lock must be held, and we must also increase the vnode's
hold count so that it does not disappear out from under us.
As we need the interlock to check the usecount, keep it
locked until we lock the vnode lock, for extra protection.

As an added bonus, we no longer try to call vgonel(), which
is not an exported symbol and merely happened to work due
to the current kernel linker implementation.

Remove some stale comments.

With this change, a parallel buildworld completes on
my four-core machine.

Reviewed-on: http://gerrit.openafs.org/3196
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit aad83a30a82407bfa6ac15b49fd31d69b563e898)
Change-Id: Ibf7f1744f0030c92b45b1558d7f5e52409208e60
Reviewed-on: http://gerrit.openafs.org/3233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoQuickStart Unix: use dafs type and name for demand attach file services
Rod Widdowson [Fri, 29 Oct 2010 18:57:50 +0000 (19:57 +0100)]
QuickStart Unix: use dafs type and name for demand attach file services

bos create <machine name> dafs dafs [...] (not fs).

Reviewed-on: http://gerrit.openafs.org/3197
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 4f5cdd73f665434f531144151f9b6e1f4702cf02)
Change-Id: I301f61e507ad5947a786709af907a99b91725021
Reviewed-on: http://gerrit.openafs.org/3232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agofs getfid defaults to '.', like other path-related commands
Phillip Moore [Tue, 19 Oct 2010 15:31:47 +0000 (11:31 -0400)]
fs getfid defaults to '.', like other path-related commands

I noticed that all of the other commands that accept a list of paths
use the SetDotDefault() function to default to ".", when no arguments
are given.  This patch adds that call to getfid, making it more
consistent with similar commands.

Reviewed-on: http://gerrit.openafs.org/3008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c77ac5ce976b6f3e5a13a3f739ddbb6e32a177b1)
Change-Id: I94ada76f835ccd01e2061034bd6585d6f1d5dccb
Reviewed-on: http://gerrit.openafs.org/3231

15 years agofs getfid output changed for consistency with Windows implementation
Phillip Moore [Tue, 19 Oct 2010 15:23:46 +0000 (11:23 -0400)]
fs getfid output changed for consistency with Windows implementation

This patch removes the redundant volume ID from the output of fs
getfid, and replaces it with the cell name, which is what the Windows
implementation provides.

Reviewed-on: http://gerrit.openafs.org/3007
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d390df097cac0fb7815c43e071040559612b6360)
Change-Id: I930627e92672dd5012d5bca08d469f7fb7624be1
Reviewed-on: http://gerrit.openafs.org/3230

15 years agoMakes fs getfid error handling consistent with other fs commands
Phillip Moore [Tue, 19 Oct 2010 12:24:41 +0000 (08:24 -0400)]
Makes fs getfid error handling consistent with other fs commands

This patch makes the fs getfid command print errors for paths that
can't be handled correctly, instead of quietly ignoring them, and it
also returns an error code if any such paths are encountered.  This
makes the behavior consistent with other fs commands, such as
listquota, whereis, etc.

FIXES 128372

Reviewed-on: http://gerrit.openafs.org/3005
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b04a450df2e54a549f9c7e014016475fa566937b)
Change-Id: I63ae7edeff59bcd264a371c3bfd71220da4b4a39
Reviewed-on: http://gerrit.openafs.org/3229

15 years agoFix fs bypassthreshold to accept a size of -1 to disable
Phillip Moore [Tue, 19 Oct 2010 16:17:20 +0000 (12:17 -0400)]
Fix fs bypassthreshold to accept a size of -1 to disable

The fs bypassthreshold command assumes a value of -1 means the feature
is disabled, but the CLI refused to accept this argument, since it is
not strictly a digit (according ti isdigit()).  This patch accepts the
string -1, and makes it possible to both enable AND disable this
feature.

Reviewed-on: http://gerrit.openafs.org/3009
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 1fa575c09ea7aa66e657b226465cb90dbba4af70)
Change-Id: I0e748b513bcb97c436bd10c8a80222fc10fce08c
Reviewed-on: http://gerrit.openafs.org/3228

15 years agoQuickstart Guide: Add some verbiage about /vicepXX/AlwaysAttach
Jason Edgecombe [Tue, 26 Oct 2010 19:00:58 +0000 (15:00 -0400)]
Quickstart Guide: Add some verbiage about /vicepXX/AlwaysAttach

Reviewed-on: http://gerrit.openafs.org/3158
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9c8d58cd93b98120a7ff31a90b3f9f0ef354a1bc)
Change-Id: I11a6177257338520602e1cb6be029583e94c4b43
Reviewed-on: http://gerrit.openafs.org/3227
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoLinux: remove stale prototype and references for read_super
Marc Dionne [Fri, 29 Oct 2010 20:23:07 +0000 (16:23 -0400)]
Linux: remove stale prototype and references for read_super

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

15 years agokill off afs/debug.h
Derrick Brashear [Fri, 29 Oct 2010 17:47:17 +0000 (13:47 -0400)]
kill off afs/debug.h

as reported by Marc Dionne, debug.h was still redefinining assert()

yeah, let's be done with that.

(cherry picked from commit af0951f373224ce17b341bc5d227fdd5ea621762)
Reviewed-on: http://gerrit.openafs.org/3194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I2af9e1a54bd291f779b5380c0f45f9527e3c7cd8
Reviewed-on: http://gerrit.openafs.org/3225
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoQSG: DAFS uses dasalvager
Andrew Deason [Mon, 1 Nov 2010 22:30:20 +0000 (17:30 -0500)]
QSG: DAFS uses dasalvager

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

15 years agoDAFS: Fix demand-salvages of attached volumes
Andrew Deason [Fri, 2 Jul 2010 21:57:42 +0000 (16:57 -0500)]
DAFS: Fix demand-salvages of attached volumes

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

15 years agoafs: minor cleanup for LINUX struct vcache
Chas Williams (CONTRACTOR) [Sat, 30 Oct 2010 22:10:34 +0000 (18:10 -0400)]
afs: minor cleanup for LINUX struct vcache

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>
15 years agovol: attach2 must always return with VOL_LOCK held
Jeffrey Altman [Thu, 28 Oct 2010 04:37:03 +0000 (00:37 -0400)]
vol: attach2 must always return with VOL_LOCK held

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>
15 years agodown with assert, up with osi_Assert
Jeffrey Altman [Thu, 14 Oct 2010 21:24:33 +0000 (17:24 -0400)]
down with assert, up with osi_Assert

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>
15 years agorename afs/assert.h to afs/afs_assert.h
Derrick Brashear [Fri, 15 Oct 2010 20:09:27 +0000 (16:09 -0400)]
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

(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>
15 years agoRx: use osi_Assert/osi_Panic instead of assert
Jeffrey Altman [Thu, 14 Oct 2010 21:24:33 +0000 (17:24 -0400)]
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.

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>
15 years agoWindows: Cleanup build scripts; no include\afs or include\rx
Jeffrey Altman [Mon, 11 Oct 2010 19:00:08 +0000 (15:00 -0400)]
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.

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>
15 years agomake openafs 1.5.78
Derrick Brashear [Wed, 27 Oct 2010 03:28:57 +0000 (23:28 -0400)]
make openafs 1.5.78

update version strings and such

Change-Id: Ia3c8bff95ea72708d815d74a35a55d4348d560f2
Reviewed-on: http://gerrit.openafs.org/3168
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: move debug break in afsd_notifier
Jeffrey Altman [Tue, 26 Oct 2010 02:58:51 +0000 (22:58 -0400)]
Windows: move debug break in afsd_notifier

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>
15 years agorx: Fix starting of transmit timers
Simon Wilkinson [Mon, 25 Oct 2010 19:50:29 +0000 (20:50 +0100)]
rx: Fix starting of transmit timers

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>
15 years agorx: Don't let timeouts force fast recovery
Simon Wilkinson [Mon, 25 Oct 2010 09:14:12 +0000 (10:14 +0100)]
rx: Don't let timeouts force fast recovery

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>
15 years agorx: Refactor transmit queue wakeup
Simon Wilkinson [Mon, 25 Oct 2010 08:52:10 +0000 (09:52 +0100)]
rx: Refactor transmit queue wakeup

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

15 years agoWindows: Fix math error in rx_Writev processing
Jeffrey Altman [Tue, 26 Oct 2010 03:05:00 +0000 (23:05 -0400)]
Windows: Fix math error in rx_Writev processing

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3148
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e848f3c2160745228e0f770f8daf4fffcca7507a)
Change-Id: I5f31ae8500ace8e5a95f21510cb7c3eaae547aee
Reviewed-on: http://gerrit.openafs.org/3152
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Use rx_Readv / rx_Writev
Jeffrey Altman [Sun, 17 Oct 2010 04:35:36 +0000 (00:35 -0400)]
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

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>
15 years agorename some variables in rxperf
Chas Williams (CONTRACTOR) [Fri, 1 Oct 2010 13:58:52 +0000 (09:58 -0400)]
rename some variables in rxperf

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

15 years agoWindows: register idle dead timeout error
Jeffrey Altman [Mon, 14 Jun 2010 13:43:31 +0000 (09:43 -0400)]
Windows: register idle dead timeout error

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>
15 years agoWindows: Backup and restore configuration across installs
Asanka C. Herath [Mon, 18 Oct 2010 08:52:34 +0000 (04:52 -0400)]
Windows: Backup and restore configuration across installs

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>
15 years agoWindows: Make Rx PMTU discovery configurable; disable by default
Jeffrey Altman [Sat, 23 Oct 2010 19:45:36 +0000 (15:45 -0400)]
Windows: Make Rx PMTU discovery configurable; disable by default

Disable PMTU discovery by default.  Permit it to be enabled
with the RxPMTUDiscovery TransarcAFSDaemon\Parameter value.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/3032
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 2c12b80a4fdb8323ff3fdd194ff1994ad0a0b8e1)
Change-Id: Ic5b3d8e267bc10ee1802e5c391f87d37d605bec9
Reviewed-on: http://gerrit.openafs.org/3141
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Tidy up variables in RTT calc
Simon Wilkinson [Sat, 23 Oct 2010 14:07:42 +0000 (15:07 +0100)]
rx: Tidy up variables in RTT calc

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>
15 years agorx: Fix bracing on rx_clock macro arguments
Simon Wilkinson [Sat, 23 Oct 2010 14:16:17 +0000 (15:16 +0100)]
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.

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>
15 years agorx: More improvments to RTT calculation
Simon Wilkinson [Sat, 23 Oct 2010 13:51:56 +0000 (14:51 +0100)]
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.

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>
15 years agoRx: Treat rx_minPeerTimeout not as a minimum but as padding
Jeffrey Altman [Thu, 21 Oct 2010 18:13:03 +0000 (14:13 -0400)]
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.

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>
15 years agoRx: Fix socket() handling so errors are properly detected
Jeffrey Altman [Thu, 21 Oct 2010 18:23:18 +0000 (14:23 -0400)]
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.

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>
15 years agolinux fh_to_dentry can return err
Charles Hannum [Fri, 22 Oct 2010 18:50:56 +0000 (14:50 -0400)]
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.

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

15 years agoWindows: Fix i386_w2k and i386_nt40 path construction
Jeffrey Altman [Thu, 21 Oct 2010 18:09:53 +0000 (14:09 -0400)]
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.

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>
15 years agoWindows: Improve cm_SyncOpDone logging
Jeffrey Altman [Wed, 20 Oct 2010 23:35:10 +0000 (19:35 -0400)]
Windows: Improve cm_SyncOpDone logging

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>
(cherry picked from commit 64f732764cab7387943647285d5e5203f0c74218)
Change-Id: I5345fe5912afb7b41f7c27f12b3df3862f04a5de
Reviewed-on: http://gerrit.openafs.org/3121
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: remove unnecessary prototype from smb.c
Jeffrey Altman [Wed, 20 Oct 2010 23:31:19 +0000 (19:31 -0400)]
Windows: remove unnecessary prototype from smb.c

Remove rx_StartClientThread() prototype.

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>
(cherry picked from commit 5880a576273c3b5f7683937df42bacf506007ba2)
Change-Id: I0b61600b48239fbd30d8e8a13cc73fe33e4fe5df
Reviewed-on: http://gerrit.openafs.org/3120
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: optimize cm_BkgDaemon()
Jeffrey Altman [Wed, 20 Oct 2010 23:29:32 +0000 (19:29 -0400)]
Windows: optimize cm_BkgDaemon()

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>
15 years agoWindows: remove warnings from cm_daemon.c
Jeffrey Altman [Wed, 20 Oct 2010 23:28:26 +0000 (19:28 -0400)]
Windows: remove warnings from cm_daemon.c

Properly cast void * to long and int to LPVOID to avoid warnings.

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>
(cherry picked from commit dd01970f440cc68fbd71a1544ee655131f42be51)
Change-Id: If6743a5b341f40f42955638d5e2f09b3cb24924f
Reviewed-on: http://gerrit.openafs.org/3118
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: prototype cm_PerformanceTuningInit()
Jeffrey Altman [Wed, 20 Oct 2010 23:26:06 +0000 (19:26 -0400)]
Windows: prototype cm_PerformanceTuningInit()

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>
(cherry picked from commit bc810f4ac04fb6385e57d235f976d3f42f83e28a)
Change-Id: Ib328db77b9783e3d6ecae3d719c8e85952b10488
Reviewed-on: http://gerrit.openafs.org/3117
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: prototype rx_StateClienThread()
Jeffrey Altman [Wed, 20 Oct 2010 23:25:00 +0000 (19:25 -0400)]
Rx: prototype rx_StateClienThread()

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>
(cherry picked from commit 3f2f327df4d8cbac927e290d03d78611f7b12a69)
Change-Id: I04ef0f93571ca450adf4e1b33268cf9c100822b9
Reviewed-on: http://gerrit.openafs.org/3116
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRx: rx_stats_active not RXDEBUG
Jeffrey Altman [Wed, 20 Oct 2010 23:23:11 +0000 (19:23 -0400)]
Rx: rx_stats_active not RXDEBUG

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>
15 years agorx: remove spurious compare for maxDgramPackets
Chas Williams (CONTRACTOR) [Wed, 20 Oct 2010 13:06:35 +0000 (09:06 -0400)]
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.

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>
15 years agorx: Simplify round trip time calculation
Simon Wilkinson [Mon, 11 Oct 2010 17:25:38 +0000 (13:25 -0400)]
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.

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

15 years agoRx: Do not compute RTT on non-last packets of a jumbogram
Jeffrey Altman [Sat, 16 Oct 2010 17:14:03 +0000 (13:14 -0400)]
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.

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

15 years agoRx: Reject out of order ACK packets
Simon Wilkinson [Mon, 11 Oct 2010 17:14:02 +0000 (13:14 -0400)]
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.

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

15 years agoshakeloosevcaches drop xvcache during dentry ops
Derrick Brashear [Thu, 7 Oct 2010 17:41:22 +0000 (13:41 -0400)]
shakeloosevcaches drop xvcache during dentry ops

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

15 years agopts: Specifically check for group id 0
Andrew Deason [Fri, 15 Oct 2010 21:35:32 +0000 (16:35 -0500)]
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.

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>
15 years agopts: Prevent creating negative user ids
Andrew Deason [Fri, 15 Oct 2010 21:37:55 +0000 (16:37 -0500)]
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

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>
15 years agoReturn SRV record ports in network byte order
Russ Allbery [Thu, 14 Oct 2010 20:41:45 +0000 (13:41 -0700)]
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).

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>
15 years agoOSX prefspane use Kerberos Preferences for defaults
Derrick Brashear [Tue, 12 Oct 2010 13:05:24 +0000 (09:05 -0400)]
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"

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

15 years agoLinux: fix statfs configure test
Marc Dionne [Wed, 13 Oct 2010 23:11:25 +0000 (19:11 -0400)]
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.

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>
15 years agoLINUX: old kernel warning fixes
Andrew Deason [Wed, 13 Oct 2010 16:27:03 +0000 (11:27 -0500)]
LINUX: old kernel warning fixes

 - osi_vfsop.c: struct super_block, not superblock

 - osi_vnodeops.c: initialize bypasscache

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>
(cherry picked from commit ba96ebba7197420b1511bd1aae9db495398e038a)
Change-Id: I3c98809bf8763c03a6f1c27e7ebe68ddb8ad1318
Reviewed-on: http://gerrit.openafs.org/3104

15 years agodon't release Volume lightweight ref too early
Tom Keiser [Wed, 13 Oct 2010 05:10:09 +0000 (01:10 -0400)]
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.

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

15 years agorx: Don't malloc the xmit list
Simon Wilkinson [Sun, 10 Oct 2010 12:04:41 +0000 (08:04 -0400)]
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.

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>
15 years agoRx: Permit ADAPT_WINDOW code to build
Jeffrey Altman [Sun, 19 Sep 2010 17:46:34 +0000 (10:46 -0700)]
Rx: Permit ADAPT_WINDOW code to build

Add missing fields to rx data structures.

Update variable references.

Reviewed-on: http://gerrit.openafs.org/2783
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit be91260047627fb4fffeeed73c7f24c80448c673)
Change-Id: I2f5db5cc88919e61d09d5d1dbbb2679c0b9d1415
Reviewed-on: http://gerrit.openafs.org/3101

15 years agoRX: Force sane timeout values
Andrew Deason [Fri, 8 Oct 2010 16:51:30 +0000 (11:51 -0500)]
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: Ib9a0c65d91b4dc61c8d00381c8266b88b1d89b81
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>
(cherry picked from commit 7d6080a841ff8c91052fa708d5be3b582f8a971d)
Reviewed-on: http://gerrit.openafs.org/3065
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRX: Adjust all timeouts for RTT
Andrew Deason [Wed, 6 Oct 2010 22:24:02 +0000 (17:24 -0500)]
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.

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>
(cherry picked from commit 48aca4a605fa46b677a50687d6ea911fbe7d2032)
Change-Id: I1496e5bff75deeb1210eac6fba8a9a7fe70c6e5f
Reviewed-on: http://gerrit.openafs.org/3064
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoupdate fssync-debug to handle the VOL_LOCKED flag
Tom Keiser [Wed, 13 Oct 2010 06:15:36 +0000 (02:15 -0400)]
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.

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>
(cherry picked from commit 198447ee71ca6510b760141395af5002daab2424)
Change-Id: Ia0ef7444577a8fb6480302a080397ee8674245cd
Reviewed-on: http://gerrit.openafs.org/3063
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agotrailing commas make xlc a sad panda
Tom Keiser [Wed, 13 Oct 2010 05:27:56 +0000 (01:27 -0400)]
trailing commas make xlc a sad panda

IBM VAC xlc_r throws parse errors when enumeration definitions have
trailing commas; let's avoid that.

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>
(cherry picked from commit 9577ec85c967ce4eb0c5a5ab45761a25da30038a)
Change-Id: Idbd4e6521246e5f7133b4582181af856f0acc530
Reviewed-on: http://gerrit.openafs.org/3062
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoUse bigger I/O sizes for the memcache
Chas Williams (CONTRACTOR) [Thu, 7 Oct 2010 15:05:50 +0000 (11:05 -0400)]
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.

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>
(cherry picked from commit 6880d4a3a227f6c05332ef799123e0a05b190aa9)
Change-Id: I3d6ef65eeff2e59d662cd7f406bd5b8c1d3b11c6
Reviewed-on: http://gerrit.openafs.org/3061

15 years agoLINUX: Build fixes for older kernels
Andrew Deason [Thu, 7 Oct 2010 16:04:04 +0000 (11:04 -0500)]
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

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>
(cherry picked from commit e279ae77a7e9babcace78b67c40ccc959161d77a)
Change-Id: If61e12ea02d90980f2ec4b9503a26aff841161f6
Reviewed-on: http://gerrit.openafs.org/3060

15 years agorx: Don't call gettimeofday for every packet ack
Simon Wilkinson [Tue, 5 Oct 2010 20:21:38 +0000 (21:21 +0100)]
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.

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>
(cherry picked from commit e16d7b7d6a6980fbda3186a578fb7e26fc334194)
Change-Id: Ib77ea09f2b2334ccae269a5e24519cd8b0f0875a
Reviewed-on: http://gerrit.openafs.org/3059
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoFix rxperf includes
Simon Wilkinson [Mon, 11 Oct 2010 19:15:04 +0000 (15:15 -0400)]
Fix rxperf includes

Don't use raw includes for "rx.h" and friends - instead include them
from the appropriate place in our include tree.

Reviewed-on: http://gerrit.openafs.org/2962
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e95c8eaaf53dee68fe4db14acc0385a6bb84b992)
Change-Id: Ieb534d407635e79d181156f7fa6c70b6b8477e93
Reviewed-on: http://gerrit.openafs.org/3058
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: Do not issue RXAFS change RPCs on known RO volumes
Jeffrey Altman [Sat, 9 Oct 2010 07:06:07 +0000 (03:06 -0400)]
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

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>
(cherry picked from commit 7f742f45a2aaa9dcb400aa1dc35ce617876fe7fd)
Change-Id: I7e58f35956be8f1acd4ebfbd407ddde6b8bcb136
Reviewed-on: http://gerrit.openafs.org/3057
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoExtract the .version file when building the srpm file
Phillip Moore [Thu, 7 Oct 2010 23:25:09 +0000 (19:25 -0400)]
Extract the .version file when building the srpm file

If you are building the source and binary rpms from a released
tarball, instead of a real git repo, the .version file is required by
build-tools/git-version.  With out this, the version defaults to
UNKNOWN, and although the source rpm will build, it won't compile.

Reviewed-on: http://gerrit.openafs.org/2948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a2888f6d405150933bc31d1470ca2426bdf77c50)
Change-Id: I2443cced5105a0e31ffe04c156370b75e06ced97
Reviewed-on: http://gerrit.openafs.org/3056
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoRevert "FBSD: in lookup, when ISDOTDOT, unlock dvp"
Ben Kaduk [Fri, 8 Oct 2010 04:20:57 +0000 (00:20 -0400)]
Revert "FBSD: in lookup, when ISDOTDOT, unlock dvp"

This reverts commit 96e433aebdd5699f02c205df2cce38927cd19a88.

It was not properly tested, fails to compile on some systems,
and destabilizes the client.

Reviewed-on: http://gerrit.openafs.org/2951
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 50b99f85cae778ab270590d1282fd9d84a0e6ca3)
Change-Id: Ifde4220ea5f2f987b8e6f1fd3e4ba3ee93e31c8c
Reviewed-on: http://gerrit.openafs.org/3055

15 years agoAdded missing CLI argument dropped during last commit.
Phillip Moore [Tue, 5 Oct 2010 20:10:19 +0000 (16:10 -0400)]
Added missing CLI argument dropped during last commit.

Oops -- when removing the -cell arguments to the bos commands, the
"admin" username argument to "bos adduser" was mistakenly removed as
well.

Reviewed-on: http://gerrit.openafs.org/2940
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1a0239fba5855c5fed418f057bd5397d412e907)
Change-Id: Ib28e6f6ce9cced9d44cfccbb02c10289acd818e1
Reviewed-on: http://gerrit.openafs.org/3054

15 years agoFBSD: in lookup, when ISDOTDOT, unlock dvp
Ben Kaduk [Wed, 6 Oct 2010 03:30:35 +0000 (23:30 -0400)]
FBSD: in lookup, when ISDOTDOT, unlock dvp

Keeping dvp locked when vp is its parent can lead to deadlock.
Always unlock dvp, not just for 6 and earlier.

Reviewed-on: http://gerrit.openafs.org/2942
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c2ed2577f9c16df3088158fb593d7aab6e8690d0)
Change-Id: I4479a8941b8c53aed1949134e171133d338919bb
Reviewed-on: http://gerrit.openafs.org/3053

15 years agoWindows: do not leak cm_volume_t objects from LRU queue
Jeffrey Altman [Tue, 5 Oct 2010 15:32:05 +0000 (11:32 -0400)]
Windows: do not leak cm_volume_t objects from LRU queue

The LRU queue is where volume objects are recycled from.
Therefore if they are removed then they must be put back.

Remove extraneous operations from cm_AdjustVolumeLRU().

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/2913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 77456c07945659ff1254732aa8e428e6301e5ee6)
Change-Id: I0de6b6cfe1598ae09471b25a506f34bfe577c2a7
Reviewed-on: http://gerrit.openafs.org/3052
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Reduce dependence on call->lock
Simon Wilkinson [Sat, 2 Oct 2010 03:17:56 +0000 (23:17 -0400)]
rx: Reduce dependence on call->lock

This patch reduces our dependence on call->lock, by allowing more
of the reader thread to run lock free.  Doing so requires that
call->mode only be set by the reader thread.  As a result, call->mode
can only be set to RX_CALL_ERROR by rxi_CallError().  The mode is
set to RX_CALL_ERROR by the reader thread immediately after regaining
the call->lock when it has been dropped.

Reviewed-on: http://gerrit.openafs.org/2880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9)
Change-Id: I9042caf4364ce65704e3ddfde159be50d0c11c1b
Reviewed-on: http://gerrit.openafs.org/3049

15 years agoQuick Start Guide updated for RHEL rpms, and CLI syntax
Phillip Moore [Tue, 5 Oct 2010 16:46:35 +0000 (12:46 -0400)]
Quick Start Guide updated for RHEL rpms, and CLI syntax

The names of the RHEL rpms have been updated to reflect what is
actually published on openafs.org, and the CLI syntax of the commands
run using -noauth have had the unnecessary -cell options removed.

Reviewed-on: http://gerrit.openafs.org/2914
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 51c761706a9945ab40d34b4212bd463fa617636e)
Change-Id: I164fd4a1c4456ce6e8f7e90402d204cc1d2f84f3
Reviewed-on: http://gerrit.openafs.org/3051
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovolserver: Do not return ENOMEM on AIX from XVolListPartitions
Christof Hanke [Tue, 5 Oct 2010 15:01:41 +0000 (17:01 +0200)]
volserver: Do not return ENOMEM on AIX from XVolListPartitions

When calling "vos partinfo" or "vos listpart" towards a server
 running AIX with no partitions attached, it would return a
ENOMEM, because unlike on linux, malloc(0) returns NULL on AIX.
Thus, just don't do any malloc, when we have no partitions anyway.

Reviewed-on: http://gerrit.openafs.org/2912
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>
(cherry picked from commit 21e1bb9bb46b0e8e2523c3310ea8e602d2b07091)
Change-Id: I88181baf4b4b5d0078593ffb27dedfd3f761db57
Reviewed-on: http://gerrit.openafs.org/3050