]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoFinalize changes for 1.6.0~pre1-1 debian/1.6.0.pre1-1
Russ Allbery [Wed, 29 Dec 2010 20:28:08 +0000 (12:28 -0800)]
Finalize changes for 1.6.0~pre1-1

14 years agoUpdate NEWS for 1.5.78 and 1.6.0pre1
Russ Allbery [Fri, 24 Dec 2010 18:53:22 +0000 (10:53 -0800)]
Update NEWS for 1.5.78 and 1.6.0pre1

Based on the release notes.  Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate.  Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.

Reviewed-on: http://gerrit.openafs.org/3592
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 676a4efc232bc77fe20e46c2dbe45e89f89cd670)

Change-Id: I324e55c82bf2e353143368ccd4ca074a646d11d1
Reviewed-on: http://gerrit.openafs.org/3594
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4a3e5291ec08d686ca07610fdbac8d5916f27343)

14 years agoAdd changelog entry for NEWS pullup
Russ Allbery [Wed, 29 Dec 2010 18:40:29 +0000 (10:40 -0800)]
Add changelog entry for NEWS pullup

14 years agoUpdate CellServDB to 2010-12-13
Anders Kaseorg [Fri, 24 Dec 2010 22:45:59 +0000 (17:45 -0500)]
Update CellServDB to 2010-12-13

14 years agoInclude afs_compile_et in libopenafs-dev
Russ Allbery [Sat, 25 Dec 2010 03:35:39 +0000 (19:35 -0800)]
Include afs_compile_et in libopenafs-dev

* Now that upstream has renamed compile_et to afs_compile_et, include it
  in libopenafs-dev.

14 years agoUpdate libafsrpc1 symbols for upstream changes
Anders Kaseorg [Fri, 24 Dec 2010 22:29:24 +0000 (17:29 -0500)]
Update libafsrpc1 symbols for upstream changes

14 years agoDrop --enable-reduced-depends for right now
Russ Allbery [Sat, 25 Dec 2010 03:23:42 +0000 (19:23 -0800)]
Drop --enable-reduced-depends for right now

* Drop --enable-reduced-depends for right now.  aklog doesn't deal with
  it correctly.

14 years agoAdd initial changelog entry for 1.6.0~pre1-1
Russ Allbery [Sat, 25 Dec 2010 03:18:28 +0000 (19:18 -0800)]
Add initial changelog entry for 1.6.0~pre1-1

14 years agoMerge commit 'upstream/1.6.0.pre1' into experimental
Russ Allbery [Sat, 25 Dec 2010 03:03:03 +0000 (19:03 -0800)]
Merge commit 'upstream/1.6.0.pre1' into experimental

14 years agoFix module loading variable name in openafs-client init script
Russ Allbery [Sat, 25 Dec 2010 01:21:51 +0000 (17:21 -0800)]
Fix module loading variable name in openafs-client init script

$disabled is better since 1 means it is disabled.

14 years agoSupress errors when checking if kernel module loading is disabled
Russ Allbery [Sat, 25 Dec 2010 01:18:38 +0000 (17:18 -0800)]
Supress errors when checking if kernel module loading is disabled

In the openafs-client init script, suppress errors from cat if the
modules_disabled flag file in /proc/sys/kernel doesn't exist, since
this was added in 2.6.31.

14 years agoFix return status when checking if module loading is disabled
Russ Allbery [Sat, 25 Dec 2010 01:15:34 +0000 (17:15 -0800)]
Fix return status when checking if module loading is disabled

A return status of 0 is success in shell.

14 years agoFix suppression of module unloading in openafs-client init script
Russ Allbery [Sat, 25 Dec 2010 01:05:51 +0000 (17:05 -0800)]
Fix suppression of module unloading in openafs-client init script

Use consistent variable names and remove a bashism.

14 years agoImported upstream tag openafs-stable-1_6_0pre1 via tarball upstream/1.6.0.pre1
Anders Kaseorg [Fri, 24 Dec 2010 21:41:31 +0000 (16:41 -0500)]
Imported upstream tag openafs-stable-1_6_0pre1 via tarball

14 years agoAdd $named to Should-Start for openafs-client
Russ Allbery [Thu, 23 Dec 2010 01:01:34 +0000 (17:01 -0800)]
Add $named to Should-Start for openafs-client

* Add $named to Should-Start in the openafs-client init script since the
  client may do DNS lookups for the VLDB and file servers during startup
  in some situations.  (Closes: #586226)

15 years agoopenafs 1.6.0 pre1 openafs-stable-1_6_0pre1
Derrick Brashear [Thu, 16 Dec 2010 18:39:02 +0000 (13:39 -0500)]
openafs 1.6.0 pre1

make changes for prerelase 1 of 1.6.0

Change-Id: I04c61080dff4827b95b22238bfb08a26a4514955
Reviewed-on: http://gerrit.openafs.org/3536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agomacos nfs translator vnode ref fix
Derrick Brashear [Wed, 15 Dec 2010 10:22:26 +0000 (05:22 -0500)]
macos nfs translator vnode ref fix

code won't trigger today but we might as well get it right.
we already ref the vnode. don't leak refs.

Change-Id: I6752819239cd3a88e1782596554595c3e862c413
Reviewed-on: http://gerrit.openafs.org/3535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: Fix AFS_NORETURN violation with osi_AssertFailK
Anders Kaseorg [Sat, 6 Nov 2010 07:03:19 +0000 (03:03 -0400)]
Linux: Fix AFS_NORETURN violation with osi_AssertFailK

Commit d86f0c44d3c5910a6b54895484dc0286eac9bc73 changed the
AFS_LINUX26_ENV implementation of osi_AssertFailK so that it returns,
contradicting its AFS_NORETURN prototype, in an effort to make the
following BUG() display the right line number.  To fix this, move the
returning implementation into its only caller, the osi_Assert macro.

This fixes possible compiler misoptimizations due to

rx_kcommon.c:255:1: warning: ‘noreturn’ function does return

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3276
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1519144f83925d82117f31ce0872f77660f197ee)

Change-Id: I2b630a3264d04d6fbb626b7ef997da9bf081ade1
Reviewed-on: http://gerrit.openafs.org/3513
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoAdd ioctl-based AFS calls for Solaris 11
Andrew Deason [Thu, 9 Dec 2010 00:16:14 +0000 (18:16 -0600)]
Add ioctl-based AFS calls for Solaris 11

Switch from using syscall-based AFS calls to ioctl-based AFS calls,
since syscall 65 was repurposed in some kernels in Solaris 11 and
OpenSolaris. Update the provided afs init script to accomodate the
additional steps needing for starting the AFS client.

Partially based off of some work by Derrick Brashear.

Reviewed-on: http://gerrit.openafs.org/3498
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4e00fc6f0e412f438f2f72f8b427c21810d00109)

Change-Id: I4f10e0de116dc3e19b7bbcb3eb304c894a67160e
Reviewed-on: http://gerrit.openafs.org/3509
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoDARWIN: Fix setpag syscall error detection
Andrew Deason [Thu, 9 Dec 2010 19:02:16 +0000 (13:02 -0600)]
DARWIN: Fix setpag syscall error detection

Darwin uses the same variable as the return value for
ioctl_afs_syscall, and as the last 'out' parmater, so the return value
for ioctl_afs_syscall will always overwrite whatever is written to the
last 'out' parameter. Instead, record two different variables, and
allow the returned error to overridte the error set as the last
parameter.

Reviewed-on: http://gerrit.openafs.org/3497
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9da7f3cc73bf990427a9dd80ba2bbbb618383ea3)

Change-Id: I440d33e5cdd94dc5c7d12ddef1e63a05e53d787d
Reviewed-on: http://gerrit.openafs.org/3508
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoAdd afs init script for Solaris 11
Andrew Deason [Fri, 10 Dec 2010 20:43:24 +0000 (14:43 -0600)]
Add afs init script for Solaris 11

Reviewed-on: http://gerrit.openafs.org/3499
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 2cd0a1e4ff82349f8671783e40ea478096d69b56)

Change-Id: Iaf0241a8f5651dda1ad84ebb097350f0dc2bab85
Reviewed-on: http://gerrit.openafs.org/3507
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agouse computed values in src/gtx/curseswindows.c
Christof Hanke [Sun, 21 Nov 2010 19:09:23 +0000 (20:09 +0100)]
use computed values in src/gtx/curseswindows.c

compiling failed, because of -Wunused-value.
Use the return code of wstandout and wstandend and pass
it upwards.

Reviewed-on: http://gerrit.openafs.org/3344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 03ab065e0ccf291d45a93b7d63c022bcad3aac34)

Change-Id: I4623ba9c00ea19b33d73831f6f11ba2d2e32b1a0
Reviewed-on: http://gerrit.openafs.org/3511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoUKERNEL: f_fsid is a struct on AIX
Andrew Deason [Thu, 4 Nov 2010 15:57:30 +0000 (10:57 -0500)]
UKERNEL: f_fsid is a struct on AIX

The statvfs f_fsid member is a struct with two fields on AIX when
_ALL_SOURCE is defined (which we define to get various extensions). So
in the AIX case, use it as such a struct instead of a single integer.

Reviewed-on: http://gerrit.openafs.org/3260
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d6860c852296d96eac2785739bcfb9de76cd92d)

Change-Id: If8912f8cba8e12525f12f75cd53cf77bb7d4c547
Reviewed-on: http://gerrit.openafs.org/3510
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agorxi_NatKeepAliveEvent: Shrink excessive stack buffer
Anders Kaseorg [Wed, 8 Dec 2010 06:21:16 +0000 (01:21 -0500)]
rxi_NatKeepAliveEvent: Shrink excessive stack buffer

Fixes
rx.c:6138:1: warning: the frame size of 1600 bytes is larger than 1024 bytes

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3491
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 3fd789dfbdc05c7c00798bc305d743deea05e155)

Change-Id: I8b39e5d4156a99e5435f7329d7d1b3465ddcadc2
Reviewed-on: http://gerrit.openafs.org/3506
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoCellServDB update 13 Dec 2010
GCO Public CellServDB [Mon, 13 Dec 2010 15:53:05 +0000 (10:53 -0500)]
CellServDB update 13 Dec 2010

Change-Id: I5048d1932943687bc2829326e32b530b2a8a9c41
Reviewed-on: http://gerrit.openafs.org/3504
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agouse proper 64bit casting for pointer-math
Christof Hanke [Fri, 19 Nov 2010 20:30:21 +0000 (21:30 +0100)]
use proper 64bit casting for pointer-math

building with "./configure --enable-checking --enable-supergroups"
fails, because on 64bit, the casting in map.c gives a warning.
Just add another ifdef and cast according to the size of a pointer.

Reviewed-on: http://gerrit.openafs.org/3341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit acdef43d818ee56e6c1f1dc29f508c02793c8355)
Change-Id: If7dbe6f41f015025447e68eb1fc9ea14e56d6fe2
Reviewed-on: http://gerrit.openafs.org/3496
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: define llseek operations
Marc Dionne [Fri, 5 Nov 2010 21:30:02 +0000 (17:30 -0400)]
Linux: define llseek operations

With kernel 2.6.37 it is now mandatory to define the llseek operation
for files and directories.  If these are not defined, no_llseek is
called, and any attempt to seek returns ESPIPE.

Most file systems use generic_file_llseek, but it seems safer to use
default_llseek which is what the vfs used to call for us by default.
In 2.6.37 these two functions are actually functionally identical.

Reviewed-on: http://gerrit.openafs.org/3292
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit fb6b22cf77039962f22f462ee602f0e4a8153817)

Change-Id: I30890cc3ad3f1a932218b6c8aac653cf747cdf2c
Reviewed-on: http://gerrit.openafs.org/3495
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLinux: Fix prototypes for afs_xsetgroups and sys_setgroupsp and friends
Anders Kaseorg [Sat, 6 Nov 2010 07:17:17 +0000 (03:17 -0400)]
Linux: Fix prototypes for afs_xsetgroups and sys_setgroupsp and friends

Fixes some “warning: function declaration isn’t a prototype”, and
makes the prototypes consistent with the corresponding definitions.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3278
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c07b47169adb85621c328a3687ea62ef84e43bb1)

Change-Id: Ia91a598fc4b25f5fd7f29aed38a7caa3437ffc89
Reviewed-on: http://gerrit.openafs.org/3490
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agomodify FindIndex to compare uuids
Jeffrey Altman [Tue, 7 Dec 2010 04:24:18 +0000 (23:24 -0500)]
modify FindIndex to compare uuids

If FindIndex is provided a server address and entry has a valid
uuid, obtain the uuid for 'server' and use that search for a
matching entry.

This modification is necessary in order to permit operations
against multi-homed servers in split horizon DNS configurations.

Reviewed-on: http://gerrit.openafs.org/3468
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9aad0979e9ff0601c249eb66a6ecfb3e76264702)
Change-Id: If819975bd24e29da1142531c3f0eb27755e65afb
Reviewed-on: http://gerrit.openafs.org/3489

15 years agoConvert from using nvldbentry to uvldbentry
Jeffrey Altman [Sun, 6 Jun 2010 15:03:44 +0000 (11:03 -0400)]
Convert from using nvldbentry to uvldbentry

The support routines relied upon by vos use the older nvldbentry
data structures which do not include the UUID for the server.
This patchset updates the code to use the uvldbentry structure
so that a future patchset can make use of UUID values when available.

Any functions from vsprocs.c which are referenced by vos.c are
considered public.  This includes all of the VL_xxxx, UV_xxxx
and Lp_xxxx functions, the EnumerateEntry, SubEnumerateEntry, and
host mapping functions.  For any which references an nvldbentry as a
parameter a new 'U' version is created that accepts a uvldbentry.
These new 'U' functions are then used throughout vos.c and the internal
routines.

Reviewed-on: http://gerrit.openafs.org/2089
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4f1efdc8b73ed734197925766530d033c6f9794a)
Change-Id: I85c8f56b706f5ad335968f3f9857b284a28024ef
Reviewed-on: http://gerrit.openafs.org/3488
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovolser: Do not FSYNC_VOL_DONE temporary volumes
Andrew Deason [Thu, 30 Sep 2010 16:34:59 +0000 (11:34 -0500)]
volser: Do not FSYNC_VOL_DONE temporary volumes

Currently, the volserver just looks at the destroyMe field in a volume
header to see if it should tell the fileserver a volume has been
deleted (FSYNC_VOL_DONE opcode). However, temporary volumes created by
the volserver (such as new volumes or clones) have destroyMe set, but
are obviously not deleted, and so the fileserver should just be told
FSYNC_VOL_LEAVE_OFF about these volumes instead.

With commit bb9caf9822a53ad07cd3a5d6cea7f6b7eeeedd59, FSYNC_VOL_DONE
and FSYNC_VOL_LEAVE_OFF actually do different things, so this does
make a difference.

Note that this commit slightly changes the meaning of the
vp->needsPutBack field. Now it must be set to VOL_PUTBACK_DELETE to
tell the fileserver that the volume has been deleted, and set to
VOL_PUTBACK if it just needs to be given back to the fileserver.

Reviewed-on: http://gerrit.openafs.org/2872
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5988923898e15cb50d550e54119869b38cb5bc5b)
Change-Id: I1cbc48537a0b038838a8bc102842b05195d685c3
Reviewed-on: http://gerrit.openafs.org/3481

15 years agovol: Do not give back not-checked-out vols
Andrew Deason [Fri, 5 Nov 2010 21:48:28 +0000 (16:48 -0500)]
vol: Do not give back not-checked-out vols

VAttachVolumeByName_r has logic to give back a volume over FSSYNC if
we checked out a volume but failed to attach it for whatever reason.
However, the logic used for determining if the volume was checked out
or not is a bit inaccurate (even moreso than the comments imply),
potentially causing us to VOL_ON volumes that don't exist at all.

Instead of trying to guess based on various conditions whether or not
we checked out the volume, keep track of a variable that is only set
when we actually checkout the volume from the fileserver. Then only
give back the volume if it is set.

Reviewed-on: http://gerrit.openafs.org/3274
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e890f090e11d09b6e6b929642cbd92a56fb6e66e)
Change-Id: I3f42b2c0f54f30989f7a1a3fd18171deb4b814f1
Reviewed-on: http://gerrit.openafs.org/3480

15 years agoDAFS: Do not let VScheduleSalvage_r free vp
Andrew Deason [Fri, 5 Nov 2010 19:34:05 +0000 (14:34 -0500)]
DAFS: Do not let VScheduleSalvage_r free vp

In VScheduleSalvage_r, we were calling VCancelReservation_r, which has
the possibility of free'ing vp. Since we still use vp after doing this
(and since we're already inside VCancelReservation_r to begin with),
we must not free vp. Instead, just decrement nWaiters without
triggering any of the dtor code in VCancelReservation_r. This is safe
as long as all VScheduleSalvage_r callers ensure that they check to
free the vp if necessary, which they all do.

Thanks to Derrick Brashear.

Reviewed-on: http://gerrit.openafs.org/3272
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ef4b9e13ef6a79d7e5f540297e486189fdedf085)
Change-Id: I2f49d5eb6f9bad2343ee9a9c84ccbc1f323cc8a8
Reviewed-on: http://gerrit.openafs.org/3479

15 years agotweak afs server conn error handling
Derrick Brashear [Tue, 7 Dec 2010 05:34:11 +0000 (00:34 -0500)]
tweak afs server conn error handling

a bug in a 1.6 pullup of be770d4336c2fd7b8a83f18577ae6bb23a3f3e99,
properly mark servers down for rx errors except OPCODE

pulled up and failed to push edited change.

Change-Id: I329ab83646c30597548b08d5ed0a4f1f6cd3115d
Reviewed-on: http://gerrit.openafs.org/3470
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoafsd: Pass cacheMountDir to aix_vmount
Andrew Deason [Thu, 4 Nov 2010 15:33:17 +0000 (10:33 -0500)]
afsd: Pass cacheMountDir to aix_vmount

cacheMountDir is no longer global, so aix_vmount() needs it passed as
an argument. Do so.

Reviewed-on: http://gerrit.openafs.org/3259
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8401d0281f833638c1cfc5cb862d77fe97232ecb)
Change-Id: I2bd574981d6a63fca88f1a635db09521f6347e9f
Reviewed-on: http://gerrit.openafs.org/3461

15 years agoFBSD: clean up rx_socket teardown
Ben Kaduk [Sun, 28 Nov 2010 04:25:03 +0000 (23:25 -0500)]
FBSD: clean up rx_socket teardown

We had previously been waiting for the SO_ISDISCONNECTED flag
to show up in the so_state field, but the flags are not really
used for stateless protocols such as UDP, and that flag never
shows up.  Even with a full three-second wait, the rxk_Listener
sometimes still failed to fully terminate, preventing the reuse
of the rx port for a restarted afsd.
Copy from Solaris and loop until rxk_ListenerPid is zero, doing
bogus one-byte NetSends in the body of the loop.

Reviewed-on: http://gerrit.openafs.org/3391
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 622403c87a8cbcedcd1212fd32414285d103887b)

Change-Id: Ic5cfc4db2ff5b55730de31832b64bc1bf0696767
Reviewed-on: http://gerrit.openafs.org/3459
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoFBSD: warning cleanups
Ben Kaduk [Sat, 30 Oct 2010 06:23:24 +0000 (02:23 -0400)]
FBSD: warning cleanups

Only declare 'p' if it will be used; other unused variables;
signedness mismatches.

Kill spl with fire.

Reviewed-on: http://gerrit.openafs.org/3200
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ebd18bfade80bd66422aad4310375ee460cd1ed5)

Change-Id: Iac808cf603043a8996f1c8657765ef8a0a7e6d88
Change-Id: I163a4314a0598eec9a514bbc564d8dc2ff91acae
Reviewed-on: http://gerrit.openafs.org/3458
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCatch up on FBSD releases
Ben Kaduk [Sat, 27 Nov 2010 04:28:50 +0000 (23:28 -0500)]
Catch up on FBSD releases

Add param.foo.h and sysname entries for the past and forthcoming
FreeBSD 7.2, 7.3, 7.4, and 8.2 releases.  Also update the
MakefileProto.FBSD.ins that need touching, simplifying the libuafs
one in the process.

Reviewed-on: http://gerrit.openafs.org/3389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a4e4ed9de93d202d21cab4c40d37fcfacc85694e)
Change-Id: Icccc9f116c707a9af776f59231fc4999865b6344
Reviewed-on: http://gerrit.openafs.org/3457
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoproperly mark servers down for rx errors except OPCODE
Derrick Brashear [Mon, 6 Dec 2010 18:55:22 +0000 (13:55 -0500)]
properly mark servers down for rx errors except OPCODE

if we get a negative (rx) error, it means the server is down,
*except* for RXGEN_OPCODE. make this handling consistent
(cherry picked from commit be770d4336c2fd7b8a83f18577ae6bb23a3f3e99)

Change-Id: I97f161e19140591c304e748eead8dcc46852f94a
Reviewed-on: http://gerrit.openafs.org/3456
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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 agoDon't attempt stop if module unloading is disabled
Russ Allbery [Tue, 2 Nov 2010 17:15:21 +0000 (10:15 -0700)]
Don't attempt stop if module unloading is disabled

* In the openafs-client init script, don't attempt to stop or restart
  the AFS client if module loading is disabled.  Stopping afsd without
  unloading the module would leave the system in an inconsistent state.

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>