openafs.git
7 years agoCatch up to FreeBSD non-MPSAFE deorbit
Ben Kaduk [Wed, 7 Nov 2012 15:08:33 +0000]
Catch up to FreeBSD non-MPSAFE deorbit

All filesystems must have their own locking now.
We have been MPSAFE for quite some time, but the preprocessor macro
"MPSAFE" has been removed and we must catch up in order to compile.

The MNTK_MPSAFE macro has not yet been removed, but it is toothless
now, so we can preemptively stop using it.

Change-Id: I9d9090fd1afc020670a0cf874baacf483fd34915
Reviewed-on: http://gerrit.openafs.org/8366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoopr: Add Windows stuff for dict.c/h
Simon Wilkinson [Thu, 1 Nov 2012 20:42:58 +0000]
opr: Add Windows stuff for dict.c/h

The NTMakefile changes were omitted from the patch which added
opr/dict.h for Unix. Add them here.

Change-Id: I240b40116aed83dcf232a1d741d0ef7b442bf6f7
Reviewed-on: http://gerrit.openafs.org/8358
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Use MountRoot for Absolute Symlinks
Jeffrey Altman [Thu, 1 Nov 2012 00:59:30 +0000]
Windows: Use MountRoot for Absolute Symlinks

Replace the absolute symlink processing in AFSLocateName().
Implement AFSIsAbsoluteAFSName() to test whether or not the
path is in fact an absolute /afs path by comparing the input
string to the registry MountRoot value which specifies the
case sensitive root path for all absolute symlinks stored
in the AFS cell.

If a symlink target path begins with a directory separator
and is not an absolute afs path name, return an error.

Construct the substitution string using the target path
without the MountRoot prefix.

Add functionality to AFSRedir.sys to read the MountRoot
from the registry and pass it on to AFSRedirLib.sys.

Change-Id: Ie1df24da1e6de257c73dc34c80a75288bad47d29
Reviewed-on: http://gerrit.openafs.org/8353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoconfigure: check for poll()
Derrick Brashear [Thu, 1 Nov 2012 18:15:27 +0000]
configure: check for poll()

if we have code which uses HAVE_POLL, check for poll().

Change-Id: I1baf61541b243f82b3acca112db2cbbca813182b
Reviewed-on: http://gerrit.openafs.org/8357
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoopr: Add dictionary implementation
Simon Wilkinson [Tue, 30 Oct 2012 11:25:02 +0000]
opr: Add dictionary implementation

Add a simple implementation of a dictionary/hash structure based around
opr queues and the jhash hashing function.

Change-Id: I4ae5cafcef377b05c8caa7c455737a992b1d36cd
Reviewed-on: http://gerrit.openafs.org/8355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoopr: Add opr_jhash_int2 function
Simon Wilkinson [Mon, 29 Oct 2012 19:02:03 +0000]
opr: Add opr_jhash_int2 function

Add a function to jhash that can be used to hash a pair of unsigned
integers (or other stuff that can cast to them) without having to build
up an array.

Provide a couple of tests for the new function

Change-Id: I594848f64316fb459eff565933691f560512ca79
Reviewed-on: http://gerrit.openafs.org/8354
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agotests: Fix fallout from cleanup change
Simon Wilkinson [Thu, 1 Nov 2012 17:38:45 +0000]
tests: Fix fallout from cleanup change

The change to cleanup temporary files after tests
(0c3670914a05c7aa33f0b1239ba9cc25f430ed04) broke all attempts
to run the tests using libwrap, as it would cause libwrap to run
the binary named "MAKECHECK=1"

Move the variable defintion before the libwrap invocation to fix this.

Change-Id: I330267c9b53483abccf43d60a7dc8f8d973c3959
Reviewed-on: http://gerrit.openafs.org/8356
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoWindows: cm_ConnByServer increment under lock
Jeffrey Altman [Wed, 31 Oct 2012 16:04:50 +0000]
Windows: cm_ConnByServer increment under lock

Incrementing the cm_conn.refCount must be performed while holding
the cm_connLock in order to prevent cm_GCConnections() from
seeing an in-use object as having a zero count.

Change-Id: Ifaa755ef0f04f3bf64223434dfc518bc73d01d4d
Reviewed-on: http://gerrit.openafs.org/8347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: cm_FindVolumeByName refactoring
Jeffrey Altman [Wed, 31 Oct 2012 13:53:57 +0000]
Windows: cm_FindVolumeByName refactoring

The cm_volume allocation within cm_FindVolumeByName() was racy.
Given how locks were obtained and dropped it was possible for two
threads to both determine that a cm_volume_t object needed to be
allocated.  It might even have been possible for two threads to
attempt to allocate the same object.

This refactoring ensures that if a volume cannot be found under
a read lock that a second search is performed under the write lock
in case the object had in fact been allocated during the transition.

Once it is determined that an allocation is required, the cm_volumeLock
is not dropped until the object has been built and inserted into the
name hash table.   This ensures that two threads cannot attempt to
allocate a cm_volume object for the same volume group.

InterlockedIncrement is used to manage the cm_data volume count.

Change-Id: I64c07cbc0f7968c5580478ff33214f67088072f8
Reviewed-on: http://gerrit.openafs.org/8346
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: use cm_GetVolume / cm_PutVolume
Jeffrey Altman [Wed, 31 Oct 2012 13:52:23 +0000]
Windows: use cm_GetVolume / cm_PutVolume

Instead of locally incrementing and decrementing the cm_volume
refCount field use cm_GetVolume and cm_PutVolume.  Doing so makes
it easier to see if there is an imbalance.

Change-Id: Id62e42a74a9b1d9865a00dae177550a93e6e0f08
Reviewed-on: http://gerrit.openafs.org/8345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Interlocked ops for cell and scache allocation
Jeffrey Altman [Wed, 31 Oct 2012 13:50:34 +0000]
Windows: Interlocked ops for cell and scache allocation

Replace foo++ with InterlockedIncrement for cm_data cell and scache
counters which are used for allocating objects.

Change-Id: I09d2a536ef559d6d5873a3fdead4c8580bc93a0c
Reviewed-on: http://gerrit.openafs.org/8344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Do not flush dirty bufs to deleted FID
Jeffrey Altman [Wed, 31 Oct 2012 01:54:20 +0000]
Windows: Do not flush dirty bufs to deleted FID

If the FID is known to have been deleted, drop all dirty data
returned from the redirector on the floor.

Change-Id: I8b9a1a69d632d7243bdbcfedb5329558e0004d2e
Reviewed-on: http://gerrit.openafs.org/8343
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agolinux: bypass readpages should update nocache read parms
Hartmut Reuter [Thu, 18 Oct 2012 13:38:50 +0000]
linux: bypass readpages should update nocache read parms

the nocache read parms need to have the offset updated during a bypass
readpages request

Change-Id: Iced321e6eeab7fd784c5ccb871fcda7ff9c7493d
Reviewed-on: http://gerrit.openafs.org/8254
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>

7 years agoptserver: Avoid inet_ntoa
Andrew Deason [Tue, 23 Oct 2012 20:47:06 +0000]
ptserver: Avoid inet_ntoa

The ptserver uses inet_ntoa in a few places, such as for calculating
host CPS. This isn't safe in pthreaded environments, so use
afs_inet_ntoa_r instead.

Change-Id: I84cdf606ffd44d2d87c0db509af0950a6547364e
Reviewed-on: http://gerrit.openafs.org/8287
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoFix mutex assertion
Simon Wilkinson [Sun, 21 Oct 2012 19:07:44 +0000]
Fix mutex assertion

RX mutexes have two mechanisms for asserting ownership of a mutex:
MUTEX_ISMINE, which returns true if the caller is the owner of the
mutex in question, and osirx_AssertMutex which fires an assertion if
the calling thread doesn't own a specified mutex.

Neither of these work with pthread mutexes on all platforms, and the
kernel support for MUTEX_ISMINE is dubious in places. Because in some
implementations, MUTEX_ISMINE tries to lock the mutex in question, a
failing call to MUTEX_ISMINE can lead to the process holding an
additional, unexpected, lock.

This patch reworks all of this, and uses the new opr mutex framework
so that we can do mutex assertions in userspace, too. We remove the
unsafe MUTEX_ISMINE macro, and replace it with MUTEX_ASSERT which
simply asserts if the specified mutex is not held by the current
thread. osirx_AssertMutex is removed as it is now redundant.
MUTEX_ASSERT will always work in kernel code.

For userspace, we provide opr_mutex_assert, which is implemented using
POSIX error checking mutexes. As error checking mutexes have a runtime
overhead, this is only available when configured with
--enable-debug-locks, the rest of the time calls to opr_mutex_assert are
no-ops.

Change-Id: I285ee2b558389fa3d63b786e4bc4420fa2126c80
Reviewed-on: http://gerrit.openafs.org/8282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Move kernel assertion macros
Simon Wilkinson [Sun, 21 Oct 2012 20:19:40 +0000]
rx: Move kernel assertion macros

Move the kernel assertion macros out of rx_prototypes.h and into
rx_kernel.h. This solves an ordering problem if these macros are to
be used from src/rx/<arch>/*.h

Change-Id: I5f11e0802b3d25c1c32a2c646a35c0b59422ab3d
Reviewed-on: http://gerrit.openafs.org/8283
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agotests: cleanup temporary files
Marc Dionne [Wed, 19 Sep 2012 23:14:31 +0000]
tests: cleanup temporary files

Call the configuration directory cleanup function before exiting
so there are no files left behind, even in case of error.

Add KeyFileExt to the list of files that are removed.

Change-Id: Ie795bef0d44609b36950970244c02a6c6da1a843
Reviewed-on: http://gerrit.openafs.org/8142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agolinux: fix cache bypass applicability function
Hartmut Reuter [Thu, 18 Oct 2012 11:00:18 +0000]
linux: fix cache bypass applicability function

don't allow cache bypass if execsOrWriters is true

don't trigger cache bypass based on being larger than the
"disabled" value of -1.

Change-Id: Ic174b133e5da3e9215465c9c2705c25e81a8beca
Reviewed-on: http://gerrit.openafs.org/8248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLinux: remove unused afs_set_name inline functions
Marc Dionne [Mon, 29 Oct 2012 23:11:23 +0000]
Linux: remove unused afs_set_name inline functions

These were used in an earlier version of the patch that got merged.

Change-Id: Ifc5ba94392a394d0fb55c31051b4b74211cfc1f0
Reviewed-on: http://gerrit.openafs.org/8332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoAdd opr/lock.h and tidy locking macros
Simon Wilkinson [Sat, 20 Oct 2012 22:14:41 +0000]
Add opr/lock.h and tidy locking macros

The MUTEX_* and CV_* macros leaked from RX a while ago - they mean
that most of the pthreaded tree has a dependency on RX, as well as
further confusing the difference between userspace and kernel.

Tidy all of this up so that we have opr_mutex_* and opr_cv_* macros
to handle portable locking, and use these throughout the userspace
tree. Only kernel code should now use MUTEX_* and CV_*.

Provide opr/lockstub.h as a header that can be used by non-pthreaded
code to easily stub out these functions.

Change-Id: I24be525c7667641134d50561ce7f1e2d752cdf1f
Reviewed-on: http://gerrit.openafs.org/8280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Move transmit queue clearing
Simon Wilkinson [Fri, 26 Oct 2012 14:37:52 +0000]
rx: Move transmit queue clearing

When the client receives a data packet from the server, it means that
the server has completed processing the client's request. This, in turn,
implies that the transmit queue can be cleared. However, we were doing
this with every incoming data packet.

Move the transmit queue clearing to the code which handles the rest of
the data packet, and make the function only run if the transmit queue
is non-empty.

Now that there's no client specific logic in the ReceiveCall section,
clean up this code to reduce duplication.

Change-Id: Ia4f9024720c676cbcc6d8426d4b94a0acded20bc
Reviewed-on: http://gerrit.openafs.org/8301
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agorx: Refactor code to acknowledge a whole TX queue
Simon Wilkinson [Fri, 26 Oct 2012 14:23:48 +0000]
rx: Refactor code to acknowledge a whole TX queue

We acknowledge a whole transmit queue whenever an ACKALL packet is
received, or whenever the call changes direction. As the same logic
is used in both locations, pull it out into a common helper function.

Change-Id: Ia91b037c73cc0dd612ebbd0bd38ec171ec7c96a5
Reviewed-on: http://gerrit.openafs.org/8300
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agorx: Remove duplicate out of order ACK check
Simon Wilkinson [Fri, 26 Oct 2012 13:55:02 +0000]
rx: Remove duplicate out of order ACK check

Once we've moved the congestion window, there's no going back. So
any ACK packets that attempt to move the window backwards by including
a 'firstPacket' value earlier than the current window position must
be ignored.

However, we check (and ignore) these packets twice. Once in
rxi_ReceivePacket, which only checks in the client side case, and again
in rxi_ReceiveAckPacket, which has a more complete check that runs for
both client and server connections.

Remove the identical check from rxi_ReceivePacket in a continuing effort
to clean up this bit of code.

Change-Id: I090bc289848d0797860f46aec5877ad07fcc9b82
Reviewed-on: http://gerrit.openafs.org/8299
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agorx: Remove duplicate security layer check
Simon Wilkinson [Fri, 26 Oct 2012 13:52:46 +0000]
rx: Remove duplicate security layer check

rxi_FindConnection checks that the connection it returns has a
security layer matching that of the incoming packet. Don't duplicate
this check within the rxi_ReceivePacket code.

Change-Id: I03e7d50ecf84f638d8e222d77defc25b8a58627a
Reviewed-on: http://gerrit.openafs.org/8298
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Refactor rxi_ReceivePacket call selection
Simon Wilkinson [Fri, 26 Oct 2012 13:50:51 +0000]
rx: Refactor rxi_ReceivePacket call selection

Refactor the call selection logic in rxi_ReceivePacket so that it is
a little bit easier to follow, and better optimised to the common case.

Split the current logic into a function for packets being received by
a server, and a function for packets being received by a client.

Change-Id: Ie27de7952cc13fa3b92619cfe68e671e6d5e170c
Reviewed-on: http://gerrit.openafs.org/8297
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Don't build a call to immediately abort it
Simon Wilkinson [Fri, 26 Oct 2012 11:21:41 +0000]
rx: Don't build a call to immediately abort it

If the server is over the busy threshold, then don't create a new
call structure just to be able to send an abort on that call. Instead,
use rx_SendRawAbort to send an abort packet on the appropriate channel.

Change-Id: I02782fc25fe8ed7608b39e3f8355e2793f7526e3
Reviewed-on: http://gerrit.openafs.org/8296
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Remove unreachable debug statement
Simon Wilkinson [Thu, 25 Oct 2012 12:34:33 +0000]
rx: Remove unreachable debug statement

ReceivePacket has a dpf which is conditional on the packet having a
zero callnumber. However, just before we reach this debug statement,
we always return if the header doesn't have a call number included.

So, the debug statement can never run. Just remove it, as it's
potentially confusing.

Change-Id: I5fad9f39c9a0c4aac50853aaf4f853b9f7715e61
Reviewed-on: http://gerrit.openafs.org/8295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Always provide rxi_WaitForTQBusy
Simon Wilkinson [Thu, 25 Oct 2012 11:01:04 +0000]
rx: Always provide rxi_WaitForTQBusy

Move the prototype for rxi_WaitForTQBusy to rx_internal.h, and always
provide it (as a prototype for RX_ENABLE_LOCKS, and as a no-op for lwp).

Remove all of the #ifdef RX_ENABLE_LOCKS around rxi_WaitForTQBusy calls.

Change-Id: I6c2b943d6d06bf19d3cb4495201d278e3900b6ef
Reviewed-on: http://gerrit.openafs.org/8294
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoWindows: Set Server Prefs recalc immediately
Jeffrey Altman [Mon, 29 Oct 2012 16:59:14 +0000]
Windows: Set Server Prefs recalc immediately

When processing the set server preferences pioctl call cm_RankServer()
to update the server preference value reported by "getserverprefs"
in addition to cm_ChangeRankVolume() or cm_ChangeRankCellVLServer().

Change-Id: Iacd8d30865286c39a7cc02e2f659b8c684f8f4a4
Reviewed-on: http://gerrit.openafs.org/8328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: mark server reference offline for VOFFLINE
Jeffrey Altman [Mon, 29 Oct 2012 14:33:18 +0000]
Windows: mark server reference offline for VOFFLINE

cm_Analyze() was not marking the cm_ServerRef_t reference to
a volume instance as srv_offline in response to a VOFFLINE error.
As a result the same volume instance is tried again and again.

Change-Id: Ic467f41e96408281e6251a796d2dfba3245bb023
Reviewed-on: http://gerrit.openafs.org/8326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoRevert "Windows: Media Protected if create on RO volume"
Jeffrey Altman [Mon, 29 Oct 2012 13:19:13 +0000]
Revert "Windows: Media Protected if create on RO volume"

This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443.

Returning STATUS_MEDIA_WRITE_PROTECTED in preference to
STATUS_OBJECT_NAME_COLLISION when the file results in silent
failures by some applications (ie, Firefox.exe) when the
first directory in the path below the share name is the
root of a .readonly volume.

FIXES 131416

Change-Id: I342d9ff09ef68615371cf9d372f38fac854ed6c0
Reviewed-on: http://gerrit.openafs.org/8325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agorx: MUTEX_* are no-ops when !RX_ENABLE_LOCKS
Simon Wilkinson [Thu, 25 Oct 2012 10:57:22 +0000]
rx: MUTEX_* are no-ops when !RX_ENABLE_LOCKS

Remove any occurences of
    # ifdef RX_ENABLE_LOCKS
    MUTEX_ENTER(&mutex)
    # endif

and similar for MUTEX_INIT, MUTEX_DESTROY and MUTEX_EXIT, as all of
these operations are no-ops when RX_ENABLE_LOCKS isn't defined.

Change-Id: Ic0f27b42d56ae4362ff095f1f08a06575c4ca2c1
Reviewed-on: http://gerrit.openafs.org/8293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Get rid of AFS_GLOBAL_RXLOCK_KERNEL
Simon Wilkinson [Thu, 25 Oct 2012 10:49:55 +0000]
rx: Get rid of AFS_GLOBAL_RXLOCK_KERNEL

Get rid of the AFS_GLOBAL_RXLOCK_KERNEL #define. RX used to have a
single global lock locking mode, but none of our kernel modules use
it any more. In fact, AFS_GLOBAL_RXLOCK_KERNEL is now only defined
when RX_ENABLE_LOCKS is also defined. Simplify the code by renaming
all of the occurrences of AFS_GLOBAL_RXLOCK_KERNEL as RX_ENABLE_LOCKS,
and remove any cases where we're now doing unecessary tests

Change-Id: I061d8d364c61168370b223cdac48ad161f0c9d74
Reviewed-on: http://gerrit.openafs.org/8292
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Don't have 2 different protos for rxi_CheckCall
Simon Wilkinson [Thu, 25 Oct 2012 10:32:03 +0000]
rx: Don't have 2 different protos for rxi_CheckCall

Use a single prototype for rxi_CheckCall in both the pthread and
lwp cases. Remove the #ifdef maze at the call sites, and take advantage
of the fact that MUTEX_EXIT reduces to an empty string in the lwp
case.

Change-Id: Iaa8c1b983f1c8372e9c2e1b90aaef25a2bc5f81f
Reviewed-on: http://gerrit.openafs.org/8291
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Don't double check conn->call
Simon Wilkinson [Thu, 25 Oct 2012 10:27:33 +0000]
rx: Don't double check conn->call

We currently have

call = conn->call[channel]
if (call) {
   ...
} else {
    call = conn->call[channel]
    if (call) {
       ...
    }
}

As we don't drop (or acquire) any locks between the first and the
second check of call, there's no way that the result can be different
from the first time we checked. So just get rid of the uneccessary
code, and reindent the following block to match.

Change-Id: If21a1d0af461fe0c0651e713dfb99a7c5f01cba4
Reviewed-on: http://gerrit.openafs.org/8290
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Move bytesSent + bytesRcvd into app only data
Simon Wilkinson [Tue, 23 Oct 2012 18:21:09 +0000]
rx: Move bytesSent + bytesRcvd into app only data

The call->bytesSent and call->bytesRcvd counters are only manipulated
by the application thread in running calls. Move them into the app-only
section of the call structure so this is clear.

Change-Id: Ib7929a8e34bcb70c8cb9c1f89544adce0d627299
Reviewed-on: http://gerrit.openafs.org/8288
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Don't use app-thread variable in SendXmitList
Simon Wilkinson [Tue, 23 Oct 2012 12:35:43 +0000]
rx: Don't use app-thread variable in SendXmitList

The value of call->app.mode is changed by the application thread
without taking the call lock. Instead of using this variable in
SendXmitList to determine whether the queue should be flushed, add
a new flag (RX_CALL_FLUSH) to control flushing behaviour.

As call->flags is manipulated under the call lock, its value can
be safely used by SendXmitList.

Change-Id: I8416697f457e5003af08a35ac08809512b03a9be
Reviewed-on: http://gerrit.openafs.org/8286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Make lock-free call data explicit
Simon Wilkinson [Tue, 23 Oct 2012 11:41:07 +0000]
rx: Make lock-free call data explicit

For speed, the application thread accesses a number of elements of
the call structure without holding the call lock. This is safe, as
long as the application thread is the only place in which these
items of data are accessed.

Make this distinction explicit by creating a new structure to hold
all of these fields, and include this structure within the rx_call.

This turns up one place in the code (SendXmitList) which accesses an
application private piece of data in the listener and event threads.
A forthcoming patch will fix this.

Change-Id: I7b5ffb8b5ce68a2186e37ae64461fe356a40603e
Reviewed-on: http://gerrit.openafs.org/8285
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoWindows: Makefile dependencies
Jeffrey Altman [Sat, 6 Oct 2012 21:34:52 +0000]
Windows: Makefile dependencies

Permit "afsrdr" and "extra" to be built without the rest of
the tree by making them depend on "config".

Change-Id: I52e484f64d02e7f9b136164e10accdc981835ec0
Reviewed-on: http://gerrit.openafs.org/8321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Send all \\AFS\PIPE to afsd_service
Jeffrey Altman [Mon, 6 Aug 2012 16:19:26 +0000]
Windows: Send all \\AFS\PIPE to afsd_service

Anytime there is a pipe service request, forward it to the
afsd_service.exe and permit the service to manage the request.
The prior implementation resulted in STATUS_FILE_NOT_FOUND errors
being delivered when an unexpected service was requested.

Change-Id: I2ae9c45db787c0cb422fa3fecdfb235631927415
Reviewed-on: http://gerrit.openafs.org/8320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Treat EIO from file server as fatal error
Jeffrey Altman [Wed, 26 Sep 2012 05:51:37 +0000]
Windows: Treat EIO from file server as fatal error

Return STATUS_DISK_OPERATION_FAILURE to caller when a file
server fails an RPC with EIO.  Previous behavior was to retry
the request indefinitely.

Change-Id: I8fa3dbc92dda4e50e1331ad350dd697092f26985
Reviewed-on: http://gerrit.openafs.org/8319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: ObjectInfo RefCount 0 <-> 1 transitions
Jeffrey Altman [Fri, 19 Oct 2012 15:26:21 +0000]
Windows: ObjectInfo RefCount 0 <-> 1 transitions

When the reference count transitions from 0 <-> 1 ensure that the
ObjectInfoLock is held exclusive to prevent the current thread from
altering the state while another thread is holding the ObjectInfoLock
shared in order to conditionally perform an action based upon
the the reference count being zero.

Change-Id: I5bcf384a0ea90e4896e55b537e92112ac3791a4c
Reviewed-on: http://gerrit.openafs.org/8257
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: PrimaryVolumeWorker ObjectInfoLock deadlock
Jeffrey Altman [Thu, 25 Oct 2012 22:42:11 +0000]
Windows: PrimaryVolumeWorker ObjectInfoLock deadlock

Patchset eaad522651a81f20eac4966a55a731e0e59e39dd inadvertently
introduced a deadlock with invalidation requests from the service.
It is not safe to hold the ObjectInfoLock resource across calls
to AFSCleanupFcb().  Instead of holding the lock obtain a reference
to the ObjectInformationCB.

Change-Id: I048401ec3e432c05c8a72251ef1e32442974256d
Reviewed-on: http://gerrit.openafs.org/8308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSCleanup re-organization
Jeffrey Altman [Thu, 25 Oct 2012 18:33:29 +0000]
Windows: AFSCleanup re-organization

Reorganize the activities of the AFSCleanup() for File FCBs
so that the Fcb Resource can be dropped prior to issuing the
cleanup request to the cache manager.   The cache manager can
block for a long period of time while flushing data and holding
the Fcb resource blocks all subsequent CreateFile requests.

Change-Id: Ieaf3653ebf487670bce1043e73be093eb77a8736
Reviewed-on: http://gerrit.openafs.org/8307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSCleanup Flush Data decision
Jeffrey Altman [Thu, 25 Oct 2012 18:31:14 +0000]
Windows: AFSCleanup Flush Data decision

AFSCleanup() should instruct the cache manager to flush dirty
data when the Context Control Block indicates that the handle
being closed was opened for writing and was granted appropriate
permissions.   The decision to flush should not be dependent on
the open handle count because the last handle might belong to
an authentication group that does not have write permission.

Change-Id: I4e181616f1c8eba9e4c6184e2035d9f6cbaba1d0
Reviewed-on: http://gerrit.openafs.org/8306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: buf_DirtyBuffersExist return value
Jeffrey Altman [Thu, 25 Oct 2012 18:12:42 +0000]
Windows: buf_DirtyBuffersExist return value

buf_DirtyBuffersExist() should return 'found' not '0'.

Change-Id: I037ce37d5fc8a63f563ded196925af930434fb16
Reviewed-on: http://gerrit.openafs.org/8305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSMarkDirty() require ExtentsResource held
Jeffrey Altman [Tue, 23 Oct 2012 00:40:21 +0000]
Windows: AFSMarkDirty() require ExtentsResource held

Instead of dynamically testing if the ExtentsResource is held
and if not acquire it within AFSMarkDirty(), simply require that
it be held.  AFSMarkDirty() is only called from one location.

Change-Id: If30fc05fead4c9e0604555239e9b862659de3e8b
Reviewed-on: http://gerrit.openafs.org/8304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSFlushExtents QueuedFlushCount leak
Jeffrey Altman [Tue, 23 Oct 2012 00:34:59 +0000]
Windows: AFSFlushExtents QueuedFlushCount leak

The FCB QueuedFlushCount was decremented in all code paths
but only incremented if the AuthGroup acquisition succeeded.
Increment the counter before the AuthGroup checks.

Change-Id: I3f58075124412cc4a7ac63dc6a7f90a91af369cf
Reviewed-on: http://gerrit.openafs.org/8303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: RDRFunction remove DebugBreak
Jeffrey Altman [Tue, 23 Oct 2012 00:29:47 +0000]
Windows: RDRFunction remove DebugBreak

DebugBreak hard coded into the source tree makes debugging
other unrelated issues difficult if the code path being executed
includes them.  Remove them.

Change-Id: I0f55b1fbccdbac13abecb4f4e9774b23fa57678d
Reviewed-on: http://gerrit.openafs.org/8302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Promote DELETED from DirEntry to ObjInfo
Jeffrey Altman [Fri, 19 Oct 2012 13:33:18 +0000]
Windows: Promote DELETED from DirEntry to ObjInfo

On deletion of the DirEntry in AFSDeleteDirEntry() set the
AFS_OBJECT_FLAGS_DELETED flag on the ObjectInformation object
if and only if the AFS_DIR_ENTRY_DELETED flag was set in the
DirEntry.  Setting the AFS_OBJECT_FLAGS_DELETED should not
be conditional on the ObjectInformatION ReferenceCount being
zero.

Remove the test and set of AFS_OBJECT_FLAGS_DELETED from
AFSClose() because that operation will already have been
performed in the call to AFSDeleteDirEntry() if necessary.

Change-Id: Ib52f89633e6a343b08d408ef24b067c8fae73e0f
Reviewed-on: http://gerrit.openafs.org/8256
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoopr: Clarify opr_time copyright
Simon Wilkinson [Fri, 19 Oct 2012 13:06:57 +0000]
opr: Clarify opr_time copyright

opr_time.h made it in to the tree without a copyright statement.
Clarify that it is BSD licensed.

Change-Id: Ifd6e3dff547337885e5e0bdc0d04e218b733ce44
Reviewed-on: http://gerrit.openafs.org/8279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agovolser: comment with a list of all dump tags
Hartmut Reuter [Sat, 20 Oct 2012 22:24:53 +0000]
volser: comment with a list of all dump tags

this is a list of all the dump tags currently defined

Change-Id: Ie040f48b35ac5ec377e5d4184bcb8e47020d1d46
Reviewed-on: http://gerrit.openafs.org/8281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLinux: Rework handling of names in the lookup functions
Marc Dionne [Sat, 20 Oct 2012 16:59:01 +0000]
Linux: Rework handling of names in the lookup functions

Rework the name lookup functions in the kernel to deal more cleanly
with the change of API for kernel 3.7

Change-Id: I1de9e02cfedbbeee31e2793c443722d4eed57705
Reviewed-on: http://gerrit.openafs.org/8278
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agolwp: zero reused request blocks
Magnus Ahltorp [Fri, 19 Oct 2012 22:12:13 +0000]
lwp: zero reused request blocks

new blocks are calloc()d as zeroed. reused ones are not.
zero them

FIXES 131369

Change-Id: I646c04d3d14ffc121d54e740a92803bb18f32091
Reviewed-on: http://gerrit.openafs.org/8277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLinux: fix afs_putname wrapper for pre-3.7 kernels
Marc Dionne [Fri, 19 Oct 2012 17:31:53 +0000]
Linux: fix afs_putname wrapper for pre-3.7 kernels

Make the compatibility function use the right type for pre-3.7
kernels.

Change-Id: I9222a3dc5a923c97dc36f69485d9cd3ecc6810fb
Reviewed-on: http://gerrit.openafs.org/8276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoWindows: Remove 'bAllocatedFcb' from AFSCreate.cpp
Jeffrey Altman [Tue, 16 Oct 2012 13:36:56 +0000]
Windows: Remove 'bAllocatedFcb' from AFSCreate.cpp

All functions now call AFSInitFcb() and the ObjectInfo->Fcb == NULL
test is performed internally.  Therefore, it is not possible for
the caller to track whether or not an Fcb was allocated.  It is
irrelevant.  The Fcb will be cleaned up when the ObjectInfo is
destroyed by the PrimaryVolumeWorker thread.

Change-Id: I3255563e1b0c44082e4f390002d294ad333d534f
Reviewed-on: http://gerrit.openafs.org/8242
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: PrimaryvolumeWorker do not pause if busy fcb
Jeffrey Altman [Mon, 8 Oct 2012 03:41:32 +0000]
Windows: PrimaryvolumeWorker do not pause if busy fcb

The AFSPrimaryVolumeWorkerThread should not unnecessarily block
on the FCB Resource because such blockage could be the result of
of waiiting for extents to be delivered from the service.  The
AFSPrimaryVolumeWorkerThread is the primary method by which
extents are released back to the service.

AFSCleanupFcb() is modified to return STATUS_RETRY if the Fcb
resource cannot be obtained without blocking.

The AFSPrimaryVolumeWorkerThread() does not call
AFSCleanupFcb() with 'ForceFlush' parameter set to TRUE and
remembers if STATUS_RETRY is returned.  If any Fcb was busy,
then the worker does not wait for the 5 second timer to fire.

Change-Id: If3eab06b902202483eb354362a4db6bc8167d0df
Reviewed-on: http://gerrit.openafs.org/8227
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: avoid race set/clear ExtentsRequestComplete
Jeffrey Altman [Fri, 19 Oct 2012 12:37:25 +0000]
Windows: avoid race set/clear ExtentsRequestComplete

The FCB ExtentsRequestComplete KEVENT setting, clearing
and testing was racy.  Clear the event before issuing the
request to the service and if the request fails, set it in
case two threads issued requests for the same FCB in parallel
and one fails and the other succeeds.

We must ensure that a clear does not mask the event being set
prior to the request thread returning.

Change-Id: I6d496214a2621aeca2b9f6d2f50095ffd19b6c59
Reviewed-on: http://gerrit.openafs.org/8255
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: clear pending delete upon deletion
Jeffrey Altman [Thu, 18 Oct 2012 13:56:12 +0000]
Windows: clear pending delete upon deletion

During cleanup processing if the DELETE_PENDING flag is set
the service will be told to delete the file when the handle
count reaches 1.  At that point the file will be deleted
and the DELETED flag will be set on the object info object.
The DELETE_PENDING flag was not being cleared which could
lead to confusion.  This patchset clears the flag after deletion.

Change-Id: Ib30bb3a5c3a06b8971ac4523e6eacefaaed068ce
Reviewed-on: http://gerrit.openafs.org/8253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSInitFcb Check ObjectInfo->Fcb for NULL
Jeffrey Altman [Sun, 7 Oct 2012 14:23:19 +0000]
Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL

Now that AFSInitFcb is called under the ObjectInfoLock, it is
once again safe to perform a test for ObjectInfo->Fcb != NULL
and return immediately if an Fcb is already assigned.

Change-Id: Id926b9ccf24c7761dbeacf42c53d7cc7d1375482
Reviewed-on: http://gerrit.openafs.org/8226
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Fix DV Raced Trace Message Parameters
Jeffrey Altman [Sun, 7 Oct 2012 14:20:11 +0000]
Windows: Fix DV Raced Trace Message Parameters

Data Versions are logged as HighPart:LowPart not QuadPart.

Change-Id: I7cfb712060fd602a1d20ca1d4f20b892820edf89
Reviewed-on: http://gerrit.openafs.org/8225
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Protect ObjectRefCnts with ObjectInfoLock
Jeffrey Altman [Fri, 5 Oct 2012 15:36:45 +0000]
Windows: Protect ObjectRefCnts with ObjectInfoLock

The ObjectInfoCB.ObjectReferenceCount is tested to determined
when it is safe to remove an FCB from the ObjectInfoCB.  The
value must not be permitted to change while a removal is performed.

Protect AFSRemoveFcb() calls with exclusive holds of the
ObjectInfoCB.NonPagedInfo->ObjectInfoLock.  New functions:

  AFSObjectInfoIncrement()
  AFSObjectInfoDecrement()

perform all increments and decrements while holding the
ObjectInfoLock in a Shared state.

Change-Id: If89b7668ef0a891d55b039d9516620b581c79e10
Reviewed-on: http://gerrit.openafs.org/8224
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb
Jeffrey Altman [Wed, 3 Oct 2012 01:11:01 +0000]
Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb

Do not call AFSRemoveFcb() on a directory entry whose Fcb
has a non-zero use count.

Change-Id: I0d733327c094f15a7b681eb1806a4fa9a4a6c151
Reviewed-on: http://gerrit.openafs.org/8223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Always AFSInitFcb and AFSRemoveFcb
Jeffrey Altman [Wed, 3 Oct 2012 01:07:21 +0000]
Windows: Always AFSInitFcb and AFSRemoveFcb

Instead of comparing ObjectInfo->Fcb to NULL and conditionally
calling AFSInitFcb() or AFSRemoveFcb(), always call them and use
InterlockedExchangePointer() as the test.

Change-Id: I81915dfdfdf180c04ad2b4ff7506784a83ee8c2a
Reviewed-on: http://gerrit.openafs.org/8221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion
Jeffrey Altman [Sat, 6 Oct 2012 21:36:25 +0000]
Windows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion

When calling AFSDoExtentsMapRegion() the FCB ExtentsResource
must be held.   AFSRequestExtentsAsync() failed to hold the
ExtentsResource across the call.

Change-Id: I607cfb45725410c7f079b3be03002b002fccbea4
Reviewed-on: http://gerrit.openafs.org/8220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agolwp: add shared-locked macro
Hartmut Reuter [Thu, 18 Oct 2012 11:32:50 +0000]
lwp: add shared-locked macro

we have a macro to check for write locked, add one for shared locked

Change-Id: I2cd7754fd0e725df19b37f2a2234997cb4c34d3f
Reviewed-on: http://gerrit.openafs.org/8252
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agomemcache: add extend-entry function
Hartmut Reuter [Thu, 18 Oct 2012 11:28:33 +0000]
memcache: add extend-entry function

export directly and rewrite writevblk in terms of it

Change-Id: I181f84428158e93e9bc6008ac9226958653a9409
Reviewed-on: http://gerrit.openafs.org/8251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agobypasscache: update threshold variable type
Hartmut Reuter [Thu, 18 Oct 2012 11:14:26 +0000]
bypasscache: update threshold variable type

if we're doing things based on size, we should allow storing
a size

Change-Id: Ibfb15c45b8b8c7a7c17154165da98c7a8518032a
Reviewed-on: http://gerrit.openafs.org/8250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agolibafs: add partial background store
Hartmut Reuter [Thu, 18 Oct 2012 11:07:21 +0000]
libafs: add partial background store

add a bop that does a partial store

Change-Id: I5971d2cda705a11c7fba7c0cfa54a3fa2d90f392
Reviewed-on: http://gerrit.openafs.org/8249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoWindows: Remove Fcb.Specific.File.LazyWriterThread
Jeffrey Altman [Tue, 16 Oct 2012 13:08:37 +0000]
Windows: Remove Fcb.Specific.File.LazyWriterThread

The LazyWriterThread should not be recorded in the FCB.  It is
possible for multiple lazy writes to occur on a file in parallel
in separate threads.  The value is not used for anything in any
case.  AFSCommonWrite() tests the LazyWriterThread value but only
if 'bMapped' is FALSE.  Since 'bMapped' is always TRUE, the
comparison is never performed.   Remove the test and the value.

Change-Id: Iddbb65d2125f39f0362aba72ae20ab2666944367
Reviewed-on: http://gerrit.openafs.org/8241
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Add cm_SyncOp to cm_ReadMountPoint()
Jeffrey Altman [Sun, 14 Oct 2012 19:46:06 +0000]
Windows: Add cm_SyncOp to cm_ReadMountPoint()

Add a cm_SyncOp(CM_SCACHESYNC_FETCHDATA) call to cm_ReadMountPoint()
to prevent multiple FetchData RPCs being issued for the same
mount point at the same time.

Change-Id: I7651f4505727289d800af060cc3ff5a5f449f447
Reviewed-on: http://gerrit.openafs.org/8235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFSInitFcb assign pFcb->ObjectInformation
Jeffrey Altman [Wed, 3 Oct 2012 01:09:35 +0000]
Windows: AFSInitFcb assign pFcb->ObjectInformation

In AFSInitFcb() assign pFcb->ObjectInformation before the
InterlockedExchangePointer call and not afterwards.  Assigning
it afterwards leaves a small race where the ObjectInformation
value will be invalid.

Change-Id: Ie79587e0b2f161b7ff612fc4fb283135bafd1085
Reviewed-on: http://gerrit.openafs.org/8222
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: OpenTargetDirectory AFSInitFcb Reparse Test
Jeffrey Altman [Wed, 17 Oct 2012 00:26:43 +0000]
Windows: OpenTargetDirectory AFSInitFcb Reparse Test

In AFSOpenTargetDirectory the test to determine if AFSInitFcb
allocated a FCB or returned an existing one (STATUS_REPARSE)
was reversed.  If AFSInitFcb was called and AFSOpenTargetDirectory
eventually failed, an in use FCB would be freed.

Change-Id: Ie5974fee5202685575f286fe4fef43dfdc0698cb
Reviewed-on: http://gerrit.openafs.org/8244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: ObjectInformationCB indentation
Jeffrey Altman [Fri, 5 Oct 2012 15:40:44 +0000]
Windows: ObjectInformationCB indentation

Fix indentation within ObjectInformationCB structure

Change-Id: I004ca5a16fceb63522e3f244177e60e4459e507b
Reviewed-on: http://gerrit.openafs.org/8219
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Do not call buf_ClearRDRFlag unlink/rmdir
Jeffrey Altman [Sat, 6 Oct 2012 05:40:47 +0000]
Windows: Do not call buf_ClearRDRFlag unlink/rmdir

When processing unlink and remdir operations initiated by the
SMB stack do not call  buf_ClearRDRFlag.  The redirector upon
receiving the AFS_INVALIDATE_DELETE call will cancel outstanding
extent operations, mark the FCB deleted, and tear down any held
extents.

Change-Id: I5203dbe5489fcfd0a1c871c3e7aa6aa1a7d65e9a
Reviewed-on: http://gerrit.openafs.org/8218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: Correct alloc size SetFileExtents result
Jeffrey Altman [Sat, 6 Oct 2012 00:16:35 +0000]
Windows: Correct alloc size SetFileExtents result

AFSFileExtentCB objects not AFSSetFileExtentsCB objects.
The latter are too large.  Just wastes memory.

Change-Id: I2ffd1bfd639acc37e2d06bc61749d4ac93376668
Reviewed-on: http://gerrit.openafs.org/8217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agoWindows: AFS_INVALIDATE_DELETE must cancel IO
Jeffrey Altman [Fri, 5 Oct 2012 02:07:40 +0000]
Windows: AFS_INVALIDATE_DELETE must cancel IO

When processing an AFS_INVALIDATE_DELETE the redirector
must cancel any outstanding extent requests on the file
prior to tearing down the extents.

This code path is triggered either when VNOVNODE is received
from a file server or when an alternate cache manager interface
(SMB) unlinks the file.

Change-Id: I16c08c2469228b33ae4ece0e45a9890a057ab257
Reviewed-on: http://gerrit.openafs.org/8206
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agosalvager: fix formatting in the rest of the Log messages
Derrick Brashear [Mon, 15 Oct 2012 16:22:03 +0000]
salvager: fix formatting in the rest of the Log messages

right now some not-commonly-defined code fails to compile with warnings.
fix it so it uses a format string like everything else.

Change-Id: Ib35445db9800444f3ee74a43f17aeb6f2959645a
Reviewed-on: http://gerrit.openafs.org/8236
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agorx: Use opr queues
Simon Wilkinson [Fri, 12 Oct 2012 09:07:22 +0000]
rx: Use opr queues

Modify RX so that it uses opr queues throughout, rather than the older,
non-type-safe rx_queue structure and macros. Attempt to clarify which
items in a structure are queue headers, and which are linkage pointers.

This has the knock on effect that including an RX header doesn't
automatically give you rx_queue.h in your application's namespace.

Change-Id: I1b3fbcd8c03f8153a557bd4532710bcebfe45818
Reviewed-on: http://gerrit.openafs.org/8232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Move server queue entry structure out of rx.h
Simon Wilkinson [Thu, 11 Oct 2012 11:34:46 +0000]
rx: Move server queue entry structure out of rx.h

Hide the server queue management structure in its own header file,
rather than exposing it globally in rx.h. This structure has always
been private - applications have no business knowing about it!

Change-Id: I97ac31e0e77dbe1c10b2804f33901d933a8f0627
Reviewed-on: http://gerrit.openafs.org/8231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agolibafs: Fix second pass in ShakeLooseVCaches
Marc Dionne [Fri, 12 Oct 2012 20:31:24 +0000]
libafs: Fix second pass in ShakeLooseVCaches

Commit 3105c7ff introduced a two phase process for reclaiming
vcache entries.  First go through the list and do what's possible
without sleeping (skipping aliased dentries on Linux), then do
a second pass only if necessary, allowing sleeping.

Unfortunately the test for the end of the VLRU scan is incorrect
and can never trigger, so this second pass was effectively disabled
and any code that is conditional on defersleep=1 was never
exercised.  The code to start the second scan also has issues.

Fix the end of VLRU test, and also correctly set the variables
needed to restart the scan.

Change-Id: I8034cd3b79aab4f2976ab2559c13c102126480d7
Reviewed-on: http://gerrit.openafs.org/8234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLinux 3.7: putname is no longer exported
Marc Dionne [Mon, 15 Oct 2012 16:26:09 +0000]
Linux 3.7: putname is no longer exported

putname is unexported in kernel 3.7.  Add a compatibility inline
afs_putname function and open code it if necessary.

Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce
Reviewed-on: http://gerrit.openafs.org/8237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorxperf: Use libtool RX library
Simon Wilkinson [Tue, 16 Oct 2012 14:07:38 +0000]
rxperf: Use libtool RX library

Use the libtool built liboafs_rx.la, rather than using libafsrpc
for OpenAFS

Change-Id: Iffc32e512b6f8dd2a89bbc9774b0477236087b0c
Reviewed-on: http://gerrit.openafs.org/8243
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

7 years agorx: Export some more functions
Simon Wilkinson [Wed, 17 Oct 2012 11:13:39 +0000]
rx: Export some more functions

Export some symbols that are required by rxperf

Change-Id: I12d99a9ed1c025c838a4f80ecd61aadd19d20c4c
Reviewed-on: http://gerrit.openafs.org/8245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Skip rxi_CheckPeerDead if we are DALLY
Andrew Deason [Tue, 11 Sep 2012 19:23:02 +0000]
rx: Skip rxi_CheckPeerDead if we are DALLY

DALLY connections don't need to be marked dead, so just skip the whole
function if we are DALLY.

Change-Id: I8a70c93edb54be28cfda499bc8ce3b7b5b7db600
Reviewed-on: http://gerrit.openafs.org/8120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLINUX: Ignore 'offender' in error queue processing
Andrew Deason [Tue, 11 Sep 2012 18:59:21 +0000]
LINUX: Ignore 'offender' in error queue processing

The 'offender' is who generated the error, possibly who sent us an
icmp packet (the given 'port' will be 0). What we want is the peer
that is actually unavailable, which is already in the 'addr' variable
we received from the recvmsg itself.

Change-Id: I930293ca14f0e13ba09ee94b5a5d9cdc0f321743
Reviewed-on: http://gerrit.openafs.org/8119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Check for peer deadness in rxi_Resend
Andrew Deason [Tue, 11 Sep 2012 17:48:14 +0000]
rx: Check for peer deadness in rxi_Resend

If we need to resend something, the peer we're sending to may be dead.
Check if the peer is dead in rxi_Resend, so we don't have to wait
(possibly several seconds) for the next rxi_CheckCall.

Change-Id: I0ecc0b1fc23bb4194ebadcea97dd58c938af8154
Reviewed-on: http://gerrit.openafs.org/8118
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Process all errors received
Andrew Deason [Mon, 10 Sep 2012 21:31:01 +0000]
rx: Process all errors received

When we receive a buffer of errors from the error queue, loop through
all of them, and do not stop at the first applicable one we find.

Change-Id: Iad928e0489041b360fe705ac397836650b30091e
Reviewed-on: http://gerrit.openafs.org/8116
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agolinux: always define do_handlesocketerror
Derrick Brashear [Tue, 16 Oct 2012 13:25:03 +0000]
linux: always define do_handlesocketerror

even if we are not handling socket errors, have a stub function

Change-Id: I1f3c1631c5ddcf10e74612e13aafbae833bd5eaa
Reviewed-on: http://gerrit.openafs.org/8240
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: pthread sendmsg should return success, not a bytecount
Derrick Brashear [Wed, 17 Oct 2012 22:52:41 +0000]
rx: pthread sendmsg should return success, not a bytecount

thanks to Marc Dionne for noticing the error

Change-Id: I6e5d8b6e3aa30cb0722aff1a9e538f23f40de441
Reviewed-on: http://gerrit.openafs.org/8246
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoLINUX: Allocate error queue buffer once
Andrew Deason [Fri, 7 Sep 2012 22:04:18 +0000]
LINUX: Allocate error queue buffer once

We call osi_HandleSocketError in a loop, so make sure we process all
of the errors. We were allocating a buffer to process the errors in
osi_HandleSocketError itself, but we can reuse the same buffer on
subsequent invocations, to reduce allocation/free pressure if we need
to call osi_HandleSocketError more than once. So, do that.

Change-Id: Idca2b9d21a48a868574ce6cfc5efe2efba3570a1
Reviewed-on: http://gerrit.openafs.org/8115
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agorx: Process error queue after noticing errors
Andrew Deason [Fri, 7 Sep 2012 21:58:05 +0000]
rx: Process error queue after noticing errors

If errors exist in the socket error queue, we will notice by a sendmsg
or recvmsg returning an error. If we never get an error, we don't need
to check the error queue. So, only call osi_HandleSocketError after
such an error has been returned, so we can avoid unnecessarily
checking the error queue when there are no errors.

Change-Id: I7c8aaaac42728dac7fb0634538b8cc317f0e7212
Reviewed-on: http://gerrit.openafs.org/8114
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>

7 years agoTurn on Linux rx error queue and PMTU handling
Andrew Deason [Wed, 1 Aug 2012 19:30:11 +0000]
Turn on Linux rx error queue and PMTU handling

Change-Id: I17822e9463b5e34bd43e96926a168a19773b2b21
Reviewed-on: http://gerrit.openafs.org/7928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoRevert "Add some basic tests to check out fuse"
Simon Wilkinson [Wed, 10 Oct 2012 15:49:34 +0000]
Revert "Add some basic tests to check out fuse"

This reverts commit 94bf003a720c9a883ba7ebf43ab3053d3072d3dd.

The fuse tests are fundamentally broken as they stand:

*) They rely on files that have not been committed to the tree. To
   function correctly the file fuse/conf/CellServDB must be present
*) They always run, regardless of whether the fuse helper binaries are
   installed on the developers system, or even on whether the tree was
   built with fuse support enabled.
*) They pass, even if fuse fails to start up
*) The file fuse.sh is committed, despite being unused. This is
   particularly confusing, as it looks like this is where the tests
   are performed from (its not, testing is done in dynroot-t)
*) fuse-log should be either cleaned up, or flagged as ignored in
   .gitignore

Revert the commit until such time as all these issues can be fixed

Change-Id: I5ff9a95f33c0a5d0614bb47c521a8770d92fe2eb
Reviewed-on: http://gerrit.openafs.org/8230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agotests: Reformat loopback tests
Simon Wilkinson [Wed, 10 Oct 2012 13:45:03 +0000]
tests: Reformat loopback tests

Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.

Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agotests: Tidy up loopback adapter tests
Simon Wilkinson [Wed, 10 Oct 2012 13:42:21 +0000]
tests: Tidy up loopback adapter tests

Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile

Use roken.h, instead of hardcoding system libraries

Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agoLinux: osi_vcache: Fix loop for the hlist case
Marc Dionne [Fri, 12 Oct 2012 20:25:43 +0000]
Linux: osi_vcache: Fix loop for the hlist case

An hlist is not circular, and the end is marked by a NULL next
pointer.

Change-Id: Iec7ad7e3e7ee989d548233b045aa8def1ebfb1dc
Reviewed-on: http://gerrit.openafs.org/8233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agoDAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2
Andrew Deason [Thu, 4 Oct 2012 20:49:56 +0000]
DAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2

One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.

Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

7 years agosys: Split up syscall.lo 'echo's
Andrew Deason [Wed, 3 Oct 2012 19:44:46 +0000]
sys: Split up syscall.lo 'echo's

Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.

Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.

Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

7 years agoafsd: consolidate macos event handling code
Derrick Brashear [Wed, 3 Oct 2012 14:32:34 +0000]
afsd: consolidate macos event handling code

in order that this can potentially be extracted entirely
to a platform-specific file, (and possibly dbus-equivalents
inserted also) consolidate the macos system events handling code

Change-Id: I8fc4a96dc2590778a13f27610b383ee35626871e
Reviewed-on: http://gerrit.openafs.org/8201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>