openafs.git
14 years agoosi_UFSOpen returns struct osi_file *
Simon Wilkinson [Thu, 19 Nov 2009 16:34:07 +0000]
osi_UFSOpen returns struct osi_file *

The osi_UFSOpen function always returns a (struct osi_file *). Fix
the code to reflect this, rather than casting to and from (void *).

Change-Id: I3aa0bb17b547060671aa7045a8237b3926ec613f
Reviewed-on: http://gerrit.openafs.org/851
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove inode hinting for dcaches
Simon Wilkinson [Wed, 18 Nov 2009 20:07:04 +0000]
Remove inode hinting for dcaches

The VNOP read code has always contained incomplete support for inode
hinting. In theory this would let us attach open cache files to dcache
structures, so that we don't have the overhead of opening the file
with every read that we do.

However, this has been ifdef'd off ever since the first release, and
is fundamentally broken - it relied upon structure elements that just
don't exist, and has no mechanism for throttling the number of inode
hints that are maintained. Inode hinting also required that we store
an inode number within the osi_file structure (so hint validity could
be checked), which causes a problem on some modern OS's.

Simplify all of this, by just removing the partial hinting support.
If we want to revisit this in the future, then the code is in git,
but if we _do_ feel we want to keep open cache files around, it's
probably better to start from scratch!

Change-Id: Ia378922f7fcc24fb27b343015dbd16818302ec10
Reviewed-on: http://gerrit.openafs.org/850
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDefine afs_maxvcount everywhere
Andrew Deason [Wed, 18 Nov 2009 20:33:09 +0000]
Define afs_maxvcount everywhere

afs_maxvcount can be referenced by non-Linux code, so define it
everywhere, not just on Linux.

Change-Id: I6e99b6735d58823d0809a00be42a447deb3ced89
Reviewed-on: http://gerrit.openafs.org/845
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix prepare and commit_write to do the right thing
Simon Wilkinson [Mon, 26 Oct 2009 19:58:53 +0000]
Fix prepare and commit_write to do the right thing

Even when we're doing syncronous writeback, as we currently do
for write() operations, it's important to correctly fill, and flag
the pages we're writing to. Not doing so has a huge performance
penalty, as it means even when we've just written a page, we have to
pull it back from the backing store for a read.

This code fixes prepare_write and commit_write (for RHEL5) and
write_begin and write_end (for Fedora) to correctly populate and
flag pages which are being written.

Change-Id: Iaa2165b9b429000dcf0c6dd452e3eb8033257277
Reviewed-on: http://gerrit.openafs.org/820
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: Use atomics for credential reference counts
Simon Wilkinson [Sat, 24 Oct 2009 14:08:52 +0000]
Linux: Use atomics for credential reference counts

The reference count maintained as part of the afs_cred structure
wasn't being maintained atomically, requiring that crfree and
crhold always be called with the GLOCK held.

This patch just switches to using Linux's inbuilt atomic types to
maintain the reference count.

Change-Id: I1787061afbb48e234b4839b38b8801168ea2f25f
Reviewed-on: http://gerrit.openafs.org/726
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDefine WCOREDUMP in salvsync-server.c
Andrew Deason [Wed, 18 Nov 2009 21:43:17 +0000]
Define WCOREDUMP in salvsync-server.c

Some platforms do not define WCOREDUMP. Conditionally define WCOREDUMP
in salvsync-server.c, and make all of the similar WCOREDUMP defines in
the tree consistent.

Change-Id: I197979881ade20f6e790bf41523938089379dbe3
Reviewed-on: http://gerrit.openafs.org/846
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix 2 errors in Windows release Notes
Mickey Lane [Wed, 18 Nov 2009 17:23:15 +0000]
Fix 2 errors in Windows release Notes

Description of registry key HKLM\ SOFTWARE\ OpenAFS\
Client\ Server Preferences\ File (and \ VLDB) states
"256" - should be 15 - and "ServerPreferences" should
have a space between the words.

Change-Id: Ia2147f920ecc023d26250efaf9815f1b09d1550a
Reviewed-on: http://gerrit.openafs.org/840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: cm_BkgDaemon requeuing only applies to BkgStore
Jeffrey Altman [Fri, 13 Nov 2009 18:56:20 +0000]
Windows: cm_BkgDaemon requeuing only applies to BkgStore

cm_BkgDaemon currently requeues failed requests for a variety
of errors.  It only applies to cm_BkgStore requests.  The current
code only supports cm_BkgStore and cm_BkgPrefetch operations.
Additional background operations may be added in the future.
If requeues are meant to apply to the new operations, they should
be explicitly specified.  Specify cm_BkgStore explicitly now.

LICENSE MIT

Change-Id: Iae7c5fe4f2f7bc701ebe93500626b68f49b0063f
Reviewed-on: http://gerrit.openafs.org/824
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Improvements to background fetch processing
Jeffrey Altman [Sat, 14 Nov 2009 21:33:31 +0000]
Windows: Improvements to background fetch processing

Log offset and length in cm_BkgPrefetch()

Convert mxheld to rwheld in cm_BkgPrefetch() now that cm_scache_t
objects use rwlocks.

Do not clear CM_SCACHEFLAG_PREFETCHING from within the error
returns from cm_CheckFetchRange().  Let the caller decide if
that is appropriate.

Add CM_BUF_CMBKGFETCH cm_buf_t cmFlag to make it possible to
quickly detect if a background fetch operation has already
been queued for a particular cm_buf_t data range.

LICENSE MIT

Change-Id: I4ac9a2f84ddd64cba86612d7a2abe849bd0bec0b
Reviewed-on: http://gerrit.openafs.org/827
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: buf_DirtyBuffersExist uses fileHashp not allp list pointer
Jeffrey Altman [Sun, 15 Nov 2009 05:11:24 +0000]
Windows: buf_DirtyBuffersExist uses fileHashp not allp list pointer

buf_DirtyBuffersExist() should use the fileHashp pointer and not
the allp list pointer in order to walk the hash table list.

LICENSE MIT

Change-Id: Ie043647cbeec479abe0d96b3b5405130f2ba1aac
Reviewed-on: http://gerrit.openafs.org/828
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Permit custom version numbers and default cellname
Jeffrey Altman [Sun, 15 Nov 2009 20:48:00 +0000]
Windows: Permit custom version numbers and default cellname

Permit custom version numbers and default cellname to be
specified using environment variables.

LICENSE MIT

Change-Id: If72430a33d8317fcb59d2f83769193e79984046c
Reviewed-on: http://gerrit.openafs.org/829
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agosrc/afs/afs_user.c typo
Andrew Deason [Wed, 18 Nov 2009 20:14:16 +0000]
src/afs/afs_user.c typo

Commit eb8e55bba7740a87e07ef07bb4b789e6d4e36f0d had a paren-related
typo. Correct it to make afs_user.c build on some platforms again.

Change-Id: Iec4634b4c0f1769c81bf9baab0d2cc53f47aaa9c
Reviewed-on: http://gerrit.openafs.org/843
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDefine T_SRV when not defined for us
Andrew Deason [Wed, 18 Nov 2009 20:08:49 +0000]
Define T_SRV when not defined for us

Define T_SRV when we don't have a usable arpa/nameser_compat.h, just
like we do with T_AFSDB. Some platforms like AIX do not have an
easily-usable arpa/nameser_compat.h.

Change-Id: I8406a3d2b1f98d0849a1739875656432869ea3c4
Reviewed-on: http://gerrit.openafs.org/842
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAIX: Missing brace in afs_vnop_flock.c
Andrew Deason [Wed, 18 Nov 2009 20:25:48 +0000]
AIX: Missing brace in afs_vnop_flock.c

Commit 50f6529cf1f191606f55add4cabe53fceab492ed missed a brace in the
AIX lockIDSet. Add it back to make afs_vnop_flock.c build again.

Change-Id: I09c5ee58ee5258fb904fd752213eb28a1e80291a
Reviewed-on: http://gerrit.openafs.org/844
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoviced ihandle boost
matt@linuxbox.com [Tue, 6 Oct 2009 12:42:51 +0000]
viced ihandle boost

Make ihandle file descriptor cache parameters tunable, and accommodate
platforms where max open files is large.  Expand the fd cache hash table
to 2048 entries.  Raise fd cache size automatically to match configured
number of lwps.

NOTE: This code has been tested on Centos 5.3 x86_64, on VMWare, 2 physical,
2 logical CPUs (in tandem with viced_more_threads).

LICENSE BSD

Change-Id: If68eda6e1c955e026b250ca52bddf0b8383959c9
Change-Id: I5fbbec95523ea9cd9ff42dcf43f17db94c7bb161
Reviewed-on: http://gerrit.openafs.org/584
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoName chunkOps structure elements
Simon Wilkinson [Wed, 18 Nov 2009 11:23:06 +0000]
Name chunkOps structure elements

Name the structure elements in chunkOps, to reduce the danger of
things getting misaligned when new function pointers are added.

Change-Id: I3d22130f9bd9625d836681531646b9eac75329f5
Reviewed-on: http://gerrit.openafs.org/839
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agofix for volser transaction object race conditions
Michael Meffie [Wed, 18 Nov 2009 19:05:02 +0000]
fix for volser transaction object race conditions

Spell AFS_PTHREAD_ENV correctly and fix
missing pthread_mutex_init() argument.

Change-Id: I9a6397ef5ba3ef7197f3d927759258be31914fd7
Reviewed-on: http://gerrit.openafs.org/841
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: Fix lock ordering
Simon Wilkinson [Mon, 16 Nov 2009 22:52:01 +0000]
Linux: Fix lock ordering

The inode mutex (or semaphore) should be held before acquiring the
alloc semaphore. Fix the lock ordering to avoid theoretical deadlocks.

Change-Id: Ifc572083dc92fff51be6785b0bcc92152fab1d73
Reviewed-on: http://gerrit.openafs.org/835
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoaklog build fix: com_err.h header
Marc Dionne [Tue, 17 Nov 2009 22:59:58 +0000]
aklog build fix: com_err.h header

Fix this build error:
aklog_main.c:67:21: error: com_err.h: No such file or directory

On some systems this system header is actually "et/com_err.h".  Cope
by checking for this at configure time and using that location if
needed.

Change-Id: Iaf4fb4fe157ff8e54aa043785377706eab6fb3d1
Reviewed-on: http://gerrit.openafs.org/836
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

14 years agoRationalise our include paths
Simon Wilkinson [Fri, 13 Nov 2009 09:50:29 +0000]
Rationalise our include paths

Our include paths are a bit of a mess. Fix these so that they're
more rational, and more in line with normal coding style.

In particular:
   *) Don't include all of the subdirectories of our top level
      include directory. If a file wants afs/file.h, it should
      include that, not "file.h"
   *) Try to avoid including '.' in the search path (although
      objdir builds make this harder)
   *) Don't blindly include other directories from the code tree
      in the search path. If a package wants another packages header,
      then it should get it from the include directory
   *) Use the convention that quoted includes ("") pick up local
      headers. Bracketed includes (<>) pick up ones from the top level
      include dir
   *) In directories which pull in files from multiple packages, don't
      blindly put all of the package directories in the search path.
      Specifically include the file's package directory when required

The big change here is that it's no longer possible to hide a system
include by placing a header of the same name in include/afs. The most
common case where this was happening was for 'assert.h'

Change-Id: I0796fabcf83ffcd74e533624c64e138a160dd632
Reviewed-on: http://gerrit.openafs.org/834
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoktc remove unused variable
Derrick Brashear [Tue, 17 Nov 2009 01:58:11 +0000]
ktc remove unused variable

inadvertantly introduced non-linux warning (error) due to unused variable.
fix it.

Change-Id: Ie44013fdf2ff8e5d401f5598a7ec628fd887588a
Reviewed-on: http://gerrit.openafs.org/832
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoTranslate messages from ktc_SetToken
Simon Wilkinson [Fri, 13 Nov 2009 16:40:53 +0000]
Translate messages from ktc_SetToken

Error messages from ktc_SetToken weren't being passed through com_err,
leading to the confusing

   unable to obtain tokens for cell inf.ed.ac.uk (status: 11862788).

error message. Instead, call into afs_com_err here, which gives:

   a pioctl failed while obtaining tokens for cell inf.ed.ac.uk

Much nicer ...

Change-Id: Id4c7e6f6a2f52efc6ac1db9fa007ba1a452092fe
Reviewed-on: http://gerrit.openafs.org/822
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoBetter errors from aklog
Simon Wilkinson [Fri, 13 Nov 2009 16:33:52 +0000]
Better errors from aklog

Since the great com_err fracture, aklog has only returned decent
error messages from AFS, leaving Kerberos errors untranslated.
Needless to say, this causes user confusion and distress.

This patch uses the error display proc hook to call out to the real
com_err in situations where AFS can't supply an error message, giving
clearer errors for Kerberos problems.

Change-Id: I8832b755beb84c593e1b2eace5c356e71a582b2a
Reviewed-on: http://gerrit.openafs.org/821
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoasm unexecutable stack
Derrick Brashear [Thu, 12 Nov 2009 00:36:01 +0000]
asm unexecutable stack

make stack not executable in assembled files

FIXES 125491

Change-Id: I396680b6877843201f6c07d5607385044abd5e74
Reviewed-on: http://gerrit.openafs.org/818
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Code signing with cross-signed certificates
Jeffrey Altman [Sat, 14 Nov 2009 21:24:41 +0000]
Windows: Code signing with cross-signed certificates

Permit the version of signtool.exe to be specified with
the SIGNTOOL environment variable.

Add the CODESIGN_CROSS_CERT environment variable to
specify the cross-signed certificate to be used

LICENSE MIT

Change-Id: Ib549e31f1f240e0de2cedfabac9bb998ee58a517
Reviewed-on: http://gerrit.openafs.org/825
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Error mapping for VBUSY and VRESTARTING
Jeffrey Altman [Sat, 14 Nov 2009 21:27:37 +0000]
Windows: Error mapping for VBUSY and VRESTARTING

Add error mapping for VBUSY and VRESTARTING to
cm_MapRPCError().  Return CM_ERROR_ALLBUSY.
This prevents an unknown error from being returned
to the SMB redirector.

LICENSE MIT

Change-Id: Ie8bf8bc88e087a8eef428444ca07c7ca7c4621a8
Reviewed-on: http://gerrit.openafs.org/826
Reviewed-by: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Use STATUS_IO_TIMEOUT where STATUS_TIMEOUT was returned
Jeffrey Altman [Sat, 31 Oct 2009 14:33:00 +0000]
Windows: Use STATUS_IO_TIMEOUT where STATUS_TIMEOUT was returned

STATUS_TIMEOUT causes the smb redirector to drop the connection.
STATUS_RETRY is interpreted by the smb redirector as if the error was
generated by the transport stack and not the smb server.
STATUS_IO_TIMEOUT is listed in the SNIA CIFS 1.0 spec as a valid
return code for the smb server.  Lets us that.

LICENSE MIT

Change-Id: I842a78cde3d975c88bbeb64294dd53cc8b101047
Reviewed-on: http://gerrit.openafs.org/831
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Fix port assignment to use network byte order
Jeffrey Altman [Sun, 15 Nov 2009 06:01:23 +0000]
Windows: Fix port assignment to use network byte order

Service port numbers are stored within sockaddr* structures
and returned by afsconf_FindService() in network byte order.
getAFSServer() and afsconf_GetAfsdbInfo() accept and return
service port numbers in network byte order.

When processing the special case for 7002 and 7003 in
afsconf_GetAfsdbInfo(), the comparisons must consistently
use network byte order.

When assigning port numbers for AFSDB lookups, getAFSServer()
must use network byte order.

Document the use of network byte order for each variable.

LICENSE MIT

Change-Id: I2163826e8a234a1d19474b2eba3d36335ba12afb
Reviewed-on: http://gerrit.openafs.org/830
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: ports in the cache manager are stored in network byte order
Jeffrey Altman [Wed, 21 Oct 2009 22:41:59 +0000]
Windows: ports in the cache manager are stored in network byte order

When assigning ports from SRV/AFSDB lookups, convert to network
byte order when assigning them to cm_server objects.

LICENSE MIT

Change-Id: Ic22a445c9f6433f9f7544774ea9952d82fcdba8a
Reviewed-on: http://gerrit.openafs.org/791
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoMake ktc_curpag also detect ONEGROUP PAG gids
Andrew Deason [Wed, 11 Nov 2009 17:23:49 +0000]
Make ktc_curpag also detect ONEGROUP PAG gids

ktc_curpag falls back to looking at the group list if the VIOC_GETPAG
pioctl fails. If we're in AFS_LINUX26_ONEGROUP_ENV in the kernel,
though, ktc_curpag still looks for two groups, instead of the one
combined group. Add a check for the big one group in the fallback if
we're on LINUX26.

Change-Id: I28e5eda5c62f13a6fb466c8a2b04d2628706498f
Reviewed-on: http://gerrit.openafs.org/815
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse set_page_writeback and end_page_writeback
Simon Wilkinson [Wed, 21 Oct 2009 22:17:15 +0000]
Use set_page_writeback and end_page_writeback

Calling set_page_writeback and end_page_writeback is necessary to
ensure that the dirty page radix tree and the page dirty flags
tally. The results of end_page_writeback are also used by the
bdi code to prioritise writeback. The Linux kernel
documentation contains further warnings of doom for what may
happen due to not calling them.

Adding set_page_writeback and end_page_writeback also allows us to
unlock the page earlier (the page can be locked any time after the
writeback flag is set). This means that we're not calling the
backing filesystem's ->write function with our pages locked, and
should help reduce contention and the potential for deadlocks there.

Change-Id: I9130b2ad9a09c6b9b16a0f63d7b4a614a93de8d3
Reviewed-on: http://gerrit.openafs.org/819
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: Use the kernel's credentials structure
Marc Dionne [Thu, 29 Oct 2009 23:58:00 +0000]
Linux: Use the kernel's credentials structure

Recent kernels (2.6.29 and above) have a separate ref-counted
structure for holding credentials.  Use it directly instead of
keeping a separate afs specific structure that shadows the same
information.

Also adapt Linux for the change from cr_xxx to afs_cr_xxx wrappers.

Reference counting is done with the appropriate get/put calls.

Change-Id: I1135bb5a66cda51cee4fa9f3f3e63eaa9af28f61
Reviewed-on: http://gerrit.openafs.org/797
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDo not check *aoutSize in PGetPAG
Andrew Deason [Wed, 11 Nov 2009 16:51:19 +0000]
Do not check *aoutSize in PGetPAG

*aoutSize is always zero in pioctls, since afs_HandlePioctl handles
checking the output buffer size, and sets outSize to 0 before calling
the pioctl. So, PGetPAG was always returning E2BIG; remove the check to
make it work.

Change-Id: Ibed16b35ea14237f44a494add8c7a4a48e0c2b71
Reviewed-on: http://gerrit.openafs.org/814
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate warning inhibition
Simon Wilkinson [Wed, 11 Nov 2009 10:34:30 +0000]
Update warning inhibition

A number of recent changes haven't caught all of the locations where
warning inhibition can be removed. This patch updates all of the
inhibitions to reflect the current state of the tree when built with
gcc4.2

Change-Id: I7bad4fee1258f4e37fd729cda84711fed66acbc9
Reviewed-on: http://gerrit.openafs.org/813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrototype kalog_Init
Simon Wilkinson [Wed, 11 Nov 2009 10:32:59 +0000]
Prototype kalog_Init

Prototype the kalog_Init function in kauth_internal.h, and remove
the warning inhibition from kaserver.c

Change-Id: Ic48d199126629f1c0c2e498081be97901678ec70
Reviewed-on: http://gerrit.openafs.org/812
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoconst char paths for ubik_ServerInit
Simon Wilkinson [Wed, 11 Nov 2009 10:28:29 +0000]
const char paths for ubik_ServerInit

ubik_ServerInit* take a pathname, which should really be a const.
It already is in many of the callers, some of which remove the
const by casting, the others throw errors.

Make pathName const for all of ubik_ServerInitByInfo, ubik_ServerInit
and ubik_ServerInitCommon.
Update all of our callers to remove the now unecessary casting.
Remove the now uneccessary warning inhibition on vlserver/vlserver.c

Change-Id: I009103dc49e4473eec65ebd75aab727915c26f3c
Reviewed-on: http://gerrit.openafs.org/811
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix des key type issue in bosoprocs
Simon Wilkinson [Wed, 11 Nov 2009 10:19:07 +0000]
Fix des key type issue in bosoprocs

The call to afsconf_AddKey was using 'akey' rather than 'akey->data'.
As data is the first element of the akey structure, these are actually
identical, but the compiler sees it as a type error. Fix to use the
correct name, and remove the warning inhibition.

Change-Id: Id4775a836276ddd6f5ae105c298dcc3c68b92145
Reviewed-on: http://gerrit.openafs.org/810
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrototype UV_Bind
Simon Wilkinson [Wed, 11 Nov 2009 10:13:57 +0000]
Prototype UV_Bind

Publicly prototype UV_Bind in volser_prototypes.h

Make dump.c use the public prototype, instead of an incomplete
private copy, and remove the warning inhibition that was required to
support the private copy.

Change-Id: I945192454702d79083a10062adaf2cb124d14a35
Reviewed-on: http://gerrit.openafs.org/809
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove 'M' variants of lock macros
Simon Wilkinson [Wed, 11 Nov 2009 08:32:48 +0000]
Remove 'M' variants of lock macros

Since the beginning, we've had M variants of the lock macros, which
are identical to the normal form. Dispose of these variants, to make
it clearer what's going on.

Change-Id: I0b7708ec670ef0edb4c1dc21d472e5041d31f6a2
Reviewed-on: http://gerrit.openafs.org/807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings from afsconf_SetExtendedCellInfo
Simon Wilkinson [Wed, 11 Nov 2009 09:10:36 +0000]
Fix warnings from afsconf_SetExtendedCellInfo

If a is declared as an array, then a == &a. However, the compiler
still gives a type warning when usign the & form, as the types no
longer match. 5f720faab920a1007327de415ceaf187c16fdbe6 fixed this
problem for calls to GetExtendedCellInfo - do the same for the
corresponding Set calls.

Change-Id: I8204afe7df0c0db1d059cb3f6ab61eff1cdf9140
Reviewed-on: http://gerrit.openafs.org/808
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoInclude signal.h for sigfillset
Simon Wilkinson [Wed, 11 Nov 2009 08:28:32 +0000]
Include signal.h for sigfillset

f6ce2af008feb615e94d924fc9f81e2098e73e7c added a call to
AFS_SIGSET_CLEAR to vol/volume.c. However, it didn't add signal.h
to this file. As AFS_SIGSET_CLEAR calls sigfillset(), this broke
checked builds.

Add signal.h to the list of headers to fix the build warning.

Change-Id: Ib861abfbd153f6ef2ff4b42ea03b5604a95975d4
Reviewed-on: http://gerrit.openafs.org/806
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agokrb_udp.c warning fix
Marc Dionne [Tue, 10 Nov 2009 23:36:55 +0000]
krb_udp.c warning fix

This file generates a warning because the left side of a variable
assignment is commented out.  Keep the effect of the line
(incrementing packet) but remove the unused casting and
reference, and remove the comments that date from the original
IBM source.
Leave a new comment in place in case the information is useful.

Adjust the Makefile and README.WARNINGS to account for the change.

Change-Id: I944e1c488e39411d32d700cba2d3ef567eddddb4
Reviewed-on: http://gerrit.openafs.org/804
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agocm: address race condition in afs_QueueVCB
Michael Meffie [Mon, 9 Nov 2009 16:03:10 +0000]
cm: address race condition in afs_QueueVCB

Access the vcache callback member after taking
the xvcb lock to avoid the server object from
being freed in FlushServer on another thread.

Eventually, we should have a ref count on
avc->server.

FIXES 125596

Change-Id: I760819b1632d0e8188eaa34531239951aab980d3
Reviewed-on: http://gerrit.openafs.org/800
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agosrc/pam/afs_auth.c warning fix
Marc Dionne [Tue, 10 Nov 2009 23:16:45 +0000]
src/pam/afs_auth.c warning fix

ka_UserAuthenticateGeneral expects an afs_int32 pointer for the
password_expires argument.  A (long *) was used in afs_auth.c,
generating a few warnings.

Change-Id: Iafc92e72022644ff23c642e801d51bd4387afa88
Reviewed-on: http://gerrit.openafs.org/803
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agocr_gid is already used by Darwin
Simon Wilkinson [Wed, 11 Nov 2009 08:12:51 +0000]
cr_gid is already used by Darwin

Commit eb8e55bba7740a87e07ef07bb4b789e6d4e36f0d introduced a variety
of functions for accessing members of the credentials structure in a
platform independent way. Sadly, cr_gid is already defined by the
Darwin platform headers (on Darwin, the GID is just the first of
the user's groups)

Turn cr_gid() into afs_cr_gid() to avoid this problem, and for
consistency, also rename cr_uid, cr_ruid, cr_rgid, and the
corresponding set_* functions.

Change-Id: I82d74900324d079b5a5c8985510a2c9586c4a526
Reviewed-on: http://gerrit.openafs.org/805
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agounix srv record network byte order fix
Derrick Brashear [Mon, 9 Nov 2009 18:10:55 +0000]
unix srv record network byte order fix

correctly process dns lookups corresponding to the srv record changes in
network byte order

Change-Id: Id70f972331582912ca984ae1b1c027c7b702a22c
Reviewed-on: http://gerrit.openafs.org/801
Reviewed-by: Thomas L. Kula <tkula@umich.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoUpdate afsd cache and firewall details
Russ Allbery [Mon, 9 Nov 2009 01:31:25 +0000]
Update afsd cache and firewall details

Cache parameters are discussed in two locations in the afsd man page,
and the first copy had not been updated for the new auto-tuning of
the chunk size and the stat parameter.  Fix both.

Note that the firewall requirements for klog only apply if you're using
kaserver and klog.  Kerberos v5 has its own requirements, but this is not
the place to talk about them.

Change-Id: I9cdaaa71351a64cecc1b6904efba87d4871d42fb
Reviewed-on: http://gerrit.openafs.org/798
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix locking in FlushVCBs when called from discon
Simon Wilkinson [Mon, 9 Nov 2009 23:20:14 +0000]
Fix locking in FlushVCBs when called from discon

The disconnected code doesn't request locking from FlushVCBs when
it calls it, but also doesn't hold the required locks itself.

Fix this.

Change-Id: I2450df4b19b2d44dca80990197e5e7637c9c8334
Reviewed-on: http://gerrit.openafs.org/802
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUnix client: wrappers for credentials structure access
Marc Dionne [Thu, 29 Oct 2009 23:23:28 +0000]
Unix client: wrappers for credentials structure access

This patch introduces and makes use of wrappers for access
to credentials structure members:
cr_uid (afs_ucred_t *)
cr_ruid(afs_ucred_t *)
cr_gid (afs_ucred_t *)
cr_rgid(afs_ucred_t *)
cr_group_info(afs_ucred_t *)

Inline functions are also introduced to set values:
set_cr_uid (afs_ucred_t *, uid_t)
set_cr_ruid(afs_ucred_t *, uid_t)
set_cr_gid (afs_ucred_t *, gid_t)
set_cr_rgid(afs_ucred_t *, gid_t)
set_cr_group_info(afs_ucred_t *, struct group_info *)

This will allow an architecture to make use of an alternate
structure to hold credentials.  In particular it will allow
the linux client to be modified to use the kernel credentials
structure directly instead of shadowing it into our own local
structure.

There should be no functional change.

Change-Id: I7739196a0691a9c30887043b085e4878e88780ae
Reviewed-on: http://gerrit.openafs.org/768
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoviced: avoid useless core if shutdown during initialization
Michael Meffie [Thu, 5 Nov 2009 16:08:08 +0000]
viced: avoid useless core if shutdown during initialization

Avoid leaving an unnecessary core file when the fileserver is
shutdown while still attaching volumes.  The bosserver issues
SIQUIT to shutdown the fileserver which leaves a core file by
default.

Register the fileserver shutdown signal handler earlier in the
fileserver initialization, before the long running volume
attachment is started. The volume package shutdown has been
changed to allow the VShutdown to gracefully abort the volume
attachment (or pre-attachment for DAFS).

FIXES 124485

Change-Id: Ic22e68afb7bcc54ad956b2ae093375f29b969191
Reviewed-on: http://gerrit.openafs.org/764
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd printf-style format checking
Simon Wilkinson [Sat, 7 Nov 2009 11:52:59 +0000]
Add printf-style format checking

Add the AFS_ATTRIBUTE_FORMAT macro which can be used to turn on
printf-like format checking for our va-arg log functions.

Enable this checking for volser's Log(), and fix the fallout from
doing so.

Change-Id: Ic5ab93ba731856f1f90e894d711b0f84298ded12
Reviewed-on: http://gerrit.openafs.org/789
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoComplete removal of DUX client code
Simon Wilkinson [Wed, 4 Nov 2009 20:15:36 +0000]
Complete removal of DUX client code

With commit cfce015ead18c72ee921f480c73e9247a98838fc (in 2006) all
of the files specific to the DUX cache manager were removed.
However, the DUX code within general files remained untouched.
This patch completes the removal of the (entirely non-functional)
DUX client, by removing all cache manager code which is for
AFS_DUX*_ENV and AFS_OSF_ENV platforms.

It also takes the advantage of this removal to simplify some #ifdef
ladders, and indents others (purely because I needed the indentation
to work out what on earth was going on!)

Change-Id: Icbea5ed3ef94c5e902cdb0d722be85f376c3d296
Reviewed-on: http://gerrit.openafs.org/785
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove vnode macros to their own directories
Simon Wilkinson [Wed, 4 Nov 2009 18:09:51 +0000]
Move vnode macros to their own directories

The tree is inconsistent whether macros for access to vnodes are
provided by the OS directories, or in afs_osi.h. This makes things
very confusing, especially in the Linux case where macros are
provided in afs_osi.h, and then promptly redefined in
LINUX/osi_machdep.h

Adopt a convention where default macros are conditionally provided
by osi_machdep.h. Where these aren't wanted, they should be disabled
in osi_machdep.h, and OS specific versions provided in the individual
OS's directory.

Change-Id: I47bc969af3f6670db9348689b5ce60181fd44f21
Reviewed-on: http://gerrit.openafs.org/784
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: always use afs_maybe_unlock_kernel
Marc Dionne [Sat, 7 Nov 2009 15:51:52 +0000]
Linux: always use afs_maybe_unlock_kernel

In one error case in afs_linux_lookup unlock_kernel() is called
directly instead of using the conditional "maybe" form.
If the config is such that the BKL is not taken, this can result
in an attempt to unlock when the lock has not been taken, and
can cause an oops.

Change-Id: I27d5db58e9b9d45d925b24e27bc43960499c6ead
Reviewed-on: http://gerrit.openafs.org/790
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd error_table.c to gitignore in comerr
Simon Wilkinson [Sat, 7 Nov 2009 01:10:22 +0000]
Add error_table.c to gitignore in comerr

error_table.c is a build product for comerr, should we should
gitignore it

Change-Id: Ie47ae4daec734b31c884e4732d053635ee1048bb
Reviewed-on: http://gerrit.openafs.org/788
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoCleanup VOffline log message
Andrew Deason [Wed, 4 Nov 2009 03:22:50 +0000]
Cleanup VOffline log message

Make the 'Volume X (Y) is now offline' messages appear more sanely in
the log; logging as one line at once.

Change-Id: I8a3cf986fb30e292e509237357bd1039f2f181b9
Reviewed-on: http://gerrit.openafs.org/782
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrevent VLRUQ race in ShakeLooseVCaches
Simon Wilkinson [Wed, 4 Nov 2009 23:40:39 +0000]
Prevent VLRUQ race in ShakeLooseVCaches

When ShakeLooseVCaches is called from afs_Daemon, the xvcache lock
is not held. This means that if the GLOCK is dropped for any reason
(for example, whilst purging the dentry cache), then
ShakeLooseVCaches can be raced, end we can end up attempting to
flush the same vcache twice.

The symptoms of this in Linux are that we oops in clear_inode.

Get the xvcache lock in afs_Daemon(), before calling
ShakeLooseVCaches. Also, remove the conditional GLOCK code from
that function. If we don't have the GLOCK on entry, then we're really
in trouble (and both code paths - afs_Daemon and afs_NewVCache should
get the GLOCK for us, anyway)

FIXES 125589

Change-Id: I3fe5b41a661cd162ec73c51492925ad87c6d4c13
Reviewed-on: http://gerrit.openafs.org/781
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoCorrect diskused and files when cloning a volume
Rainer Toebbicke [Fri, 30 Oct 2009 11:10:21 +0000]
Correct diskused and files when cloning a volume

Recalculates a volume's disk space used and number of files upon
every clone where it is effortless. Even though tracked mostly
correctly, bugs and accidents leave their traces which only a
salvage would correct.

Change-Id: Ied6fb9eb3944b6e30eac175fe42649c5b7cfaefb
Reviewed-on: http://gerrit.openafs.org/756
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos fstrace msgcat search path
Derrick Brashear [Wed, 4 Nov 2009 00:26:33 +0000]
macos fstrace msgcat search path

everything else on osx will look for config in /var/db/openafs; make
fstrace do the same

Change-Id: I7b787435343b15c82cd8eb8f3ed00096d469e888
Reviewed-on: http://gerrit.openafs.org/772
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos 10.6 64bit trace fixes
Derrick Brashear [Wed, 4 Nov 2009 00:25:23 +0000]
macos 10.6 64bit trace fixes

the 64 bit pointer massaging was incomplete for kernel
tracing on macos. add in the missing cases.

Change-Id: I38eb608c233819ab437adec25e2cd3afac3e234e
Reviewed-on: http://gerrit.openafs.org/771
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux - Fix disk cache access for selinux/AppArmor constrained processes
Marc Dionne [Wed, 28 Oct 2009 21:54:32 +0000]
Linux - Fix disk cache access for selinux/AppArmor constrained processes

Preserve the credentials used for cache initialisation and use then
whenever disk cache files are opened.  This takes advantage of the
credentials separation work from David Howells available in kernels
2.6.29 and above.
Access to cache files was done under the security context of the
user process, causing processes constrained by selinux or AppArmor to
fail to access AFS cache files and causing the cache manager to panic.

Besides the RT tickets, should also fix the following Ubuntu bugs:
 415766 429260 457779 459299

FIXES 92944,125544

Change-Id: Ief8acd65c1a3e4d8c951f80bfd65f8340b8cec34
Reviewed-on: http://gerrit.openafs.org/752
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

14 years agoCheck for (hostFlags & HOSTDELETED) after h_Lock_r
Jeffrey Altman [Fri, 23 Oct 2009 14:54:35 +0000]
Check for (hostFlags & HOSTDELETED) after h_Lock_r

Many callers of h_Lock_r do not check if the HOSTDELETED flag is set,
even though it could have been set while waiting for the host lock. Add
checks for it everywhere we call h_Lock_r and we care if the host has
been deleted.

FIXES 125507

Change-Id: Id1430529a1afdb5e2af29d40148877f5e4260a41
Reviewed-on: http://gerrit.openafs.org/716
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: Avoid SALVSYNC communication during shutdown
Andrew Deason [Mon, 2 Nov 2009 18:19:45 +0000]
DAFS: Avoid SALVSYNC communication during shutdown

Avoid trying to contact the salvageserver for any reason while we are
shutting down. During shutdown the salvageserver may not be around
anymore, so any SALVSYNC communication will appear to hang.

Just set a global flag to indicate 'no-SALVSYNC' on shutdown, in
addition to the thread-local flag we already have.

Change-Id: Id96f20917fd0753b4934a0377b91032b2ea3d0dc
Reviewed-on: http://gerrit.openafs.org/765
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: Wait for exclusive ops in FSYNC_VOL_OFF
Andrew Deason [Mon, 2 Nov 2009 23:18:19 +0000]
DAFS: Wait for exclusive ops in FSYNC_VOL_OFF

In the FSYNC_VOL_OFF handler, fssync-server.c errors out if the call to
VGetVolumeByVp_r fails. However, this can fail if the volume is in an
error state such as SALVAGING. Normally we don't even call GetVolume
when the volume is salvaging, but the volume state can change to
SALVAGING inside GetVolume. This is particularly likely to happen on a
demand salvage, since we switch to the SALVSYNC_REQ state when
scheduling the salvage, and if we are still in that state when the
salvaged child requests a VOL_OFF, we will fail to get the heavyweight
ref.

Fix this in two ways. First, we VWaitExclusiveState_r before examining
states for the short-circuit logic so our view of the volume state is
more accurate. Second, re-examine the volume state after the call to
GetVolume, and perform the same short-circuit logic, since the volume
state may have changed during GetVolume.

Change-Id: I4ebb87691c28170b42e0056b342477a12d0f6888
Reviewed-on: http://gerrit.openafs.org/769
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd array bounds checking in h_Enumerate
Dan Hyde [Thu, 29 Oct 2009 16:07:47 +0000]
Add array bounds checking in h_Enumerate

When hostList is not properly NULL-terminated, the current code does
not protect from buffer overflow.  The following patch prevents buffer
overflow, prints a message, and asserts.

On our Linux hosts, we never reached the original assert, as there is
a problem handling the segfault the buffer overflow causes.

FIXES 125506

Change-Id: Ifce92c593d17050e45add9e37a7a9ed4fbc377ef
Reviewed-on: http://gerrit.openafs.org/757
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: Fix write_begin configure test for recent RHEL kernels
Marc Dionne [Sat, 31 Oct 2009 17:27:18 +0000]
Linux: Fix write_begin configure test for recent RHEL kernels

Recent RHEL kernels now define simple_write_begin, which was used as
a test for the write_begin address_space op.  This makes the test
succeed when it shouldn't, and breaks the build.
Rewrite the test to actually check the address_space operation.

Change-Id: Idac9b318ff716b61bf8ca4508d2dbdbfbad5b50d
Reviewed-on: http://gerrit.openafs.org/759
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix memory allocation warnings at shutdown
Marc Dionne [Sat, 31 Oct 2009 12:54:52 +0000]
Fix memory allocation warnings at shutdown

At shutdown we check for unfreed memory allocated with AllocSmallSpace
and AllocLargeSpace and complain in the syslog if there are dangling
pieces.  This patch takes care of a few cases that always showed up
as warnings, even after a simple start-stop of the client.

- The cacheInode file needs to be closed before the checks, since it
uses a large piece for its struct file.

- The ICL logging code allocates 6 small pieces that are never freed.
Add a shutdown_icl() function that releases everything.  While we're
at it, correct one place where we allocated with afs_osi_Alloc but
freed with osi_FreeSmallSpace, confusing our accounting.

Change-Id: I4c28c848f155dec9d89e6199cde34209227ca5c9
Reviewed-on: http://gerrit.openafs.org/758
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: remove unused cr->next member in struct afs_cred
Marc Dionne [Thu, 29 Oct 2009 21:11:34 +0000]
Linux: remove unused cr->next member in struct afs_cred

This field was once used to track allocations in a credentials pool.
That code was removed a few years ago but the field remained.

Change-Id: Ieac642d7d55c4da766a5a3aa8ff790a514b606d6
Reviewed-on: http://gerrit.openafs.org/753
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoCleanup cache bypass
Simon Wilkinson [Thu, 29 Oct 2009 18:53:30 +0000]
Cleanup cache bypass

This patch cleans up the cache bypass code so that it uses a
consistent form of indentation throughout the file.

It also changes the do { } while(0); macros to omit the trailing
semicolon, as macro definitions with trailing semicolons break
normal coding conventions.

Change-Id: Id5161fe4b1ba27110e41ed27e14a2bb3c9cccd4a
Reviewed-on: http://gerrit.openafs.org/754
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAvoid using released hosts
Andrew Deason [Wed, 28 Oct 2009 16:06:47 +0000]
Avoid using released hosts

Since h_Release_r has the possibility of freeing a host, we should not
be using a host after it has been released. A few places can still use a
released host, potentially causing heap corruption, double frees, and
generally weird behavior.

So either move calls of h_Release_r until after we finish using a host,
or make sure to set the pointer to NULL after it has been released.

Change-Id: I3d5275c3862003e372d3c19a5462e62bf9cb269e
Reviewed-on: http://gerrit.openafs.org/747
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoCoding style cleanup
Simon Wilkinson [Thu, 29 Oct 2009 18:42:41 +0000]
Coding style cleanup

Our style for function definitions has the name of the function as
the first item on a new line - this means you can find a definition
by using grep ^functionName. Fix the disconnected code to follow this
style.

Change-Id: I925039070f2bbbd97f04fbee006ea08df92d7cf5
Reviewed-on: http://gerrit.openafs.org/751
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake afsd.pod reflect reality
Simon Wilkinson [Wed, 28 Oct 2009 11:12:18 +0000]
Make afsd.pod reflect reality

9d396c4916fdac64fcface30e6637ca6e2911203 (from 2005) introduced
autotuning for afsd, and changed some of the defaults which aren't
autotuned. Update the afsd man page to reflect the autotuning, and
the new defaults.

Change-Id: Iea2035743cb45cca1c249bc2e838405039ad7d3a
Reviewed-on: http://gerrit.openafs.org/744
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove PMTU header block to top of file
Simon Wilkinson [Wed, 28 Oct 2009 18:24:33 +0000]
Move PMTU header block to top of file

1206e7538be86f073b21cd289266286b60a95d0a added linux/errqueue.h to
rx_user.c, but added the include in the middle of a function - which
means that the new structure is out of scope for the rest of the file,
which breaks the build on Linux.

Put the header include at the start with all of its other friends.

Cc: Alf Wachsmann <alfw@slac.stanford.edu>
Change-Id: Id932ff63b59e6cd62eda3df4f01e4eef354736ca
Reviewed-on: http://gerrit.openafs.org/748
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoafs_buffer.c: fix uninitialized variable warning
Marc Dionne [Mon, 26 Oct 2009 22:23:00 +0000]
afs_buffer.c: fix uninitialized variable warning

Squash a warning about lt being potentially used uninitialized.

Change-Id: I41bfccfd1a0db925a4d728a217b154f45c28b112
Reviewed-on: http://gerrit.openafs.org/742
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse fewer #ifdefs for dynamic vcaches
Simon Wilkinson [Mon, 26 Oct 2009 19:52:48 +0000]
Use fewer #ifdefs for dynamic vcaches

When we're not in AFS_MAXVCOUNT_ENV, make afsd_dynamic_vcaches a
static 0, which allows the removal of a scattering of #ifdef's in
the middle of conditionals in afs_vcache.c, and generally improves
the code browsing experience.

Also, move the externs for this variable to afs.h, where they belong,
and fix related formatting.

Change-Id: I4d56ebae63fe1855ac80f8511b9fc76f7e5a326f
Reviewed-on: http://gerrit.openafs.org/741
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake cache bypass build again
Simon Wilkinson [Mon, 26 Oct 2009 23:17:36 +0000]
Make cache bypass build again

Recent commits had left cache bypass somewhat behind, make it
build again.

Change-Id: I500372f4584f4d0d90f6ea9f98a9ac3fb05f5185
Reviewed-on: http://gerrit.openafs.org/743
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove hardcoded maximum time
Simon Wilkinson [Mon, 26 Oct 2009 18:52:52 +0000]
Remove hardcoded maximum time

When iterating across the buffer list, afs_newslot used a hardcoded
maximum time to find the oldest. Instead of using this, just use the
accesstime of the first unused buffer that we find as the oldest, and
continue as normal.

Change-Id: Ifeacb8a407901b46a23fbc838b1fca761108ebbb
Reviewed-on: http://gerrit.openafs.org/738
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix dynamic vcache / rxmaxmtu cmd id collision
Simon Wilkinson [Mon, 26 Oct 2009 19:36:53 +0000]
Fix dynamic vcache / rxmaxmtu cmd id collision

Both dynamic vcaches and rxmaxmtu had been committed as using the
35th command entry. Fix this according to the order they are in
the command list (35 and 36, respectively). Tidy up the command list
so it's easier to read, and remove the #ifdef notdef entry from it,
as adding it back in would just cause chaos.

Change-Id: I3fce403aa0ab01c42f0e1a48ae401503b0e21c24
Reviewed-on: http://gerrit.openafs.org/740
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix locking in afs_buffer.c
Simon Wilkinson [Mon, 26 Oct 2009 17:06:20 +0000]
Fix locking in afs_buffer.c

Back in 2002, 0eb68f307aac84472a13523a0ce8b7a865f01ac7 was committed
to fix locking problems in dir/buffer.c.

Sadly, similar changes were never made to afs/afs_buffer.c, so the
same problems remain in the cache manager.

The issue here is with two processes racing in afs_newslot. Calls to
afs_newslot protect buffers with a zero reference count using
afs_bufferLock. If we release afs_bufferLock, before we increase the
reference count of the vcache, then we can end up with newslot
picking the same buffer for two different purposes.

The GLOCK actually protects us from the worst of this, but this fix
is necessary both for correctness, and for symmetry with the file
server buffer code.

Change-Id: I7f1c7d6571559c5f1784926c39d4889b77677231
Reviewed-on: http://gerrit.openafs.org/737
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove pininodes
Simon Wilkinson [Mon, 26 Oct 2009 19:46:09 +0000]
Remove pininodes

The pininodes option has been commented out of afsd since the
original OpenAFS commit. Enabling it now would cause chaos, due to
the way that cmd orders its arguments. Just remove the sections
of code to avoid this danger.

Change-Id: I9e9944d4470fd21d2ec9e36e17771b499d7c8e0b
Reviewed-on: http://gerrit.openafs.org/739
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDec old special inodes in inode convertROtoRW
Andrew Deason [Mon, 26 Oct 2009 19:04:48 +0000]
Dec old special inodes in inode convertROtoRW

The convertROtoRW code for the inode fileserver makes copies of the
volume's special inodes, but leaves the old (RO) inodes around. If the
RO is created again, this will result in duplicate special inodes for
the same volume, which freaks out the salvager (and possibly other
things).

So IH_DEC the old RO special inodes after converting, so they go away.

Change-Id: Ifefa2cb69c5b2960b81dbee9d54e5ea8401b240e
Reviewed-on: http://gerrit.openafs.org/735
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoviced (non atomic) refcount/more-threads
matt@linuxbox.com [Mon, 3 Aug 2009 16:36:25 +0000]
viced (non atomic) refcount/more-threads

Replace host-hold bitmap with reference counting, phase 1, not atomic.
Increase viced MAX_THREADS.

NOTE: This code has been tested on Centos 5.3 x86_64, on VMWare, 2 physical,
2 logical CPUs.

LICENSE BSD

Change-Id: Id62dcc786619dfd99e1a7b69a196bbaa0b45158c
Change-Id: I8ee2ec645402f02fdba0920815409b56172d393b
Reviewed-on: http://gerrit.openafs.org/268
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoubik_VL_GetAddrsU does not accept a VLCallBack parameter
Jeffrey Altman [Mon, 26 Oct 2009 14:13:00 +0000]
ubik_VL_GetAddrsU does not accept a VLCallBack parameter

ubik_VL_GetAddrU accepts a pointer to a uniqifier and not
a pointer to a VLCallBack structure.  Remove an incorrect
cast and provide the correct parameter in src/volser/vos.c.

Change-Id: I4b12cf2d4c65f115fdef76f0a4306960b5cd0413
Reviewed-on: http://gerrit.openafs.org/733
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAvoid 'salvageserver -client -showlog' segfault
Andrew Deason [Fri, 23 Oct 2009 20:02:12 +0000]
Avoid 'salvageserver -client -showlog' segfault

Running salvageserver with the -client and -showlog options will
currently segfault, since -client does not open logFile, and -showlog
will attempt to rewind logFile on exit.

Fix this by not allowing -client and -showlog together (since it won't
work anyway, as -showlog tries to read SalvageLog), and by making
showlog() check logFile for NULL-ness.

Change-Id: I30f43ef1696f1e7e8873b9e1cc3867b4e06d1980
Reviewed-on: http://gerrit.openafs.org/734
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdates to Jake's RTT based server ranking (Gerrit 317)
Jeffrey Altman [Mon, 17 Aug 2009 16:23:57 +0000]
Updates to Jake's RTT based server ranking (Gerrit 317)

Remove check on powerStateSuspend in cm_Daemon()

Update the server Reference lists if the ranking changes.

Change-Id: Id290e0f98c616a12f4f8b1746dca58ad7a0f06ce
Reviewed-on: http://gerrit.openafs.org/729
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoAdds cm_RankUpServers() and cm_RankServer()
Jacob Thebault-Spieker [Wed, 12 Aug 2009 05:32:06 +0000]
Adds cm_RankUpServers() and cm_RankServer()

This adds the functions cm_RankUpServers() and cm_RankServer() to
the Windows cache manager. cm_RankUpServers() steps through the
list of servers, and calls cm_RankServer(), which in turn re-ranks
the servers that are currently up based on rx peer statistics as
exposed by rx_GetLocalPeers().

cm_RankUpServers() is called every 10 minutes by the cache manager
daemon, so as to allow re-ranking of the servers.

Also added is the struct server->adminRank data structure, to
allow for the modification of the rank that the admin has set,
without but basing this modification on the admin-set rank.

Change-Id: I118b885e179e4f84901dd9a3180ce821f194feb8
Reviewed-on: http://gerrit.openafs.org/317
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoClean up console message
Simon Wilkinson [Mon, 26 Oct 2009 12:49:11 +0000]
Clean up console message

Clean up the 'all buffers locked' console message so that it's
clear that it comes from AFS, and so it has a trailing newline.

From a bug report by Rainer Toebbicke to openafs-info

Change-Id: I3f69e57e37a91ae3e6e8822ccfe72dddc06b4359
Reviewed-on: http://gerrit.openafs.org/732
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDon't return AOP_WRITEPAGE_ACTIVATE to write()
Simon Wilkinson [Fri, 23 Oct 2009 15:34:33 +0000]
Don't return AOP_WRITEPAGE_ACTIVATE to write()

When we're called from write(), we don't have the option
of deferring the writing of a page by returning AOP_WRITEPAGE_ACTIVATE.
Instead, write() simply sees this as the output of 0x8000 bytes of data.

So, whilst we can mark a vcache as being output, we can't defer the
processing of one which is already being written (by, for example, an
earlier writepage()).

This problem only affects files which are have mmap() and write()
called in quick succession, but it does break the fsx utility.

Change-Id: I750a186de38da9873665a862f5b584a78e6979ad
Reviewed-on: http://gerrit.openafs.org/725
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse user credentials for Linux writepage()
Simon Wilkinson [Sat, 24 Oct 2009 09:54:32 +0000]
Use user credentials for Linux writepage()

We have no control over the context in which the kernel calls our
writepage routine. It may be from the process which original wrote the
page, from any other process on the system which is writing and goes
over the dirty page threshold, or from the flush thread (pdflush /
flush-afs). Therefore, we cannot use the credentials of the current
process to perform the writeback. This is an issue both for afs_write
(which, in our current MM model, may need to contact the fileserver
to read missing chunks), and for DoPartialWrite (which needs to be
able to store chunks when the local cache is getting full)

This patch stores the credentials of the first process to open a file in
the vcache structure. Whenever writepage() is used to writeback pages
for this file, the cached credentials are used rather than those of the
current context.

Thanks to Marc Dionne for his work in testing and refining this patch.

FIXES 125471
Change-Id: I2900f711150fd81b2b4839bbc2bf77623bde3b64
Reviewed-on: http://gerrit.openafs.org/724
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agowindows 1.5.66 openafs-devel-1_5_66
Derrick Brashear [Fri, 23 Oct 2009 21:50:09 +0000]
windows 1.5.66

make 1.5.66 for windows

Change-Id: I04902106c35eea2dccf6db594c496302cde3f15b
Reviewed-on: http://gerrit.openafs.org/723
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomake 1.5.66 for unix
Derrick Brashear [Fri, 23 Oct 2009 21:35:37 +0000]
make 1.5.66 for unix

push version changes for 1.5.66

Change-Id: I5302e9aa83b4aba0081130934f0d6df0786ce43c
Reviewed-on: http://gerrit.openafs.org/722
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agovolser transaction object race conditions
Michael Meffie [Thu, 22 Oct 2009 19:51:33 +0000]
volser transaction object race conditions

Fix the transaction object races between VolMonitor and the
volume operation procedures which can cause the volume
server to crash.

Add a per transaction object mutex to safely set the
transaction call pointer and name. Fix VolMonitor to safely
traverse the transaction list and to access the call pointer
and last proc name while copying info to send to the vos
client.  Fix the sleep thread to safely access the last proc
name.

FIXES 125479

Change-Id: I59595b93522d111b6a771d3d93c246bfc2ce65de
Reviewed-on: http://gerrit.openafs.org/718
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAvoid prematurely destroying callback_rxcon
Andrew Deason [Thu, 22 Oct 2009 16:12:30 +0000]
Avoid prematurely destroying callback_rxcon

Currently, h_GetHost_r and removeAddress_r can destroy the
callback_rxcon of a host. Having a NULL callback_rxcon can cause
segfaults in code that does not properly check if a host has been
HOSTDELETED before trying to use it.

Although such code is incorrect and should be fixed, we can still avoid
a segfault in those situations by not destroying callback_rxcon until we
destroy the host itself. This just prevents destroying callback_rxcon in
h_GetHost_r and removeAddress_r, leaving it to h_TossStuff_r to destroy
when it destroys the host.

Change-Id: I6fd5cbb924053446689c576026f9044f78ba71be
Reviewed-on: http://gerrit.openafs.org/717
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoResolve error return issues in writepage
Simon Wilkinson [Fri, 23 Oct 2009 11:42:19 +0000]
Resolve error return issues in writepage

The writepage_sync changes get error returns wrong in a couple of places. In
particular, they return a 0 code from dopartialwrite in preference to the
length return from page_writeback

Change-Id: I34a848fed5f799aa6844e9ef0339321f91c7e59b
Reviewed-on: http://gerrit.openafs.org/721
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove warning from all calls to afsconf_GetExtendedCellInfo
Jeffrey Altman [Thu, 22 Oct 2009 14:38:23 +0000]
Remove warning from all calls to afsconf_GetExtendedCellInfo

Fix 'afsconf_GetExtendedCellInfo' : different types for formal
and actual parameter 5

Change-Id: I922d653a88a9d0c04ed6dbd1c9c0b3fc90719337
Reviewed-on: http://gerrit.openafs.org/715
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Notes for 1.5.66
Jeffrey Altman [Fri, 23 Oct 2009 07:16:01 +0000]
Windows: Notes for 1.5.66

ChangeLog description for 1.5.66 on Windows.

Reviewed-on: http://gerrit.openafs.org/720
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Updates to Release Notes
Jeffrey Altman [Fri, 23 Oct 2009 07:04:52 +0000]
Windows: Updates to Release Notes

Add support for Windows 7 and Server 2008 R2.

Improve text in a variety of areas.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/719
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRefactor writepage_sync
Simon Wilkinson [Tue, 20 Oct 2009 11:38:53 +0000]
Refactor writepage_sync

This change refactors writepage_sync into 4 functions -
*) prepare_writeback() readies a vnode for writeback, and performs
   the anti-recursion check.
*) dopartialwrite() intialises a request and performs the call to
   DoPartialWrite
*) page_writeback() does the actual work of writing an AFS page into
   the disk cache page
*) complete_writeback clears the writeback flag from a vnode

There should be no change to the current behaviour of writepage_sync,
these modifications are the first part of a fix to our writepage()
behaviour.

Reviewed-on: http://gerrit.openafs.org/712
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: no longer use WinExec in afscreds
Jeffrey Altman [Thu, 22 Oct 2009 14:27:41 +0000]
Windows: no longer use WinExec in afscreds

WinExec is a compatibility interface for 16-bit applications.
It is not compatible with Windows 7.  Replace it with ShellExecuteEx.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/714
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agopthread pid casting
Derrick Brashear [Wed, 21 Oct 2009 18:42:23 +0000]
pthread pid casting

in rx, we use pthread_self (which can return a pointer) as a pid;
in order to not cause problems, cast it as we do elsewhere

Reviewed-on: http://gerrit.openafs.org/703
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>