Commit Graph

6960 Commits

Author SHA1 Message Date
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
Simon Wilkinson
267ccb986c 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>
2010-02-17 09:08:00 -08:00
Simon Wilkinson
7cdc89edca 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>
2010-02-17 08:46:16 -08:00
Simon Wilkinson
f7b5d7153c 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>
2010-02-17 05:13:05 -08:00
Simon Wilkinson
f8c6bfffd3 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>
2010-02-17 05:12:52 -08:00
Simon Wilkinson
60ea6a23ab 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>
2010-02-17 05:12:32 -08:00
Simon Wilkinson
05d667e59b 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>
2010-02-17 05:11:59 -08:00
Simon Wilkinson
481098e04c 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>
2010-02-17 05:10:05 -08:00
Jason Rogers
fa2536c02c 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>
2010-02-17 05:09:13 -08:00
Derrick Brashear
4bc04a79e7 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>
2010-02-16 21:32:46 -08:00
Derrick Brashear
a0c8c3da0d 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>
2010-02-16 07:34:12 -08:00
Simon Wilkinson
000c665881 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>
2010-02-15 17:42:02 -08:00
Simon Wilkinson
8cf4b945b9 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>
2010-02-15 17:41:33 -08:00
Simon Wilkinson
06f6dc8dc7 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>
2010-02-15 17:40:32 -08:00
Adam Megacz
79ad82ccde 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>
2010-02-15 13:13:37 -08:00
Jason Edgecombe
8ea6c727aa 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>
2010-02-15 04:53:37 -08:00
Derrick Brashear
c892043b95 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>
2010-02-12 19:29:09 -08:00
Marc Dionne
9a2741d001 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>
2010-02-12 16:47:57 -08:00
Derrick Brashear
029b470e67 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>
2010-02-12 13:22:33 -08:00
Derrick Brashear
e78f6f33b5 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>
2010-02-12 11:37:06 -08:00
Andrew Deason
769be238b0 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>
2010-02-11 23:00:07 -08:00