openafs.git
14 years agoLinux: replace invalidate_inode_pages
Marc Dionne [Fri, 5 Mar 2010 22:54:42 +0000]
Linux: replace invalidate_inode_pages

This helper has been deprecated for a while, and gets removed
with 2.6.34.
Replace it with invalidate_remote_inode, which has been around for
all of 2.6's life, according to Chaskiel in RT #124377.

Change-Id: I8658b454e1c997c041f654ba55d06f713ea25459
Reviewed-on: http://gerrit.openafs.org/1523
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: use krb5_get_error_message to translate krb5 errors in afskfw library
Jeffrey Altman [Fri, 5 Mar 2010 14:47:43 +0000]
Windows: use krb5_get_error_message to translate krb5 errors in afskfw library

Use krb5_get_error_message to translate krb5 errors to strings
in the afskfw library.  This provides error translations to afscreds
and afslogon.dll.

LICENSE MIT

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

14 years agoWindows: use krb5_get_error_message in netidmgr_plugin
Jeffrey Altman [Fri, 5 Mar 2010 14:46:08 +0000]
Windows: use krb5_get_error_message in netidmgr_plugin

Use krb5_get_error_message to translate krb5 error messages
to strings.

LICENSE MIT

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

14 years agoWindows: Add krb5 error message functions to loadfuncs header
Jeffrey Altman [Fri, 5 Mar 2010 14:43:13 +0000]
Windows: Add krb5 error message functions to loadfuncs header

Add krb5_get_error_message and krb5_free_error_message
to loadfuncs-krb5.h so that they can be used in conjunction
with LoadFuncs to obtain function pointers when available.

LICENSE MIT

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

14 years agoWindows: reset local mount point count during freelance re-initialization
Jeffrey Altman [Thu, 4 Mar 2010 21:23:36 +0000]
Windows: reset local mount point count during freelance re-initialization

When a re-initialization is taking place, be sure to reset
cm_noLocalMountPoints to 0 in case someone deletes the "Freelance"
registry key out from underneath the service.

LICENSE MIT

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

14 years agoLinux : Don't leak GLOCK when writing CellServDB
Simon Wilkinson [Fri, 5 Mar 2010 15:40:55 +0000]
Linux : Don't leak GLOCK when writing CellServDB

Don't leak the GLOCK when we're iterating over the CellServDB in
response to a read of /proc/fs/openafs/CellServDB

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

14 years agoadd growl agent for macos
Derrick Brashear [Thu, 4 Mar 2010 21:07:14 +0000]
add growl agent for macos

a userspace monitoring helper for mac users

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

14 years agodarwin afshelper fix startup check
Derrick Brashear [Thu, 4 Mar 2010 19:16:04 +0000]
darwin afshelper fix startup check

make the launchd check run as root without whining about passwords
repeatedly

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

14 years agoevalmount copy out volid for sure
Derrick Brashear [Thu, 4 Mar 2010 17:23:14 +0000]
evalmount copy out volid for sure

make sure we really have a volid and avoid dereferencing tvp
if there's none

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

14 years agomacos shutdown consistent behavior
Derrick Brashear [Wed, 3 Mar 2010 04:14:47 +0000]
macos shutdown consistent behavior

on every other platform, we check for afs unmounted before allowing shutdown.
do the same here.

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

14 years agoadd user warning facility via mariner for macos
Derrick Brashear [Tue, 2 Mar 2010 11:53:53 +0000]
add user warning facility via mariner for macos

existing mariner clients treat fetch$ and store$ special and otherwise
just blat out a string. use this to our advantage

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

14 years agosupport mariner messages sans vcache
Derrick Brashear [Tue, 2 Mar 2010 11:42:41 +0000]
support mariner messages sans vcache

if a mariner message is passed in without a vcache, print it as-is

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

14 years agorewrite marinerlogfetching
Derrick Brashear [Tue, 2 Mar 2010 11:36:02 +0000]
rewrite marinerlogfetching

marinerlogfetching and marinerlog have a lot of code duplication.
fix that.

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

14 years agorestore mariner storing message
Derrick Brashear [Tue, 2 Mar 2010 11:28:52 +0000]
restore mariner storing message

sometime after afs 3.3, the mariner log "storing" message was
lost in code restructuring. restore it.

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

14 years agode-printf the cache manager
Derrick Brashear [Tue, 2 Mar 2010 11:14:19 +0000]
de-printf the cache manager

put most printfs into either afs_warn or comment out entirely

move a couple uprintfs to afs_warnuser (and allow them to trigger on macos)

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

14 years agoAdd a section on how to tune the AFS cache using xstat_cm_test
Jason Edgecombe [Sat, 13 Feb 2010 16:31:09 +0000]
Add a section on how to tune the AFS cache using xstat_cm_test

The cache tuning section covers how to use xstat_cm_test to measure
the cache miss percentage.

LICENSE BSD

Change-Id: I895dbbecd7e16d44e18fa65e5e1aa1da5c567a06
Reviewed-on: http://gerrit.openafs.org/1308
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

14 years agoRemove duplicate make targets in tubik, cleanup dependencies
Marc Dionne [Fri, 26 Feb 2010 22:00:58 +0000]
Remove duplicate make targets in tubik, cleanup dependencies

Eliminate a few duplicate targets in the tubik Makefile, and
clean up some dependencies that could cause the same source file
to be compiled by different threads simultaneously when building
in parallel.  At least on my current gcc this would consistently
result in a gcc internal error.
The duplicate targets generate make warnings.

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

14 years agodarwin vfsops ansification
Derrick Brashear [Tue, 2 Mar 2010 10:59:30 +0000]
darwin vfsops ansification

kill off the old k&r prototypes in osi_vfsops.c

Change-Id: Ifd9bb9bd7f303f0f05f0776bb94222c3b138e808
Reviewed-on: http://gerrit.openafs.org/1500
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 agoafs_util don't use printf
Derrick Brashear [Tue, 2 Mar 2010 10:54:12 +0000]
afs_util don't use printf

afs_warn and printf are ideally not interchangeable. fix it.

Change-Id: Ib1b064549ef723fcac61e5ad89abe53a8ad76a51
Reviewed-on: http://gerrit.openafs.org/1499
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 agoBOP_MOVE and userspace move EXDEV helper
Derrick Brashear [Sat, 27 Feb 2010 20:30:06 +0000]
BOP_MOVE and userspace move EXDEV helper

turns background daemons into afsdb helper-like processes, which can
exit and do work. for macos, add BOP_MOVE and implement mv in afsd:
(macos EXDEV move is cp+rm, literally)

run cp + rm and pass the return back in. if it fails, just give
the client the error it had already

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

14 years agoOSXPreferencePane
Claudio Bisegni [Mon, 1 Mar 2010 19:41:48 +0000]
OSXPreferencePane
checkAfsStatusForStartup method modification for search /afs volume for determinate if afs is on has been transfered into checkAfsStatus. checkAfsStatusForStartup method is used to check when afs start axitn system startup. Anyway these are only workaround we must use osx api or afs api to make this job.

Change-Id: If9be5a91418eccc0c58a69b566af140d619d3057
Reviewed-on: http://gerrit.openafs.org/1492
Reviewed-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Tested-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos prefs pane more reliable running indicator
Derrick Brashear [Sun, 28 Feb 2010 01:09:42 +0000]
macos prefs pane more reliable running indicator

instead of grepping ps output, look for AFS in df output. not
happy with this either but it's way more reliable.

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

14 years agoMore help for the FBSD build
Ben Kaduk [Sun, 28 Feb 2010 21:42:22 +0000]
More help for the FBSD build

Remove extra #endif that was introduced in 6c628445.

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

14 years agoMake build progress farther
Ben Kaduk [Sun, 28 Feb 2010 21:15:05 +0000]
Make build progress farther

Add a prototype for afs_global_owner in the AFS_FBSD50_ENV case.

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

14 years agoDon't pass NULL to strcmp
Marc Dionne [Sun, 28 Feb 2010 16:08:11 +0000]
Don't pass NULL to strcmp

A recent gcc update gives me a series of warnings from the NULL
argument to strcmp.  We should be passing an empty string instead
of a NULL pointer.

I suspect this was unintentional from a search/replace operation
in commit 8229e668.

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

14 years agoWindows: rx lowlevel nat ping
Jeffrey Altman [Sun, 28 Feb 2010 02:54:47 +0000]
Windows: rx lowlevel nat ping

sha1 d24078658d183ea2e72e61c1888e9900bac0ec32 added support
for a low-level nat ping using rx version replies.

Export rx_SetConnSecondsUntilNatPing from afsrpc.dll.

Add NatPingInterval registry value to
  HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
to permit Nat Ping to be enabled.  The default value is 0 seconds.

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

14 years agomagic mount parser fix
Derrick Brashear [Sun, 28 Feb 2010 04:00:31 +0000]
magic mount parser fix

parse vnodes from magic mount objects correctly

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

14 years agomacos prefs pane krb5 auth setup
Derrick Brashear [Sat, 27 Feb 2010 22:48:19 +0000]
macos prefs pane krb5 auth setup

when we configure krb5-at-login, don't inadvertantly reorder the list.
replace inline.

FIXES 126628

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

14 years agoirix syscall arg fix for rx
Derrick Brashear [Wed, 24 Feb 2010 00:45:21 +0000]
irix syscall arg fix for rx

rx uses the afs syscall to get network info in userspace. fix things to
pass a useful set of args in

Change-Id: I541f90d43ff79ba7a026832403d485b7738a53b8
Reviewed-on: http://gerrit.openafs.org/1379
Reviewed-by: Chaz Chandler
Tested-by: Chaz Chandler
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoinstitute afsdb dns lookup timeout if we can
Derrick Brashear [Sat, 27 Feb 2010 16:52:03 +0000]
institute afsdb dns lookup timeout if we can

don't be willing to wait more than about an rx timeout period for afsdb
retries.

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

14 years agorx lowlevel nat ping
Derrick Brashear [Thu, 25 Feb 2010 03:34:28 +0000]
rx lowlevel nat ping

for rfc 4787, do a minimal impact nat ping. this uses an rx
"version request" reply debug packet, which will simply be discarded by the
receiver, to keep the port mapping open.

Change-Id: Ic2180bfa5c467e33c72e3f19d62488bd6a2dc61a
Reviewed-on: http://gerrit.openafs.org/1393
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 agoConvert ObtainSalvageLock to the VLockFile API
Andrew Deason [Thu, 18 Feb 2010 17:36:10 +0000]
Convert ObtainSalvageLock to the VLockFile API

Make ObtainSalvageLock use the VLockFile API, to consolidate
platform-specific locking code, and to make it possible to acquire a
shared lock on the salvage lock file. Create the ObtainSharedSalvageLock
function to acquire such a lock.

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

14 years agoEnable parallel build for tubik
Marc Dionne [Fri, 26 Feb 2010 21:15:37 +0000]
Enable parallel build for tubik

Allow tubik to benefit from parallel make.

Change-Id: If4e7e1a603ef88f03bcc271ec6d742ba3387c61a
Reviewed-on: http://gerrit.openafs.org/1402
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>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agobackground daemon genericization
Derrick Brashear [Wed, 24 Feb 2010 05:57:23 +0000]
background daemon genericization

previously only "just enough" of the background daemon request object was
exposed. expose the rest of the generic pointers

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

14 years agohush another afsd warning
Derrick Brashear [Wed, 24 Feb 2010 05:59:16 +0000]
hush another afsd warning

we can't prototype call_syscall fully yet, but at least hush some warnings

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

14 years agodarwin vnops code cleanup
Derrick Brashear [Thu, 25 Feb 2010 21:58:31 +0000]
darwin vnops code cleanup

simplify ifdef structure by moving code around. remove dead code
and nonsensical code (darwin80 inside !darwin80)

no actual code changes here

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

14 years agodarwin afscall syscall should set retval
Derrick Brashear [Wed, 24 Feb 2010 05:30:28 +0000]
darwin afscall syscall should set retval

because of how the ioctl based syscall works, passing back a real
return value should be done this way, as it is for the other other
afs syscall subcalls. matters for userspace handlers.

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

14 years agomacos bulkstat cleanup after racing stats
Derrick Brashear [Thu, 25 Feb 2010 21:52:02 +0000]
macos bulkstat cleanup after racing stats

if someone else stats it before we finish, make sure we clean up after
ourselves properly

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

14 years agoDo not leak information on partial success in RXAFS_InlineBulkStatus
Rainer Toebbicke [Wed, 24 Feb 2010 11:02:08 +0000]
Do not leak information on partial success in RXAFS_InlineBulkStatus

Initialize all RXAFS_InlineBulkStatus return parameters in case portions
remain unset on FetchStatus failures. Also ensure VolSync info is set even if
the first FetchStatus fails.

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

14 years agocorrect magic vnode volumename parsing
Derrick Brashear [Wed, 24 Feb 2010 05:41:48 +0000]
correct magic vnode volumename parsing

if /afs/.:mount/cell:volume:vnode is passed in, don't pass the :vnode
into the volume id lookup

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

14 years agoirix kill efs and start pruning pre-65
Derrick Brashear [Wed, 24 Feb 2010 05:19:20 +0000]
irix kill efs and start pruning pre-65

we haven't built on irix 6.4 in a while. likewise, no efs anymore.

just remove the extra code

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

14 years agoirix cachemgr inode abstraction correction
Derrick Brashear [Wed, 24 Feb 2010 04:57:14 +0000]
irix cachemgr inode abstraction correction

if the XFS function takes a dcache_id_t, pass that and not its child

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

14 years agofreebsd initglock endif fix
Derrick Brashear [Wed, 24 Feb 2010 21:02:26 +0000]
freebsd initglock endif fix

when initglock hit freebsd it was broken. fix it. make it obvious that such is
being done

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

14 years agoremove dropbox attribute leak fix
Derrick Brashear [Wed, 24 Feb 2010 16:13:23 +0000]
remove dropbox attribute leak fix

change 6ec18461649d3e4f44b2476f886bcc480c456500, avoid leaking stat info,
appears to have side effects on at least macos, crashing the system
coreservicesd. revoke the change until the exact behavior we want is
better understood.

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

14 years agoMake VLockFile not DAFS-specific
Andrew Deason [Thu, 18 Feb 2010 17:52:33 +0000]
Make VLockFile not DAFS-specific

The VLockFile API does not require DAFS functionality, so make it
available to non-DAFS code, as well.

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

14 years agoVLockFile: init fd to INVALID_FD, not zero
Andrew Deason [Thu, 18 Feb 2010 20:41:24 +0000]
VLockFile: init fd to INVALID_FD, not zero

Zero is a valid file descriptor; initialize lockfile fd to INVALID_FD
instead, so we know it's invalid.

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

14 years agoVLockFile: Do not close fd on lock failure
Andrew Deason [Thu, 18 Feb 2010 17:42:27 +0000]
VLockFile: Do not close fd on lock failure

When we fail to acquire a lock in _VLockFd, do not close the fd if we
fail to acquire the lock for any reason, since VLockFile does that for
us already. There also may be other locks on that file, and we clearly
do not want to release them when just one lock fails. VLockFile takes
care of the necessary refcounting and fd closing, so don't do it in
_VLockFd too.

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

14 years agoviced avoid global pruclient during acl ops
Derrick Brashear [Mon, 15 Feb 2010 21:12:44 +0000]
viced avoid global pruclient during acl ops

acl_Internalize and acl_Externalize used the global pruclient

use the ones we use elsewhere in viced FetchAcl/StoreAcl also

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

14 years agoadd limits.h to sysincludes.h on IRIX
Chaz Chandler [Tue, 23 Feb 2010 22:20:39 +0000]
add limits.h to sysincludes.h on IRIX

xdr_mem.c wasn't including limits.h on IRIX when KERNEL was declared, so i
INT_MAX was undefined.  this adds limits.h to sysincludes.h so it's included
for all other places where it might be needed.

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

14 years agoLinux: autoconf.h is moving in 2.6.33
Anders Kaseorg [Sat, 20 Feb 2010 18:36:22 +0000]
Linux: autoconf.h is moving in 2.6.33

In 2.6.33, <linux/autoconf.h> is moving to <generated/autoconf.h>.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: Ib97031728b89cf8e17581f3c425216ae4b5538ec
Reviewed-on: http://gerrit.openafs.org/1351
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 kbuild to check for UML
Anders Kaseorg [Sat, 20 Feb 2010 18:28:59 +0000]
Linux: Use kbuild to check for UML

<linux/autoconf.h> is automatically included by kbuild; you aren’t
supposed to include it directly.  That breaks in 2.6.33 because
<linux/autoconf.h> is moving to <generated/autoconf.h>.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: I56c90dfe90ef72408620793fcd4e927ea3d8f468
Reviewed-on: http://gerrit.openafs.org/1350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdjust afs_lockctl to compensate for byte-range lock fixes
Anders Kaseorg [Sun, 21 Feb 2010 01:52:06 +0000]
Adjust afs_lockctl to compensate for byte-range lock fixes

As of commit 49b7bbdd3b45df694fadbef48f9ed99d9bfe07b9, l_len is no
longer 1 less than it should be.  Update afs_lockctl to expect this.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: I3fb7665457d489e56564b14933795084a0958d6f
Reviewed-on: http://gerrit.openafs.org/1353
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: Fix conversion of whole-file locks
Anders Kaseorg [Sun, 21 Feb 2010 01:28:42 +0000]
Linux: Fix conversion of whole-file locks

An overflow bug in commit 49b7bbdd3b45df694fadbef48f9ed99d9bfe07b9
caused whole-file locks to be treated as byte-range locks, which fail
to be propagated to other machines.

Fix this by setting l_len = 0 for locks that range to the end of the
file.

FIXES 126561

Change-Id: Ie2dc9d04f33559c73b3b86b64152c549b785f8ad
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/1352
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAbstract /vicepX header traversal
Andrew Deason [Wed, 27 Jan 2010 21:08:34 +0000]
Abstract /vicepX header traversal

The code for examining all of the headers on a vice partition now exists
in two places: the VGC scanner, and the salvager. Create the
VWalkVolumeHeaders function that contains the common logic so it's in
one place, and take a couple of function callbacks for the differences.

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

14 years agoAllow GetSomeSpace_r to select an optimal host
Andrew Deason [Mon, 15 Feb 2010 22:22:56 +0000]
Allow GetSomeSpace_r to select an optimal host

Previously GetSomeSpace_r would never find an 'ideal' host for which to
clear callbacks, since lih0_r and lih1_r required a non-NULL rock to do
anything. Remove the requirement for the passed-in host rock to be
non-NULL, and make lih*_r more threadsafe, by passing in a parameter
struct for the rock.

Also attempt to make the GSS_r code a bit more clear with some
descriptive variable names and such.

FIXES 126451

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

14 years agoh_TossStuff_r: make sure host does not go away
Andrew Deason [Tue, 16 Feb 2010 17:08:38 +0000]
h_TossStuff_r: make sure host does not go away

When h_TossStuff_r h_NBLock_r's a host, it is not only possible for
someone else to grab a hold on the host, but in theory it's also
possible for someone to hold a host, release it, and for the host to be
deleted again (assuming some callers hold HOSTDELETED hosts, which they
should not be doing).

To make this safety check a bit more robust, hold the host in
h_TossStuff_r before h_NBLock_r'ing, to ensure that it does not go away
while we're waiting for H_LOCK.

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

14 years agoanalyze warning fix
Derrick Brashear [Mon, 22 Feb 2010 18:58:58 +0000]
analyze warning fix

initialize variable. warnings caught this in the other compiler

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

14 years agoPrevent deadlock if fs_stateSave panics
Andrew Deason [Mon, 22 Feb 2010 17:56:07 +0000]
Prevent deadlock if fs_stateSave panics

fs_stateSave can call ShutDownAndCore(PANIC) if it detects host list
corruption. Right now this will deadlock the shutdown thread, since
we're still holding a read lock on the FS state when we do so, and
ShutDownAndCore will attempt to acquire a write lock. Do two things to
make this a bit better:

 -- Unlock the FS state before calling fs_stateSave, sine we're no
 longer looking at the FS state (the 'state' in fs_stateSave refers to
 the host list and callback lists, not the state locked by
 FS_STATE_*LOCK)

 -- If ShutDownAndCore detects that it was called inside of
 ShutDownAndCore, skip shutting down the volume and host packages, since
 they have already been shut down

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

14 years agoCheck for HOSTDELETED before h_Hold_r
Andrew Deason [Fri, 12 Feb 2010 23:44:31 +0000]
Check for HOSTDELETED before h_Hold_r

A few places h_Hold_r a host and later drop and reacquire H_LOCK without
checking if the hostFlags contains HOSTDELETED. This can cause a race
with h_TossStuff_r where we later reference a host that is about to be
freed or already has been freed.

Add checks for HOSTDELETED in these places, and skip over the deleted
hosts.

FIXES 126454

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

14 years agoCorrect the h_Enumerate_r hostList safety check
Andrew Deason [Fri, 12 Feb 2010 22:30:44 +0000]
Correct the h_Enumerate_r hostList safety check

Ide1e5aca7c2c4a4af3f62bc07821db694f2f9999 added safety checks for a few
traversals through hostList, including the traversal in h_Enumerate_r.
Unfortunately, h_Enumerate_r may not hold H_LOCK over its entire
traversal (h_Release_r can drop and reacquire it), so the value of
hostCount is not guaranteed to stay the same.

A host may be deleted during the loop, or right near the end, decreasing
hostCount to below our current running 'count' of hosts, triggering the
panic unnecessarily.

Also, we break out of the loop if the H_ENUMERATE_ISSET_BAIL test
succeeds, making the panic also incorrectly trigger then.

So instead, remember the value of hostCount, and ensure that we've
actually exceeded that count in the post-loop check.

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

14 years agoh_TossStuff_r: check held-ness after lock
Andrew Deason [Mon, 15 Feb 2010 16:55:33 +0000]
h_TossStuff_r: check held-ness after lock

h_TossStuff_r checks if a host is held or locked by another thread
before trying to delete the host. Unfortunately, it checks if it is
locked before checking if it is held, and the lock check drops H_LOCK.
Thus, another thread could hold the host while we don't have H_LOCK, and
we could delete a host that is being held.

Although it is a bug if any thread holds a host that is being deleted,
some instances of this still exist, so make the check more robust.
Reverse the order of the tests, so we detect if someone held the host
while the lock check dropped H_LOCK.

Also log when this happens, as it indicates a bug occurring.

FIXES 126454

Change-Id: I8fa972c430e63fc46ca4fadcc3429173ac91a947
Reviewed-on: http://gerrit.openafs.org/1312
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoanalyze paranoia
Derrick Brashear [Mon, 22 Feb 2010 17:15:15 +0000]
analyze paranoia

don't pass a null pointer to FindVolume in case one shows up

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

14 years agoidledead client dont interrupt writes
Derrick Brashear [Sun, 21 Feb 2010 22:15:26 +0000]
idledead client dont interrupt writes

allowing failover is nonsensical, there's nothing to fail to. keep trying to
write. if we want to change this, we need to handle it better than just this.

Change-Id: Ibed4c63182f44ed9e659895e4868b4192d004688
Reviewed-on: http://gerrit.openafs.org/1355
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoInit ih_synced for new ihandle
Rainer Toebbicke [Fri, 19 Feb 2010 09:26:57 +0000]
Init ih_synced for new ihandle

One small step towards a valgrind-tolerant universe: ih_synced
indicates that an inode should be synced which better be deterministic.

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

14 years agoAvoid dprintf conflict
Marc Dionne [Fri, 19 Feb 2010 02:20:20 +0000]
Avoid dprintf conflict

Rename dprintf to afs_dprintf to avoid potential conflict with
system headers on some platforms.

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

14 years agoLinux: bdi doesn't always have a name
Simon Wilkinson [Thu, 18 Feb 2010 23:09:40 +0000]
Linux: bdi doesn't always have a name

The 'name' element of the backing_dev_info structure is new in
2.6.32 - add yet another configure test, and #ifdef to protect our
setting of it.

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

14 years agoUnix: Fix objdir builds
Simon Wilkinson [Wed, 17 Feb 2010 13:46:23 +0000]
Unix: Fix objdir builds

Make some changes to the Unix build system so that object directory
builds work again. In particular, change the way that we call
xcodebuild on Darwin, so that source and binary can live in different
places.

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

14 years agoAdd xdrmem and xdrlen to shlib builds
Simon Wilkinson [Sun, 14 Feb 2010 00:45:19 +0000]
Add xdrmem and xdrlen to shlib builds

Another day, another set of forgotten build objects ...

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

14 years agoAdd support for amd64_obsd46
Andrew Deason [Wed, 17 Feb 2010 18:05:53 +0000]
Add support for amd64_obsd46

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

14 years agoInclude stdint.h when using intptr_t
Andrew Deason [Wed, 17 Feb 2010 18:56:51 +0000]
Include stdint.h when using intptr_t

Some platforms such as OpenBSD require including stdint.h before you can
use intptr_t. So, include stdint.h (if it is available) whenever we use
intptr_t.

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

14 years agokill macos prior to panther
Derrick Brashear [Wed, 17 Feb 2010 18:26:43 +0000]
kill macos prior to panther

we haven't had a 10.2 machine to build on in quite a while...

might as well pull it, it probably doesn't work anymore

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

14 years agosalvager: avoid needing temp files to stay around
Andrew Deason [Wed, 2 Dec 2009 19:37:27 +0000]
salvager: avoid needing temp files to stay around

The salvager makes use of a couple of temporary files to store some
information while doing a salvage. Instead of referring to these files
by path name everywhere, pass around file handles instead. That way we
can unlink the files immediately, and they will be deleted on close.
This removes one of the roadblocks to allowing multiple salvages on the
same partition to occur at once (since otherwise other salvagers would
remove the temporary files on startup), and also makes it much less
likely that old temporary files will be left lying around in the first
place.

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

14 years agoDAFS: Maintain viced volume group hierarchy cache
Andrew Deason [Thu, 4 Feb 2010 22:47:19 +0000]
DAFS: Maintain viced volume group hierarchy cache

When salvaging a volume (with DAFS or not), it is required to read the
volume headers of all volumes on the partition, so we know what volumes
are in the same volume group as the salvaged volume. Currently with
DAFS, this requirement can make demand-salvages very slow, since each
demand-salvage must read each volume header on the partition.

So, instead of having each demand-salvage read the volume headers
itself, have a demand-salvage request the required volume group
hierarchy information from the fileserver. The fileserver will scan the
partition's volume headers, and will keep the hierarchy cached in
memory. Any modifications to this hierarchy from volume
creation/deletion will update this volume group cache (VGC) via FSSYNC
commands.

This results in a dramatic salvaging speedup when many demand-salvages
are requested, and eliminates the cases where DAFS salvaging can be
significantly slower than non-DAFS salvaging.

FIXES 124488

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

14 years agoAdd a general file-level locking API
Andrew Deason [Thu, 4 Feb 2010 22:08:48 +0000]
Add a general file-level locking API

Add an API for acquiring and releasing file-level locks. This abstracts
away the platform-specific aspects of file locking, and also makes the
locking work when several threads attempt to acquire a lock within the
same process.

This commit just adds the functions and datatypes; nothing actually uses
them. The users will be added in (hopefully nearby) future commits.

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

14 years agolinux bdi allocate memory
Derrick Brashear [Tue, 16 Feb 2010 18:10:09 +0000]
linux bdi allocate memory

allocate bdi with osi_Alloc (and free with osi_Free)
seems to fix an oops

FIXES 126514

Change-Id: I667391710c5fd2b6712117471247f1cd7c20aa9b
Reviewed-on: http://gerrit.openafs.org/1332
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 agoaklog: Refactor token management operations
Simon Wilkinson [Sat, 13 Feb 2010 01:14:07 +0000]
aklog: Refactor token management operations

Pull the token management operations (get, set and compare tokens) out
into their own functions. Again, this is purely a refactoring exercise -
no behaviour changes are anticipated as a result of this change.

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

14 years agoaklog: Refactor token acquisition code
Simon Wilkinson [Fri, 12 Feb 2010 23:38:09 +0000]
aklog: Refactor token acquisition code

This change refactors all of the rxkad specific token acquisition code
out of the common auth_cell loop, and into a number of functions of its
own. There should be no functional changes.

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

14 years agoaklog: Use a function to print debug statements
Simon Wilkinson [Fri, 12 Feb 2010 11:54:17 +0000]
aklog: Use a function to print debug statements

aklog was scattered with things like
    if (dflag) {
printf("Oh no, the world is ending\n");
    }

Simplify these by adding a dprintf() function, which only prints its
arguments if dflag is defined. Use this throughout the code.

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

14 years agoaklog: Actually use new get_realm_from_cred fn
Simon Wilkinson [Wed, 17 Feb 2010 14:01:14 +0000]
aklog: Actually use new get_realm_from_cred fn

An earlier patch added the new get_realm_from_cred function,
but failed to update the callsite to use it. Fix that.

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

14 years agoaklog: Tidy realm handling
Simon Wilkinson [Fri, 12 Feb 2010 11:13:16 +0000]
aklog: Tidy realm handling

Assorted small changes to the way realms are handled by aklog:
  * Remove static buffers when realms are passed between functions
  * Add cleanup for all dynamically allocated strings to auth_to_cell
  * Create an extract_realm helper function to handle extracting realm
    information from principals.
  * Add a function to handle extracting realm information from decoded
    tickets

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

14 years agoaklog: Dispose of the pointless confname string
Simon Wilkinson [Fri, 12 Feb 2010 10:29:00 +0000]
aklog: Dispose of the pointless confname string

confname makes a static copy of the AFSDIR_CLIENT_ETC_DIRPATH string. As
pr_Initialize takes it as const, there's no need to maintain our own
copy, and so this is superfluous. Remove it.

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

14 years agoaklog: Clean up cell handling
Simon Wilkinson [Fri, 12 Feb 2010 10:19:26 +0000]
aklog: Clean up cell handling

Clean up the aklog get_cellconfig routine, so that it is no longer
reliant upon global variables.
  * Tidy the handling of local_cell, and use dynamically allocated,
    rather than fixed length buffers.
  * Use the cell name contained within the afsconf_cell structure,
    rather than a local copy
  * Access linked cell information from afsconf_cell, rather than
    explicitly returning it
  * Don't use globals for linkedcell

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

14 years agoaklog: Cosmetic cleanup
Simon Wilkinson [Fri, 12 Feb 2010 09:48:44 +0000]
aklog: Cosmetic cleanup

Fix indentation so that code lines up correctly,
Fix function declarations so they match the house style.
Remove some dead code and comments
Move comment blocks so they're above the code that they're describing.
Remove unused 'lastcell' string

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

14 years agoUnix CM: Tidy up the statistics interface
Simon Wilkinson [Sun, 7 Feb 2010 20:51:55 +0000]
Unix CM: Tidy up the statistics interface

Sort out the function call statistics interface. Whilst it's still
wretched, this makes it a little less so.
*) Add some warnings at the start of the afs_CMStats structure about
   what needs to be done when adding things there
*) Remove the conditionals around the CacheBypass counters, so that stats
   clients don't need to be built with the same options as servers
*) Add all of the stats entries added after IBM to the xstat_cm_test
   routine
*) Add a warning to xstat_cm_test if the data returned from the server
   differs in size to the local stats structure.

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

14 years agoprdb_verify -rebuild with supergroups fix
Jason Rogers [Mon, 15 Feb 2010 23:19:12 +0000]
prdb_verify -rebuild with supergroups fix

This change eliminates the redundant iteration over the
supergroup[] array in DumpRecreate. By iterating over both
this array and entries[], duplicate au lines are created
and the count variable becomes incorrect. Furthermore,
the au lines created in the supergroups[] section were
incorrectly in the form of au <group> <member> instead
of au <member> <group>.

FIXES 126500

Change-Id: I087772b63934406273f153f4b8a581d965f1e4d5
Reviewed-on: http://gerrit.openafs.org/1316
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos bulkstat support
Derrick Brashear [Fri, 12 Feb 2010 21:46:33 +0000]
macos bulkstat support

add KPI-based bulkstat support for macos

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

14 years agoxdrmem for ukernel
Derrick Brashear [Tue, 16 Feb 2010 04:51:52 +0000]
xdrmem for ukernel

fix up the build for ukernel when warnings are enabled

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

14 years agoUnix CM: Add xdrmem and xdrlen to kernel builds
Simon Wilkinson [Sun, 14 Feb 2010 00:45:19 +0000]
Unix CM: Add xdrmem and xdrlen to kernel builds

Add the new xdrmem and xdrlen XDR sources to kernel space. Make some
changes to the xdrmem header file to permit it to build in kernel space.

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

14 years agoAdd xdrlen and xdrmem to pthread build
Simon Wilkinson [Sun, 14 Feb 2010 00:38:47 +0000]
Add xdrlen and xdrmem to pthread build

Add xdrlen and xdrmem to libafsrpc, so they're available to pthreaded
binaries.

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

14 years agoRemove the old new token interface
Simon Wilkinson [Sat, 6 Feb 2010 13:20:34 +0000]
Remove the old new token interface

ktc.c has had for a long, long time a 'new' token interface, which
was only enabled if KERNEL_KTC_COMPAT is set. However, this is never
defined in our tree, relies on a syscall that just won't work on
platforms such as Linux, and won't support any of the new token
formats we're planning. So, just remove this interface from our
code - it's in version control should we want to revisit it in the
future.

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

14 years agoHave bosserver catch SIGTERM and shut down gracefully.
Adam Megacz [Mon, 15 Feb 2010 01:30:42 +0000]
Have bosserver catch SIGTERM and shut down gracefully.

Many modern process supervision systems (runsv, daemontools, sysvinit)
expect to be able to terminate a process gracefully by sending it a
SIGTERM; although SIGQUIT is nominally used for this purpose it seems
to have fallen into disuse as a matter of practice.  Therefore, to
integrate as smoothly as possible with the outside world, bosserver
should catch SIGTERM and interpret it as a request to shut down
gracefully.

When used with process supervision (runsv or daemontools), the
previous behavior would cause bosserver to die but leave its children
running, and then bosserver would get restarted by the supervisor.
The result is a situation where there would be two copies of every
bnode process.  Mayhem ensues.

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

14 years agoSome minor rewording and grammatical tweaks of the CellAlias man page
Jason Edgecombe [Sat, 13 Feb 2010 14:16:22 +0000]
Some minor rewording and grammatical tweaks of the CellAlias man page

Added some text that the CellAlias file is only used on Unix.

LICENSE BSD

Change-Id: I913d6a0774240ffc16cf92cfa92c4b2d06f41fd6
Reviewed-on: http://gerrit.openafs.org/1307
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoadd bulk newvcache method
Derrick Brashear [Fri, 12 Feb 2010 21:37:19 +0000]
add bulk newvcache method

let NewVCache return a vcache which is already configured for bulkfetching
takes the bulkstatus "sequence number" and sets the flags and length

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

14 years agoInitialize variable that can potentially be used uninitialized
Marc Dionne [Sat, 13 Feb 2010 00:23:52 +0000]
Initialize variable that can potentially be used uninitialized

Some compiler versions complain that "code" might be used uninitialized
here.  If opening the configuration files fails, conf would be null
and the condition would indeed test an uninitialized variable.

Change-Id: I1d4da49a5afc94ac6617201110be84a0e5548f38
Reviewed-on: http://gerrit.openafs.org/1306
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agodarwin vn hold dead code removal
Derrick Brashear [Fri, 12 Feb 2010 21:16:56 +0000]
darwin vn hold dead code removal

pull out the unused code which tries to cope with a failed vnode hold.
if we become able to do so, we can do so later

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

14 years agoirix stdarg printing
Derrick Brashear [Wed, 10 Feb 2010 20:57:48 +0000]
irix stdarg printing

use icmn_err facility to print error (and panic for osi_Panic)
note that solaris vcmn_err is basically the same, but there
may be issues per some commenters.

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

14 years agoDocument FSSYNC commands
Andrew Deason [Thu, 4 Feb 2010 19:00:47 +0000]
Document FSSYNC commands

Provide some explanation for the various FSSYNC commands, and what they
are there for.

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

14 years agoirix test kernel cleanup
Derrick Brashear [Fri, 12 Feb 2010 05:07:02 +0000]
irix test kernel cleanup

add missing paren for irix test kernel case

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

14 years agoWindows: Prevent explorer shell extension from crashing if symbolic link add fails
Jeffrey Altman [Fri, 12 Feb 2010 02:45:40 +0000]
Windows: Prevent explorer shell extension from crashing if symbolic link add fails

The explorer shell extension was passing the wrong parameters to
the MessageBox API when a symbolic link add failed.   The end result
was stack corruption.

FIXES 126406

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

14 years agoremove erroneous disabling of darwin rx event scheduling hook openafs-devel-1_5_72
Derrick Brashear [Thu, 11 Feb 2010 05:30:54 +0000]
remove erroneous disabling of darwin rx event scheduling hook

the hook added to force reschedule to be noticed was disabled in the
course of testing. re-enable it.

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