Commit Graph

6830 Commits

Author SHA1 Message Date
Derrick Brashear
42d3d08b22 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>
2010-02-27 15:32:11 -08:00
Derrick Brashear
d459825b23 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>
2010-02-27 09:39:26 -08:00
Derrick Brashear
fb79f12658 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>
2010-02-27 09:38:35 -08:00
Derrick Brashear
d24078658d 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>
2010-02-27 08:58:15 -08:00
Andrew Deason
23e600ae10 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>
2010-02-26 15:02:10 -08:00
Marc Dionne
b6408585b5 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>
2010-02-26 13:40:36 -08:00
Derrick Brashear
00d56c519b 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>
2010-02-25 20:58:40 -08:00
Derrick Brashear
5b12214cef 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>
2010-02-25 20:42:27 -08:00
Derrick Brashear
3d81e4c1f0 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>
2010-02-25 14:00:34 -08:00
Derrick Brashear
518b3abb73 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>
2010-02-25 13:55:40 -08:00
Derrick Brashear
93e9964039 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>
2010-02-25 13:54:28 -08:00
Rainer Toebbicke
726e1e13ff 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>
2010-02-25 06:49:22 -08:00
Derrick Brashear
70c9757283 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>
2010-02-24 21:07:19 -08:00
Derrick Brashear
d1923139e6 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>
2010-02-24 21:01:34 -08:00
Derrick Brashear
14ff060627 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>
2010-02-24 20:47:17 -08:00
Derrick Brashear
8940eb9dcf 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>
2010-02-24 13:06:44 -08:00
Derrick Brashear
142883cae8 remove dropbox attribute leak fix
change 6ec1846164, 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>
2010-02-24 08:14:56 -08:00
Andrew Deason
7f4a67b8f0 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>
2010-02-23 22:29:48 -08:00
Andrew Deason
c43625d91b 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>
2010-02-23 22:28:45 -08:00
Andrew Deason
cbf5f6341c 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>
2010-02-23 22:28:16 -08:00
Derrick Brashear
c5e5790661 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>
2010-02-23 22:15:48 -08:00
Chaz Chandler
c7c742afa0 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>
2010-02-23 15:37:56 -08:00
Anders Kaseorg
91e50aa81b 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>
2010-02-23 11:54:34 -08:00
Anders Kaseorg
660c7a3952 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>
2010-02-23 11:54:07 -08:00
Anders Kaseorg
99e704c791 Adjust afs_lockctl to compensate for byte-range lock fixes
As of commit 49b7bbdd3b, 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>
2010-02-23 11:44:30 -08:00
Anders Kaseorg
d3abbebcb0 Linux: Fix conversion of whole-file locks
An overflow bug in commit 49b7bbdd3b
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>
2010-02-23 11:42:00 -08:00
Andrew Deason
2cd1335257 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>
2010-02-22 12:15:15 -08:00
Andrew Deason
eb7d90fd0d 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>
2010-02-22 12:14:43 -08:00
Andrew Deason
380bd77c32 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>
2010-02-22 12:00:55 -08:00
Derrick Brashear
1e731a22ae 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>
2010-02-22 11:03:41 -08:00
Andrew Deason
1e744d5e56 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>
2010-02-22 10:35:52 -08:00
Andrew Deason
b8c3c6add9 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>
2010-02-22 10:35:24 -08:00
Andrew Deason
4dfbbd34ce 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>
2010-02-22 10:31:43 -08:00
Andrew Deason
45aceee984 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>
2010-02-22 09:21:07 -08:00
Derrick Brashear
48908e2a93 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>
2010-02-22 09:16:41 -08:00
Derrick Brashear
01f42cad66 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>
2010-02-22 06:52:40 -08:00
Rainer Toebbicke
fa8601f9c5 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>
2010-02-19 06:29:01 -08:00
Marc Dionne
ae0e8fc066 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>
2010-02-18 18:36:10 -08:00
Simon Wilkinson
a9951410e1 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>
2010-02-18 18:08:58 -08:00
Simon Wilkinson
1b4f1648e9 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>
2010-02-17 19:58:47 -08:00
Simon Wilkinson
84167a86d4 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>
2010-02-17 19:58:13 -08:00
Andrew Deason
d750c28ac2 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>
2010-02-17 12:49:40 -08:00
Andrew Deason
1e53da39f5 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>
2010-02-17 12:49:27 -08:00
Derrick Brashear
6201628022 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>
2010-02-17 10:49:18 -08:00
Andrew Deason
f96ca93b73 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>
2010-02-17 09:58:16 -08:00
Andrew Deason
60e8dcb4e6 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>
2010-02-17 09:33:18 -08:00
Andrew Deason
ab32b23806 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>
2010-02-17 09:29:04 -08:00
Derrick Brashear
8f1e1199a2 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>
2010-02-17 09:19:02 -08:00
Simon Wilkinson
86acebb123 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>
2010-02-17 09:18:37 -08:00
Simon Wilkinson
725f0a63a3 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>
2010-02-17 09:15:31 -08:00