]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agovolser: More renaming of putshort and putint32
Simon Wilkinson [Fri, 25 Mar 2011 00:37:52 +0000 (00:37 +0000)]
volser: More renaming of putshort and putint32

Commit 2d6bc153689f14f8690878b15d9fb711a56b0546 renamed the putshort
and putint32 macros in dumpstuff.c to avoid conflicts with macros
that are defined in resolv.h. However, an almost identical copy of
that code also exists in vol-dump.c

Rename putshort and putint32 there too.

Change-Id: I9b98f99fb5c2b24b57e2bc480c891aa86b6df344
Reviewed-on: http://gerrit.openafs.org/4317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoafs_snprintf is dead, long live rk_snprintf
Simon Wilkinson [Thu, 24 Mar 2011 15:36:49 +0000 (15:36 +0000)]
afs_snprintf is dead, long live rk_snprintf

We were shipping our own implementation of snprintf and friends, as
afs_snprintf. Now that we're using roken everywhere, we can make use
of roken's rk_snprintf, and no longer need to ship our own.

As Window's snprintf isn't C99 compliant, roken always uses its own
on this platform. The effect of this is that we can no longer use
AFS_UINT64_FMT and AFS_INT64_FMT for snprintf calls (and the Log
functions that call them). Instead, we need to always use the
Unix format specifiers when calling these functions.

Make thse changes across the whole tree.

Change-Id: I3fffef97566f239ad639f15c4decd136d5bbd765
Reviewed-on: http://gerrit.openafs.org/4316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Don't use %I for IP addresses
Simon Wilkinson [Sun, 27 Mar 2011 20:06:27 +0000 (21:06 +0100)]
Windows: Don't use %I for IP addresses

%I isn't supported by the roken printf functions. In preparation
for switching over to them, replace our use of asprintf to convert
IP addresses to strings with the afs_inet_ntoa_r function.

Change-Id: Id38dc56405071d62fb2b12e4f69905aa7a2026b0
Reviewed-on: http://gerrit.openafs.org/4362
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoLinux: 2.6.39: deal with BKL removal
Marc Dionne [Sun, 27 Mar 2011 15:20:17 +0000 (11:20 -0400)]
Linux: 2.6.39: deal with BKL removal

For 2.6 kernels the OpenAFS code is already BKL free, but the
corresponding header file smp_lock.h is still included in various
places.  This header no longer exists, so remove all occurrences
outside of LINUX24.

Change-Id: Ib659fa787eab4b39efce5b0a62f5723950e79703
Reviewed-on: http://gerrit.openafs.org/4361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agonew files for FreeBSD packaging at 1.6.0pre3
Ben Kaduk [Fri, 17 Dec 2010 06:16:30 +0000 (01:16 -0500)]
new files for FreeBSD packaging at 1.6.0pre3

Packaging for use with FreeBSD's Ports Collection.
The directory layout is flattened, and a couple of files that do not
make sense here are not included.
The afsd rc script lives in packaging/ as it is not runnable in
its committed form, it requires variable substitution that occurs
at install-time from the Ports Collection.

Reviewed-on: http://gerrit.openafs.org/4351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7b4da89c8ed266959ec8d3ae4f6627b096206dee)

Change-Id: I0051b9d609736fc172a7c3fefd23cb910b4543e6
Reviewed-on: http://gerrit.openafs.org/4355
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRemove outdated rc file for afsd on FBSD
Ben Kaduk [Mon, 22 Nov 2010 04:32:37 +0000 (23:32 -0500)]
Remove outdated rc file for afsd on FBSD

The semantics of rc scripts have changed drastically since this
was written.  It will need to be rewritten from scratch; the
new version will live in src/packaging/FreeBSD as afsd.in, as it
is included with the port packaging in that form.

Reviewed-on: http://gerrit.openafs.org/4350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit dce071acef1119aceca7eb80a66c035fb03e9259)

Change-Id: I17bd69033e51bc5c59d70f982f8deb04fd18d5b4
Reviewed-on: http://gerrit.openafs.org/4354
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRemove stale FreeBSD packaging
Ben Kaduk [Sat, 6 Nov 2010 04:30:12 +0000 (00:30 -0400)]
Remove stale FreeBSD packaging

We no longer use the Transaarc paths, and the rc environment
and packaging methods are quite different now.

Reviewed-on: http://gerrit.openafs.org/4349
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f901c0f5258c14f5d04d9b64ca5b472c468f60bd)

Change-Id: I764eb311082fbaf2b6b918f9023b53f0f3f67872
Reviewed-on: http://gerrit.openafs.org/4353
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovlserver: Rationalise usage message
Simon Wilkinson [Thu, 24 Mar 2011 10:57:47 +0000 (10:57 +0000)]
vlserver: Rationalise usage message

Rather than having 2 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.

Change-Id: I5b2135fba3d42fdbb879d5e8cb61933f4929d598
Reviewed-on: http://gerrit.openafs.org/4305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoptserver: Rationalise usage message
Simon Wilkinson [Thu, 24 Mar 2011 10:28:59 +0000 (10:28 +0000)]
ptserver: Rationalise usage message

Rather than having 4 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.

Change-Id: If888a64307b78189fcf617bbe0dc4ca9e55e8d2b
Reviewed-on: http://gerrit.openafs.org/4304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoHP/UX: Make more use of roken
Simon Wilkinson [Fri, 25 Mar 2011 17:14:26 +0000 (17:14 +0000)]
HP/UX: Make more use of roken

Make more use of roken on HP/UX by letting it provide definitions
for random and srandom, and using its implementation of
getdtablesize

Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b
Reviewed-on: http://gerrit.openafs.org/4341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agocrypto: Fixes for recent Heimdal changes
Simon Wilkinson [Fri, 25 Mar 2011 17:34:51 +0000 (17:34 +0000)]
crypto: Fixes for recent Heimdal changes

The last Heimdal import changed the name of a number of structures
so that they are private to the krb5 code. Mirror this by changing our
prototypes to match the new names.

This solves the key_type problem that we previously fixed by #defining
key_type to hc_key_type, so remove that define.

Change-Id: I9b3f1712b0bf6641a780cc4002e73f8a511ff080
Reviewed-on: http://gerrit.openafs.org/4340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoImport of code from heimdal
Heimdal Developers [Fri, 25 Mar 2011 17:18:37 +0000 (17:18 +0000)]
Import of code from heimdal

This commit updates the code imported from heimdal to
987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583)

New files are:
roken/getdtablesize.c

Upstream changes are:

Love Hornquist Astrand (2):
      prefix symbols that are _krb5_ structures
      prefix internal structures with _krb5_

Change-Id: I36aae13d877b6b40b8d2db47217884dc24f3f9c8
Reviewed-on: http://gerrit.openafs.org/4339
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd getdtablesize to the roken import
Simon Wilkinson [Fri, 25 Mar 2011 17:17:47 +0000 (17:17 +0000)]
Add getdtablesize to the roken import

Change-Id: I089e3976e90429e39102eeb82a74ece97e87bd25
Reviewed-on: http://gerrit.openafs.org/4338
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoaklog: Tidy header includes
Simon Wilkinson [Thu, 24 Mar 2011 15:58:19 +0000 (15:58 +0000)]
aklog: Tidy header includes

Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also add pwd.h to the list of headers that we check for in configure,
and that roken will include if they are available

Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1
Reviewed-on: http://gerrit.openafs.org/4303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoNO_DES_H_INCLUDE is no longer necessary
Simon Wilkinson [Thu, 24 Mar 2011 15:50:47 +0000 (15:50 +0000)]
NO_DES_H_INCLUDE is no longer necessary

Now that we're using hcrypto for DES, rather than rolling our own,
we don't need to specific NO_DES_H_INCLUDE, so get rid of it.

Change-Id: Id370ddacb0a57264cc8f5cdda3c59fbb627708af
Reviewed-on: http://gerrit.openafs.org/4302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoptserver: Tidy header includes
Simon Wilkinson [Thu, 24 Mar 2011 10:01:00 +0000 (10:01 +0000)]
ptserver: Tidy header includes

Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also reorder our headers so that they go

 #include <afsconfig.h>
 #include <afs/param.h>
 #include <afs/stds.h> (if required)

 #include <roken.h>

 [ ... out of directory headers ... ]

 [ ... local headers ... ]

Change-Id: I9214f6bf65085947cfc588b47484e1b022ffc5b1
Reviewed-on: http://gerrit.openafs.org/4299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agonew files for FreeBSD packaging at 1.6.0pre3
Ben Kaduk [Fri, 17 Dec 2010 06:16:30 +0000 (01:16 -0500)]
new files for FreeBSD packaging at 1.6.0pre3

Packaging for use with FreeBSD's Ports Collection.
The directory layout is flattened, and a couple of files that do not
make sense here are not included.
The afsd rc script lives in packaging/ as it is not runnable in
its committed form, it requires variable substitution that occurs
at install-time from the Ports Collection.

Change-Id: I72d6c2ee7106611b0ec9bfe3e47a471ed66b7255
Reviewed-on: http://gerrit.openafs.org/4351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRemove outdated rc file for afsd on FBSD
Ben Kaduk [Mon, 22 Nov 2010 04:32:37 +0000 (23:32 -0500)]
Remove outdated rc file for afsd on FBSD

The semantics of rc scripts have changed drastically since this
was written.  It will need to be rewritten from scratch; the
new version will live in src/packaging/FreeBSD as afsd.in, as it
is included with the port packaging in that form.

Change-Id: I397f8d5a9dc0430f1a9e8f2f0f378585cee4bd3b
Reviewed-on: http://gerrit.openafs.org/4350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRemove stale FreeBSD packaging
Ben Kaduk [Sat, 6 Nov 2010 04:30:12 +0000 (00:30 -0400)]
Remove stale FreeBSD packaging

We no longer use the Transaarc paths, and the rc environment
and packaging methods are quite different now.

Change-Id: I6915f41455dcf0518472b0a81fe7e5c559d4a994
Reviewed-on: http://gerrit.openafs.org/4349
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: export roken symbols
Jeffrey Altman [Sat, 26 Mar 2011 20:50:52 +0000 (16:50 -0400)]
Windows: export roken symbols

rk_vsnprintf
rk_vasnprintf

Change-Id: I39344d10a599e7bdc761ae03853b679ab6edcb4f
Reviewed-on: http://gerrit.openafs.org/4348
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: change log for 1.5.9904 (1.6.0pre4)
Jeffrey Altman [Sat, 26 Mar 2011 17:05:26 +0000 (13:05 -0400)]
Windows: change log for 1.5.9904 (1.6.0pre4)

Change-Id: I0c302ef20bf245f927f3167d3c662334e71d81df
Reviewed-on: http://gerrit.openafs.org/4347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoviced: REALLYCLOSE origfdP after CoW
Andrew Deason [Fri, 25 Mar 2011 20:54:01 +0000 (15:54 -0500)]
viced: REALLYCLOSE origfdP after CoW

In StoreData_RXStyle, we save a pointer to the original FdHandle_t if
we need to CopyOnWrite the target vnode, for the purposes of possibly
copying additional data later on.

After the CopyOnWrite call, this points to an inode that is not in the
current volume, and is thus less likely to be accessed. In CopyOnWrite
itself, the original file handle is FDH_REALLYCLOSE'd because of this,
so the handle does not remain in the cache. Do the same in
StoreData_RXStyle, so origfdP is always FDH_REALLYCLOSE'd after we
have called CopyOnWrite.

Change-Id: Ibe33d26120eb354318147f3a31fe32d38c6a70c6
Reviewed-on: http://gerrit.openafs.org/4344
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRevert "ihandle: Ensure FDH_REALLYCLOSE really closes"
Andrew Deason [Fri, 25 Mar 2011 20:44:57 +0000 (15:44 -0500)]
Revert "ihandle: Ensure FDH_REALLYCLOSE really closes"

This reverts commit a50f4c8d802c7b1c258a9cbe388dfab50425596b.

The only difference between FDH_CLOSE and FDH_REALLYCLOSE has to do
with ihandle cache behavior. FDH_REALLYCLOSE just indicates that the
reference we are closing is not likely to be used by other code, and
should be kicked out of the cache immediately (thus closing the file
descriptor). So, if there is another reference to that FdHandle_t, and
it issues an FDH_CLOSE, it thinks that the reference is likely to be
used again soon, and so the handle should not be kicked out of the
cache. Thus, the behavior before a50f4c8d was already correct.

Change-Id: I5a5c0c18b459f50e16c1d901ecc5f4eb18e8ef62
Reviewed-on: http://gerrit.openafs.org/4343
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: avoid MAXINT redefinition warning in vnode.c
Jeffrey Altman [Tue, 8 Mar 2011 16:04:07 +0000 (11:04 -0500)]
vol: avoid MAXINT redefinition warning in vnode.c

Change-Id: Ifeed132ac477a83f21af5b52cba7b658fb083221
Reviewed-on: http://gerrit.openafs.org/4179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Stop asking for DAFSness on SYNC_FAILED
Andrew Deason [Thu, 24 Mar 2011 22:57:32 +0000 (17:57 -0500)]
salvager: Stop asking for DAFSness on SYNC_FAILED

Break out of the loop so we stop asking the same thing repeatedly.

Reviewed-on: http://gerrit.openafs.org/4315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c5be1f72875bcb083a9ddef4621efecf62aa880e)

Change-Id: Ia90d4d439d054b95d8ea686ab853fb2067e19d38
Reviewed-on: http://gerrit.openafs.org/4337
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Allow the volumeSalvager to checkout volumes
Andrew Deason [Wed, 23 Mar 2011 22:38:35 +0000 (17:38 -0500)]
DAFS: Allow the volumeSalvager to checkout volumes

Reviewed-on: http://gerrit.openafs.org/4298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ad0afb57b9172bb7cfa0853b5f34259c0958d248)

Change-Id: I1eac22970f5665c7bdb2138ae380b59263836d99
Reviewed-on: http://gerrit.openafs.org/4336
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Perform daemon syscalls as kernel threads
Andrew Deason [Tue, 8 Mar 2011 22:59:32 +0000 (16:59 -0600)]
SOLARIS: Perform daemon syscalls as kernel threads

Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is
defined. Implement the necessary functionality so we spawn kernel
threads when a daemon syscall is called. Remove the rxk_Listener
wrapper, since it will be called in a separate thread via the
afs_DaemonOp interface.

Change-Id: I3c2570696a83f1837d08522fdd9dfc30dfefda4b
Reviewed-on: http://gerrit.openafs.org/4189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Consolidate afs_DaemonOp code
Andrew Deason [Tue, 8 Mar 2011 21:37:17 +0000 (15:37 -0600)]
libafs: Consolidate afs_DaemonOp code

Create the AFS_DAEMONOP_ENV define to simplify the logic of when we
perform afs_DaemonOp-y code paths. Also create the daemonOp_common
function, to perform common pre-fork operations that are common
between platforms.

Change-Id: Id93e1ffd7b8f4c0029cf4632239a519a619e9f9f
Reviewed-on: http://gerrit.openafs.org/4188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Correct ioctl syscall error handling
Andrew Deason [Fri, 25 Mar 2011 21:37:30 +0000 (16:37 -0500)]
SOLARIS: Correct ioctl syscall error handling

Do not use the return code from ioctl for errno. Ioctl itself will set
the errno and return value correctly, so don't mess with them.

Change-Id: I26c3afb5c77a3fce57e0d53d8671541805b32e08
Reviewed-on: http://gerrit.openafs.org/4345
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Indent afs_call.c ifdef maze
Andrew Deason [Tue, 8 Mar 2011 20:59:44 +0000 (14:59 -0600)]
libafs: Indent afs_call.c ifdef maze

Change-Id: I46198de875c16e221d4b75bb45afc9e2fd09dde1
Reviewed-on: http://gerrit.openafs.org/4187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoihandle: One more indentation fix
Andrew Deason [Fri, 25 Mar 2011 19:11:16 +0000 (14:11 -0500)]
ihandle: One more indentation fix

Change-Id: Icfed36ba0087d82706aea88e083576480244a9ad
Reviewed-on: http://gerrit.openafs.org/4342
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoadd AFS_DEMAND_ATTACH_UTIL
Derrick Brashear [Thu, 24 Mar 2011 20:11:17 +0000 (16:11 -0400)]
add AFS_DEMAND_ATTACH_UTIL

use this for non-pthreads "support code" e.g. salvager.

Reviewed-on: http://gerrit.openafs.org/4312
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 04bcfa2821c9deba151f562bb78452276d8d7443)

Change-Id: If956be50059ac128b5880131f961342c2661e5b7
Reviewed-on: http://gerrit.openafs.org/4335
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Stop asking for DAFSness on SYNC_FAILED
Andrew Deason [Thu, 24 Mar 2011 22:57:32 +0000 (17:57 -0500)]
salvager: Stop asking for DAFSness on SYNC_FAILED

Break out of the loop so we stop asking the same thing repeatedly.

Change-Id: Ifcb2cd62589867927ab9f8be03bab7b981e5f761
Reviewed-on: http://gerrit.openafs.org/4315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Allow the volumeSalvager to checkout volumes
Andrew Deason [Wed, 23 Mar 2011 22:38:35 +0000 (17:38 -0500)]
DAFS: Allow the volumeSalvager to checkout volumes

Change-Id: Ia255c866bbd4f6cb883383650373223f09875374
Reviewed-on: http://gerrit.openafs.org/4298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: trailing dot not part of volume name
Jeffrey Altman [Fri, 25 Mar 2011 12:58:20 +0000 (08:58 -0400)]
Windows: trailing dot not part of volume name

When dynamically adding new cell mount points to the Freelance
directory do not include a trailing dot when specifying the root.cell
volume name.

Change-Id: Idfae9e3f44380cbce49d77fff22bee15dc4856ce
Reviewed-on: http://gerrit.openafs.org/4333
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: trailing dot not part of volume name
Jeffrey Altman [Fri, 25 Mar 2011 12:58:20 +0000 (08:58 -0400)]
Windows: trailing dot not part of volume name

When dynamically adding new cell mount points to the Freelance
directory do not include a trailing dot when specifying the root.cell
volume name.

Change-Id: I23e47791b412f8f6260ca921daaf0200b19f4179
Reviewed-on: http://gerrit.openafs.org/4334
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: avoid recursive cm_CheckOfflineVolume
Jeffrey Altman [Wed, 16 Mar 2011 06:17:38 +0000 (02:17 -0400)]
Windows: avoid recursive cm_CheckOfflineVolume

Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used
to prevent cm_Analyze() from performing recursive
cm_CheckOfflineVolume operations that will exhaust the stack.

Reviewed-on: http://gerrit.openafs.org/4240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 11ad1e467f9708f12fe09228cbb827b8f4e1225b)

Change-Id: I3385d7b5a90e77ba8d6c87b9f29f39b62c17bb23
Reviewed-on: http://gerrit.openafs.org/4314
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoadd AFS_DEMAND_ATTACH_UTIL
Derrick Brashear [Thu, 24 Mar 2011 20:11:17 +0000 (16:11 -0400)]
add AFS_DEMAND_ATTACH_UTIL

use this for non-pthreads "support code" e.g. salvager.

Change-Id: I17825fa90de33a7a4d17f364713fd4602dae497b
Reviewed-on: http://gerrit.openafs.org/4312
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoutil: Tidy header includes
Simon Wilkinson [Thu, 24 Mar 2011 15:26:38 +0000 (15:26 +0000)]
util: Tidy header includes

Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: I5e5e67b695f07bf121b0543c7f936278009eff15
Reviewed-on: http://gerrit.openafs.org/4301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovlserver: Tidy header includes
Simon Wilkinson [Thu, 24 Mar 2011 10:54:44 +0000 (10:54 +0000)]
vlserver: Tidy header includes

Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times

Change-Id: I8b304bcd0e376601fbe622f7453d0295b188b697
Reviewed-on: http://gerrit.openafs.org/4300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Correct FSYNC_VOL_QUERY_VOP checks
Andrew Deason [Thu, 24 Mar 2011 15:22:52 +0000 (10:22 -0500)]
DAFS: Correct FSYNC_VOL_QUERY_VOP checks

Check that the given partition matches the vp partition, and ensure
the vp is not in an exclusive state when we check the state.
Otherwise, we may return pending vol ops for a volume on a different
partition, or we may incorrectly return that there is no pending vol
op when in fact the volume does not exist at all.

Change-Id: I3e28c0b7b372360d181a3310eb1fb7fce223ae59
Reviewed-on: http://gerrit.openafs.org/4308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Do not VDeregisterVolOp_r while exclusive
Andrew Deason [Wed, 23 Mar 2011 16:07:03 +0000 (11:07 -0500)]
DAFS: Do not VDeregisterVolOp_r while exclusive

We should wait for a volume to transition out of an exclusive state
before calling VDeregisterVolOp_r on a volume, since some code may be
examining the vol op outside of VOL_LOCK in an exclusive state. We
should be doing this anyway before performing volume state checks,
since we may be trying to e.g. attach the volume at the same time.

Reviewed-on: http://gerrit.openafs.org/4287
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d4ebebd0c3f89b65e93f0da6d53665271e6d2a61)

Change-Id: I55f07806a4e089577252ddb527a86142b10f797d
Reviewed-on: http://gerrit.openafs.org/4306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoCorrectly document the AFS client setuid defaults
Russ Allbery [Thu, 24 Mar 2011 19:56:56 +0000 (12:56 -0700)]
Correctly document the AFS client setuid defaults

AFS no longer honors setuid status by default.  Update the admin
guide documentation appropriately and add a warning recommending
against enabling setuid status given the limitations of the current
AFS protocol.

Reformat this section of the admin guide to make it easier to
maintain.

Reviewed-on: http://gerrit.openafs.org/4311
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7b00c17b49fe6a54f99f3c23bfc307a4b10d88e2)

Change-Id: I0dd638c37a116f39f93f08cc41c400f43a685940
Reviewed-on: http://gerrit.openafs.org/4313
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoCorrectly document the AFS client setuid defaults
Russ Allbery [Thu, 24 Mar 2011 19:56:56 +0000 (12:56 -0700)]
Correctly document the AFS client setuid defaults

AFS no longer honors setuid status by default.  Update the admin
guide documentation appropriately and add a warning recommending
against enabling setuid status given the limitations of the current
AFS protocol.

Reformat this section of the admin guide to make it easier to
maintain.

Change-Id: I6ea5859037d7d194df801f1a76583257cfc8bbe8
Reviewed-on: http://gerrit.openafs.org/4311
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: avoid recursive cm_CheckOfflineVolume
Jeffrey Altman [Wed, 16 Mar 2011 06:17:38 +0000 (02:17 -0400)]
Windows: avoid recursive cm_CheckOfflineVolume

Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used
to prevent cm_Analyze() from performing recursive
cm_CheckOfflineVolume operations that will exhaust the stack.

Change-Id: Ia4ee14307bf812cc2208482a19c1a914aca3e447
Reviewed-on: http://gerrit.openafs.org/4240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoUpdate NEWS for 1.6.0pre3 release
Russ Allbery [Tue, 22 Mar 2011 09:04:46 +0000 (02:04 -0700)]
Update NEWS for 1.6.0pre3 release

Add additional NEWS entries from the 1.6.0pre3 release notes.

Reviewed-on: http://gerrit.openafs.org/4270
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d4e8b729d8f216e9f033e95194740ff4cb566688)

Change-Id: Ic64819d6182c57e081e0e0d85c3629a3f7c11ed3
Reviewed-on: http://gerrit.openafs.org/4310
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoUpdate 1.6 NEWS entry based on 1.6.0pre2 release notes
Russ Allbery [Mon, 14 Feb 2011 20:36:18 +0000 (12:36 -0800)]
Update 1.6 NEWS entry based on 1.6.0pre2 release notes

Reviewed-on: http://gerrit.openafs.org/3950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f378dcf785967374309523a02ea06d6d1a3ff148)

Change-Id: Ic5625c6eb32238b177716c0f87ea6e62521a9de8
Reviewed-on: http://gerrit.openafs.org/4309
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorpm: Build srpms without %dist in their name
Simon Wilkinson [Wed, 23 Mar 2011 15:35:35 +0000 (15:35 +0000)]
rpm: Build srpms without %dist in their name

On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This
leads to makesrpm.pl building SRPMS with .el6 in their release. As we
endeavour to use the same SRPM on all of our Fedora platforms, this is
less than ideal, so change makesrpm.pl to squash the setting of %dist
before building the RPM.

Reviewed-on: http://gerrit.openafs.org/4285
Reviewed-by: Alexander Ivan Redinger <aredinger@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b0921071dd1b4d460d406985bba9619561444055)

Change-Id: I9e5bb2ce13378a0927763535d885a4728bd48f06
Reviewed-on: http://gerrit.openafs.org/4307
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos next support
Derrick Brashear [Wed, 23 Mar 2011 18:17:25 +0000 (14:17 -0400)]
macos next support

first brush at supporting next macos. totally not lion about it.
(cherry picked from commit XXX)

Change-Id: I4ede2a940c3881b588117c2b80f62f71563e78ce
Reviewed-on: http://gerrit.openafs.org/4291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoosconf: reduplicate systype stuff
Derrick Brashear [Wed, 23 Mar 2011 18:11:31 +0000 (14:11 -0400)]
osconf: reduplicate systype stuff

in some cases there is more to do, and in some cases we probably
already didn't build anymore, but, let's simplify.
(cherry picked from commit XXX)

Change-Id: I48248c2fc081413536763f09608e00153c4ea3ee
Reviewed-on: http://gerrit.openafs.org/4292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Correct VolumeNumber for large volume IDs
Andrew Deason [Fri, 11 Mar 2011 00:37:44 +0000 (18:37 -0600)]
vol: Correct VolumeNumber for large volume IDs

VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.

Reviewed-on: http://gerrit.openafs.org/4199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0f1c921fa1738c383fd576e287f356dd13f92a58)

Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e
Reviewed-on: http://gerrit.openafs.org/4284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Fix volume parsing on 64-bit
Andrew Deason [Wed, 16 Mar 2011 19:44:56 +0000 (14:44 -0500)]
salvager: Fix volume parsing on 64-bit

When an unsigned long is wider than an afs_uint32, comparing the
afs_uint32 vid to ULONG_MAX is always going to be false (which the
compiler can warn us about). Fix this by storing to an unsigned long,
and converting to a volume id after ensuring that the result is not
too large.

(cherry picked from commit ce5e263b488f8cb85662031ee08eea448dab2d27)
Reviewed-on: http://gerrit.openafs.org/4244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Iec2d640daed1e9c175d17823750f272297f890a7
Reviewed-on: http://gerrit.openafs.org/4283
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Actually print client CPS
Andrew Deason [Thu, 17 Mar 2011 15:43:23 +0000 (10:43 -0500)]
viced: Actually print client CPS

Client CPS was not getting output on SIGXCPU like the rest of the
client information, since the conditional in the CPS loop was never
true. Fix this so we traverse the CPS entries correctly.

Reviewed-on: http://gerrit.openafs.org/4256
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5df51a82947f0ff60d57f551c5faa136ad7f6e0f)

Change-Id: Ic710d9ab4da5dc1fdb4a1ffca72590b043bff918
Reviewed-on: http://gerrit.openafs.org/4282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: fix forceDAFS support in salvager
Derrick Brashear [Wed, 8 Dec 2010 02:26:59 +0000 (21:26 -0500)]
DAFS: fix forceDAFS support in salvager

we need to get the shared partition lock for the per-volume
forceDAFS case

Reviewed-on: http://gerrit.openafs.org/3487
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 81e7a5adf93a6b5eec104ca4bde429cf6cb0548a)

Change-Id: Ie7c6a43d25c621a3faca2a6564fbc06f9af87880
Reviewed-on: http://gerrit.openafs.org/4278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: allow salvager to detect whether FSYNC server is DAFS
Derrick Brashear [Wed, 8 Dec 2010 02:23:53 +0000 (21:23 -0500)]
DAFS: allow salvager to detect whether FSYNC server is DAFS

in order to enable the right commands and print the right errors,
query for DAFS-only FSYNC op.
doesn't use bozo InstanceInfo as it's possible you can run fileserver
outside of bos.

(cherry picked from commit b9ecf28c6c7c232823ac9b44cd00db9afab81c91)
Reviewed-on: http://gerrit.openafs.org/3486
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: If53edc8d100d5eacaf4aaad9feee96211e24e1a2
Reviewed-on: http://gerrit.openafs.org/4277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoopenafs 1.6.0pre4
Derrick Brashear [Wed, 23 Mar 2011 14:54:15 +0000 (10:54 -0400)]
openafs 1.6.0pre4

set version for 1.6.0pre4, and phasers for stun.

Change-Id: I43e36633b679f9af6156025842f2e1556fcbb17b
Reviewed-on: http://gerrit.openafs.org/4276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Give back volumes when exiting early
Andrew Deason [Wed, 23 Mar 2011 22:25:03 +0000 (17:25 -0500)]
salvager: Give back volumes when exiting early

Sometimes the salvager exits a bit earlier than normal. For instance,
when no applicable inodes are found for a volume group, or if the
-inodes command line option was given. In these cases, we have already
checked out singleVolumeNumber from the fileserver (if we're salvaging
a single VG), so we need to give it back. So, give it back in those
instances.

Change-Id: I3ab732d3b640b76d3bdec7ac9d01e57dc5a54ade
Reviewed-on: http://gerrit.openafs.org/4297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Do not record vol ops for DELETED vols
Andrew Deason [Wed, 23 Mar 2011 21:46:47 +0000 (16:46 -0500)]
DAFS: Do not record vol ops for DELETED vols

When a volume is VOL_STATE_DELETED, it effectively does not exist, so
there is little point in recording a vp->pending_vol_op structure for
it. Just let callers checkout the volume as they would a nonexistent
volume: without recording anything about the operation.

This just reduces some edge cases and confusing debugging info, so we
don't have to worry about cleaning up pending_vol_op structures for
nonexistent volumes.

Change-Id: I56b92c3f2548ea48f9c61100be07edf9f7277fee
Reviewed-on: http://gerrit.openafs.org/4296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Do not AskOnline nonexistent volumes
Andrew Deason [Wed, 23 Mar 2011 21:12:20 +0000 (16:12 -0500)]
salvager: Do not AskOnline nonexistent volumes

If singleVolumeNumber is not in our volume summary list, then the
singleVolumeNumber volume does not exist. So, don't try to bring it
back online. Still do try to make sure we don't have the volume
checked out, though, so issue an AskDelete, so ensure that it's not
checked out and that the fileserver does not think it exists.

Change AskDelete so we don't care if we tried to delete a volume that
the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE
handler so it does not complain about already-deleted volumes.

Change-Id: I33dd876c0db91a3c8a5210fca329d63bf4b3d212
Reviewed-on: http://gerrit.openafs.org/4295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agonamei: Log ListViceInodes write failures
Andrew Deason [Wed, 23 Mar 2011 20:19:03 +0000 (15:19 -0500)]
namei: Log ListViceInodes write failures

If we fail to write to the inodeFile given by ListViceInodes, we
should log the failure. Otherwise, no indication is given as to what
failed, when a salvage gathers the inode list.

Change-Id: Ia54105e1043969781711b9168c6787d07d1d319f
Reviewed-on: http://gerrit.openafs.org/4294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Fix conversion from stdio calls
Andrew Deason [Wed, 23 Mar 2011 19:30:18 +0000 (14:30 -0500)]
salvager: Fix conversion from stdio calls

Commit 5247fa38a4faebfdffba178ca01e5b419f034d5d converted some I/O
calls in the salvager from stdio to OS_OPEN/OS_WRITE/etc. Fix some of
the conversions, including:

 - We need to pass O_CREAT to OS_OPEN calls, since we are creating
   these files

 - OS_WRITE returns the number of bytes written on success, not the
   number of "elements" like in stdio

Change-Id: I789b7549c1eabeb821591bf9f42d810252fb11e1
Reviewed-on: http://gerrit.openafs.org/4293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoihandle: Ensure FDH_REALLYCLOSE really closes
Andrew Deason [Tue, 22 Mar 2011 21:36:47 +0000 (16:36 -0500)]
ihandle: Ensure FDH_REALLYCLOSE really closes

If FDH_REALLYCLOSE is given an FdHandle_t that has more than one user,
currently it does effectively nothing. Ensure that the file descriptor
actually gets closed on a subsequent FDH_CLOSE, but setting the new
fd_needs_rclose field.

Change-Id: I04794662ca64e6be718da82e10994a4a7bc0b39a
Reviewed-on: http://gerrit.openafs.org/4274
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos next support
Derrick Brashear [Wed, 23 Mar 2011 18:16:10 +0000 (14:16 -0400)]
macos next support

first brush at supporting next macos. totally not lion about it.

Change-Id: I4d2e05f68266ea82de710717c5340f16425f897e
Reviewed-on: http://gerrit.openafs.org/4290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoosconf: reduplicate systype stuff
Derrick Brashear [Wed, 23 Mar 2011 18:11:24 +0000 (14:11 -0400)]
osconf: reduplicate systype stuff

in some cases there is more to do, and in some cases we probably
already didn't build anymore, but, let's simplify.

Change-Id: I779c3ba8f3f02e6202700d96ee92cd473de66af2
Reviewed-on: http://gerrit.openafs.org/4288
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Do not VDeregisterVolOp_r while exclusive
Andrew Deason [Wed, 23 Mar 2011 16:07:03 +0000 (11:07 -0500)]
DAFS: Do not VDeregisterVolOp_r while exclusive

We should wait for a volume to transition out of an exclusive state
before calling VDeregisterVolOp_r on a volume, since some code may be
examining the vol op outside of VOL_LOCK in an exclusive state. We
should be doing this anyway before performing volume state checks,
since we may be trying to e.g. attach the volume at the same time.

Change-Id: I3a5b78b7c0033887a973ce941ced592df8c4bf3d
Reviewed-on: http://gerrit.openafs.org/4287
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorpm: Build srpms without %dist in their name
Simon Wilkinson [Wed, 23 Mar 2011 15:35:35 +0000 (15:35 +0000)]
rpm: Build srpms without %dist in their name

On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This
leads to makesrpm.pl building SRPMS with .el6 in their release. As we
endeavour to use the same SRPM on all of our Fedora platforms, this is
less than ideal, so change makesrpm.pl to squash the setting of %dist
before building the RPM.

Change-Id: I5b5b9db7654ce21a269233e8950d4f4d1df81ad7
Reviewed-on: http://gerrit.openafs.org/4285
Reviewed-by: Alexander Ivan Redinger <aredinger@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorpms: Use new CellServDB
Simon Wilkinson [Thu, 17 Mar 2011 19:14:39 +0000 (19:14 +0000)]
rpms: Use new CellServDB

Update the CellservDB referenced by the spec file to the latest one
from grand.central.org

Reviewed-on: http://gerrit.openafs.org/4257
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 71380ee4f3522ba64ed60724a928f8efc16ca132)

Change-Id: I0f08b145073faca5d0dda2c6460e57dc448b3450
Reviewed-on: http://gerrit.openafs.org/4281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorpms: Make makesrpm.pl cater for new rpm names
Simon Wilkinson [Thu, 17 Mar 2011 19:28:23 +0000 (19:28 +0000)]
rpms: Make makesrpm.pl cater for new rpm names

Starting from 1.6.0, our specfile no longer adds a stray '1.' to the
start of the release field. makesrpm.pl was failing to deal with
these new-style names and therefore not actually making an rpm.

Fix this by conditionalising on the OpenAFS version when selecting
which rpm to copy.

Reviewed-on: http://gerrit.openafs.org/4258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit af854b4e2f19e5f1a83b686e99ca3dd6122af942)

Change-Id: I95bc506e1113d0054b2aaca3a301551de1f086db
Reviewed-on: http://gerrit.openafs.org/4280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoutil: Fix exec_alt
Simon Wilkinson [Sun, 20 Mar 2011 21:13:09 +0000 (21:13 +0000)]
util: Fix exec_alt

exec_alt was failing its tests on Mac OS X (but passing them on Linux).

It turns out that this is because it was failing to NULL terminate the
string that it creates in construct_alt(), which copies in the
characters from argv0, prefix and suffix, but never copies in a trailing
NULL.

Amend the code so that the trailing NULL from suffix is used to
terminate the string.

Reviewed-on: http://gerrit.openafs.org/4267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8c418408016ff8d6be9f85c4666a49954f61dbd0)

Change-Id: Ie34832eb94f91a6e9083f65aa81333cb7b1fbb30
Reviewed-on: http://gerrit.openafs.org/4279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovclosevnodefiles-ihandle-leak-20090216
Jeffrey Altman [Tue, 17 Feb 2009 04:37:27 +0000 (04:37 +0000)]
vclosevnodefiles-ihandle-leak-20090216

LICENSE IPL10
FIXES 124359

don't leak ihandles on close. this isn't a complete fix for the issue
(cherry picked from commit b9816e12f7ed8213c9c4eaea09e992e69ce4ee05)

This reverts the part of 12e85227c5dbfdb1258718ee3360bffacc4f96ac that
reverted b9816e12f7ed8213c9c4eaea09e992e69ce4ee05.

Reviewed-on: http://gerrit.openafs.org/4272
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ef9fc4fadaded1c0ea067b2fd1d423df826606ae)

Change-Id: Ieeea51fd247ff4fc1b1da03c94a905c293b9fb7e
Reviewed-on: http://gerrit.openafs.org/4275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFix ihandle.c indents
Andrew Deason [Tue, 22 Mar 2011 21:18:17 +0000 (16:18 -0500)]
Fix ihandle.c indents

ihandle.c had some blocks that were not indented. Indent them.

Change-Id: I05442c6fabc19fab314f515fa950159de05b8c48
Reviewed-on: http://gerrit.openafs.org/4273
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agovclosevnodefiles-ihandle-leak-20090216
Jeffrey Altman [Tue, 17 Feb 2009 04:37:27 +0000 (04:37 +0000)]
vclosevnodefiles-ihandle-leak-20090216

LICENSE IPL10
FIXES 124359

don't leak ihandles on close. this isn't a complete fix for the issue
(cherry picked from commit b9816e12f7ed8213c9c4eaea09e992e69ce4ee05)

This reverts the part of 12e85227c5dbfdb1258718ee3360bffacc4f96ac that
reverted b9816e12f7ed8213c9c4eaea09e992e69ce4ee05.

Change-Id: If4ac661a3a0f8abf7f6a79fa9d72d715861bcf51
Reviewed-on: http://gerrit.openafs.org/4272
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd new libafsrpc1 symbol to symbols file debian/1.6.0.pre3-1
Russ Allbery [Tue, 22 Mar 2011 12:22:49 +0000 (05:22 -0700)]
Add new libafsrpc1 symbol to symbols file

14 years agoFinalize changes for 1.6.0~pre3-1
Russ Allbery [Tue, 22 Mar 2011 12:07:27 +0000 (05:07 -0700)]
Finalize changes for 1.6.0~pre3-1

14 years agoDAFS: fix forceDAFS support in salvager
Derrick Brashear [Wed, 8 Dec 2010 02:26:59 +0000 (21:26 -0500)]
DAFS: fix forceDAFS support in salvager

we need to get the shared partition lock for the per-volume
forceDAFS case

Change-Id: I7be91420bb0df5963e789c932e5c469fe02ec108
Reviewed-on: http://gerrit.openafs.org/3487
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: allow salvager to detect whether FSYNC server is DAFS
Derrick Brashear [Wed, 8 Dec 2010 02:23:53 +0000 (21:23 -0500)]
DAFS: allow salvager to detect whether FSYNC server is DAFS

in order to enable the right commands and print the right errors,
query for DAFS-only FSYNC op.
doesn't use bozo InstanceInfo as it's possible you can run fileserver
outside of bos.

Change-Id: Ib94f7b3a2960cd493f110af4d5dee7e97a6493c9
Reviewed-on: http://gerrit.openafs.org/3486
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoUpdate NEWS for 1.6.0pre3 release
Russ Allbery [Tue, 22 Mar 2011 09:04:46 +0000 (02:04 -0700)]
Update NEWS for 1.6.0pre3 release

Add additional NEWS entries from the 1.6.0pre3 release notes.

Change-Id: I46b306a7fc85f95be87c2b9eeaefae6b9816be8f
Reviewed-on: http://gerrit.openafs.org/4270
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd changelog for upstream deltas
Russ Allbery [Tue, 22 Mar 2011 10:27:04 +0000 (03:27 -0700)]
Add changelog for upstream deltas

14 years agoviced: Allow checkout of VOL_STATE_DELETED volumes
Andrew Deason [Thu, 30 Sep 2010 17:39:22 +0000 (12:39 -0500)]
viced: Allow checkout of VOL_STATE_DELETED volumes

The fileserver allows nonexistent volumes to be checked out. Since
VOL_STATE_DELETED volumes conceptually do not exist, we should also
allow them to be checked out.

Reviewed-on: http://gerrit.openafs.org/2873
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 88fc9ada4cfaee354199480916d139400ee0ef5b)

Change-Id: I24bf2100bf57a27323cd0e9e5081e767e67c944e
Reviewed-on: http://gerrit.openafs.org/4261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ee2811b01f3c34d3f07802ff88e2577da1caef6d)

14 years agoThrow the compiler a bone ...
Simon Wilkinson [Tue, 15 Mar 2011 21:48:43 +0000 (21:48 +0000)]
Throw the compiler a bone ...

... failing that, a semi colon.

Reviewed-on: http://gerrit.openafs.org/4234
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ffdc040d560a461abd59602ad62ba2fbf150227f)

Change-Id: I6dc924df277da7e650d6ae26f8520b23be10db3e
Reviewed-on: http://gerrit.openafs.org/4235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 17b48f99b60ed0f67270d4649ee9bdcda9a7cc59)

14 years agoMerge commit 'upstream/1.6.0.pre3' into experimental
Russ Allbery [Tue, 22 Mar 2011 10:22:06 +0000 (03:22 -0700)]
Merge commit 'upstream/1.6.0.pre3' into experimental

14 years agoImported upstream tag openafs-stable-1_6_0pre3 via tarball
Russ Allbery [Tue, 22 Mar 2011 10:21:18 +0000 (03:21 -0700)]
Imported upstream tag openafs-stable-1_6_0pre3 via tarball

14 years agoUpstream has switched to stable tags for 1.6.0 pre-releases
Russ Allbery [Tue, 22 Mar 2011 10:19:51 +0000 (03:19 -0700)]
Upstream has switched to stable tags for 1.6.0 pre-releases

14 years agoAdd changelog for upstream 1.6.0pre3 release
Russ Allbery [Tue, 22 Mar 2011 10:18:04 +0000 (03:18 -0700)]
Add changelog for upstream 1.6.0pre3 release

14 years agoosx: prefs pane should properly detect version
Derrick Brashear [Thu, 17 Mar 2011 04:11:43 +0000 (00:11 -0400)]
osx: prefs pane should properly detect version

we use "new" afs conf after 1.4.6 or 1.5.36. detect correctly

Reviewed-on: http://gerrit.openafs.org/4254
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0016e013aa012e179e7ac4c59b19a0ee1cbd0840)

Change-Id: I6796dee249eccd7646359deb8f29322b9954f803
Reviewed-on: http://gerrit.openafs.org/4269
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoosx: decode-panic should work in add-kext only land
Derrick Brashear [Thu, 17 Mar 2011 05:25:35 +0000 (01:25 -0400)]
osx: decode-panic should work in add-kext only land

in 64 bit 10.6, you need add-kext (not add-symbol-file)
to decode a panic. deal accordingly

Reviewed-on: http://gerrit.openafs.org/4255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c4744cc699be19fffb49f39f469e91ef6aac6585)

Change-Id: I3de2c4799ff1a552e67d4398b76e8736ba2abf7e
Reviewed-on: http://gerrit.openafs.org/4268
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoMacOS: allow cdead vcaches to be found in FindVCache if requested
Derrick Brashear [Thu, 20 Jan 2011 04:11:11 +0000 (23:11 -0500)]
MacOS: allow cdead vcaches to be found in FindVCache if requested

if we are trying to find a dead vcache, let it be found, don't immediately
attempt to recycle

FIXES 128511

(cherry picked from commit d73d9a1011cc3e1e5acfbc970434373f732c066e)

Change-Id: I4dde25e54e3d76faff58c8e42d0949493aa986f3
Reviewed-on: http://gerrit.openafs.org/4243
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: kernel socket upcall
Derrick Brashear [Wed, 16 Mar 2011 05:06:43 +0000 (01:06 -0400)]
macos: kernel socket upcall

support kernel socket upcall instead of listener env

(cherry picked from commit c10f5296d26eac9ac00018199ef579e8f6095c07)

Change-Id: Iaad3138106475219194772491d3e0915d60c466e
Reviewed-on: http://gerrit.openafs.org/4238
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Check vnode length on dir ops
Andrew Deason [Tue, 15 Mar 2011 19:24:01 +0000 (14:24 -0500)]
viced: Check vnode length on dir ops

The commit aadf69eabb1962496fa93745ab560a5b48cacd61 added checks on
vnode length whenever we read or write from a vnode. Add the same
check on directory vnodes when we modify the directory (whenever
entries are added or deleted).

Change-Id: I8aa438941f840019bc541d5a978610c4f78330c8
Reviewed-on: http://gerrit.openafs.org/4233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Correct VolumeNumber for large volume IDs
Andrew Deason [Fri, 11 Mar 2011 00:37:44 +0000 (18:37 -0600)]
vol: Correct VolumeNumber for large volume IDs

VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.

Change-Id: Ibae2d29f196646154fcc4f6ff174246e37b3d735
Reviewed-on: http://gerrit.openafs.org/4199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Handle large volume IDs in VLockFile
Andrew Deason [Thu, 10 Mar 2011 23:59:39 +0000 (17:59 -0600)]
vol: Handle large volume IDs in VLockFile

VLockVolumeByIdNB currently cannot handle volume IDs larger than
2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in
the VLockFile functions where possible.

Thanks to Simon Wilkinson for pointing out F_SETLK64.

Change-Id: I422c685aec035716e2f42d13bd97541425ead6a2
Reviewed-on: http://gerrit.openafs.org/4198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Make VLockFile arguments consistent
Andrew Deason [Thu, 10 Mar 2011 22:41:02 +0000 (16:41 -0600)]
vol: Make VLockFile arguments consistent

The Windows implementation of the VLockFile functions had the handle
incorrectly declared in a few places (they accepted a struct VLockFile
instead of an FD_t). Correct them, and make all VLockFile
implementation functions declare 'FD_t's instead of 'HANDLE's or
'int's.

Change-Id: I2bc414712599cb8f2a2f0a5034b583a15b2c3ad8
Reviewed-on: http://gerrit.openafs.org/4197
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Do not osi_FlushPages for dirs
Andrew Deason [Thu, 17 Mar 2011 21:32:00 +0000 (16:32 -0500)]
libafs: Do not osi_FlushPages for dirs

Directory contents are never mapped or stored in pages, so dealing
with page invalidation on directories is just overhead. So make
osi_FlushPages a no-op when we're given a directory, which can avoid a
lot of locks and other processing (particularly when we are called in
afs_getattr in BOZONLOCK_ENV).

Change-Id: I56fbd08c74d01a5fcb45a57e08bb31afcec9331d
Reviewed-on: http://gerrit.openafs.org/4259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: DFlushVolume outside of vol glock
Andrew Deason [Wed, 16 Mar 2011 16:48:08 +0000 (11:48 -0500)]
DAFS: DFlushVolume outside of vol glock

DFlushVolume may traverse a long list of directory objects, and can
even hit the disk, so we should drop the glock for it. This should be
safe in DAFS, since we already transition the volume to an exclusive
state before doing this, and DFlushVolume only deals with structures
internal to the directory package and maintains its own locking.

Change-Id: I6493042c8f36614b55d4dc40d97639e56b34fabd
Reviewed-on: http://gerrit.openafs.org/4242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoutil: Fix exec_alt
Simon Wilkinson [Sun, 20 Mar 2011 21:13:09 +0000 (21:13 +0000)]
util: Fix exec_alt

exec_alt was failing its tests on Mac OS X (but passing them on Linux).

It turns out that this is because it was failing to NULL terminate the
string that it creates in construct_alt(), which copies in the
characters from argv0, prefix and suffix, but never copies in a trailing
NULL.

Amend the code so that the trailing NULL from suffix is used to
terminate the string.

Change-Id: I286604fb09193367c4e7b2d80051832080362f79
Reviewed-on: http://gerrit.openafs.org/4267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolwp: override dbg and optmz settings
Simon Wilkinson [Sun, 20 Mar 2011 23:23:29 +0000 (19:23 -0400)]
lwp: override dbg and optmz settings

we were wiping out fun things like archflags. shouldn't be needed.
let's just do this instead.

Change-Id: I80b3453bb237b4995d642b947d03c17d82cda5e7
Reviewed-on: http://gerrit.openafs.org/4266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoosx: restore atomic stats to knet
Simon Wilkinson [Sun, 20 Mar 2011 23:15:30 +0000 (19:15 -0400)]
osx: restore atomic stats to knet

pulled wrong version of change into master. put back atomic
versions of stats.

Change-Id: I3b8413e2606a8bc4bf55aa674860685b2ca2ced6
Reviewed-on: http://gerrit.openafs.org/4265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agosalvager: Fix volume parsing on 64-bit
Andrew Deason [Wed, 16 Mar 2011 19:44:56 +0000 (14:44 -0500)]
salvager: Fix volume parsing on 64-bit

When an unsigned long is wider than an afs_uint32, comparing the
afs_uint32 vid to ULONG_MAX is always going to be false (which the
compiler can warn us about). Fix this by storing to an unsigned long,
and converting to a volume id after ensuring that the result is not
too large.

Change-Id: Ifbd724dabd988bc4b1ba6ee8f3dc7fa1a0afb226
Reviewed-on: http://gerrit.openafs.org/4244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 agoviced: Allow checkout of VOL_STATE_DELETED volumes
Andrew Deason [Thu, 30 Sep 2010 17:39:22 +0000 (12:39 -0500)]
viced: Allow checkout of VOL_STATE_DELETED volumes

The fileserver allows nonexistent volumes to be checked out. Since
VOL_STATE_DELETED volumes conceptually do not exist, we should also
allow them to be checked out.

Reviewed-on: http://gerrit.openafs.org/2873
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 88fc9ada4cfaee354199480916d139400ee0ef5b)

Change-Id: I24bf2100bf57a27323cd0e9e5081e767e67c944e
Reviewed-on: http://gerrit.openafs.org/4261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoMacOS: allow cdead vcaches to be found in FindVCache if requested
Derrick Brashear [Thu, 20 Jan 2011 04:11:11 +0000 (23:11 -0500)]
MacOS: allow cdead vcaches to be found in FindVCache if requested

if we are trying to find a dead vcache, let it be found, don't immediately
attempt to recycle

FIXES 128511

Change-Id: I7f86f7d4a88e1b89887b64617246e750654b0334
Reviewed-on: http://gerrit.openafs.org/3691
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>