]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
15 years agoSOLARIS: Include sys/varargs.h for kernel stdarg
Andrew Deason [Wed, 12 Jan 2011 16:29:46 +0000 (10:29 -0600)]
SOLARIS: Include sys/varargs.h for kernel stdarg

When compiling for the kernel, pre-10 Solaris seems to want
<sys/varargs.h> instead of <stdarg.h>, as documented in the Solaris
man pages. So include <sys/varargs.h> instead of <stdarg.h> where we
need variable arguments (afs_warn.c).

Change-Id: Id16453b1f7bb9f42d0cc9ca504ac64d04fb0b684
Reviewed-on: http://gerrit.openafs.org/3653
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoFBSD: we're 64 bit capable
Derrick Brashear [Wed, 12 Jan 2011 21:55:09 +0000 (16:55 -0500)]
FBSD: we're 64 bit capable

define AFS_64BIT_ENV as we can support 64 bit long long integers.

Change-Id: If76168275333eca1b9505c5ead75b891550363ae
Reviewed-on: http://gerrit.openafs.org/3654
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoFBSD7: Don't sleep with the glock
Ben Kaduk [Mon, 20 Dec 2010 00:33:28 +0000 (19:33 -0500)]
FBSD7: Don't sleep with the glock

On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic
when the kernel is configured with WITNESS and we hold the glock around
it.
Drop the glock in this case.

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

Change-Id: I3b22c12a20b33ca0e4df5a66c2edfc4167000a1c
Reviewed-on: http://gerrit.openafs.org/3650
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoBring FBSD 7.X client back to life
Ben Kaduk [Sun, 19 Dec 2010 04:52:44 +0000 (23:52 -0500)]
Bring FBSD 7.X client back to life

Having been untested for quite some time, we had several
places that needed more conditionals to compile on FreeBSD 7.

Now we compile and start on 7.3-RELEASE, but have locking issues
under actual use.

It seems that we are also incompatible with the Heimdal 0.6.3 in
the base system -- aklog is unable to actually obtain the needed
credential when compiled against that kerberos implementation;
using MIT krb5 1.6.3 from ports works without incident.

FIXES 128612

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

Change-Id: I148dbb0c5d8485d6f8fecae7a2d59e07a1a4d02b
Reviewed-on: http://gerrit.openafs.org/3649
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: switch to rx_Readv
Marc Dionne [Wed, 24 Nov 2010 00:08:24 +0000 (19:08 -0500)]
Cache bypass: switch to rx_Readv

Tests show that cache bypass doesn't scale very well past a few
concurrent processes, with a lot of lock contention in the RX
layer.  Switching the implementation to the iovec based rx_Readv
alleviates much of this.

Also take advantage of the fact that the upper layer readpages
only sends down contiguous lists of pages, and issue larger read
requests and populate the pagecache pages from the iovecs we
get back.  The loop logic is changed significantly to accomodate
the new pattern.

Read throughput is improved by about 30-40% for some parallel read
benchmarks I use.  Along with some other tweaks, it can allow the
throughput to be more than doubled.

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

Change-Id: Ie8801404c370f64b0075169d63cf790c71bf2537
Reviewed-on: http://gerrit.openafs.org/3647
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: Only compile bypass code for the Linux kernel
Marc Dionne [Tue, 23 Nov 2010 23:39:33 +0000 (18:39 -0500)]
Cache bypass: Only compile bypass code for the Linux kernel

Only compile the afs_bypasscache.c code if AFS_LINUX24_ENV is set,
since it's currently the only case where the code is actually used.
Only sections that caused problems for UKERNEL were previously
ifdef'ed.

Besides making the code cleaner, the main effect of this change
is to prevent compiling most of the bypass code for UKERNEL where
it isn't currently used.

If support for bypass is added for other platforms eventually, the
code here would need to be reworked anyway, ideally abstracting out
and moving any OS specific bits into the platform subdirectories.

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

Change-Id: I042a30ac2a5e8156a233a0ff0f46aa5cd4fcd675
Reviewed-on: http://gerrit.openafs.org/3646
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: remove ifdefs under src/afs/LINUX
Marc Dionne [Tue, 23 Nov 2010 23:21:16 +0000 (18:21 -0500)]
Cache bypass: remove ifdefs under src/afs/LINUX

Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled.  Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.

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

Change-Id: I57c44352f11ca7f68f6c3644345a7d48da8c1bf9
Reviewed-on: http://gerrit.openafs.org/3645
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: release and unlock pages when we get 0-length reply
Marc Dionne [Sun, 7 Nov 2010 20:06:16 +0000 (15:06 -0500)]
Cache bypass: release and unlock pages when we get 0-length reply

In some cases, such as reading past the end of file as known to the
server, fetchdata will get a 0 length reply.  Deal gracefully by
unlocking and releasing any pages reserved by readpages.  Failure
to do so here leads to deadlocks later as we can exit with some pages
still locked.

Reviewed-on: http://gerrit.openafs.org/3283
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e4250dc64eb26b5da1480e9f5bd58d016f81847f)

Change-Id: I54dc4ef040b816596cf48edf866976943220d988
Reviewed-on: http://gerrit.openafs.org/3644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: adjust read size for non-contiguous readpages
Marc Dionne [Sun, 7 Nov 2010 18:35:36 +0000 (13:35 -0500)]
Cache bypass: adjust read size for non-contiguous readpages

The bypass code's readpages does deal with a non-contiguous list
of pages, but it doesn't adjust the size of the read it requests
from the background daemon accordingly.  As a result we'll ask the
server for pages we were not asked to read.

Reviewed-on: http://gerrit.openafs.org/3282
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 0b6b2b3cab09eacf9b03638d8770c83aeb0b8fea)

Change-Id: Ic7241fb27bd177eb7279292804def753f9120407
Reviewed-on: http://gerrit.openafs.org/3643
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: make readpage deal with reads at end of file
Marc Dionne [Sun, 7 Nov 2010 18:14:55 +0000 (13:14 -0500)]
Cache bypass: make readpage deal with reads at end of file

When a file's size is an exact multiple of the page size, the vfs
will issue a readpage for an extra page at the end, for which there
is no data.  Deal with it here instead of letting it trickle down
to the background daemon, which will issue an unnecessary read to the
server, and maybe get confused because there is no data.

Reviewed-on: http://gerrit.openafs.org/3281
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8ec31f26770ef1e85fb3a6005467f0e2d3ce1715)

Change-Id: Ib47a8cc62611c6e7c904898990b38ae48d8478e3
Reviewed-on: http://gerrit.openafs.org/3642
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: Remove AFS_KMAP_ATOMIC
Marc Dionne [Tue, 23 Nov 2010 22:50:25 +0000 (17:50 -0500)]
Cache bypass: Remove AFS_KMAP_ATOMIC

Since AFS_KMAP_ATOMIC is defined unconditionally, remove the ifdefs
and the code for the !AFS_KMAP_ATOMIC case.  We probably don't want
to support this feature on a kernel old enough not to have kmap_atomic.
This should exist on all 2.6 and even 2.4 linux kernels.

This simplifies the code for maintenance and later changes.

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

Change-Id: I6d2970f9b8811e145e2a03105c64cbd6714c0c5a
Reviewed-on: http://gerrit.openafs.org/3641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: fix use of incorrect "states"
Marc Dionne [Tue, 11 Jan 2011 02:31:18 +0000 (21:31 -0500)]
Cache bypass: fix use of incorrect "states"

Test and set the correct field for cache bypass flags.  There was
some confusion between cachingStates and the states associated with
vcache entries in a few places.

Reviewed-on: http://gerrit.openafs.org/3637
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8c541079573274d726180d3d9679c6a26cda84ea)

Change-Id: Ibaae9a766ef01cf4c68995c2bef454bae5d03b38
Reviewed-on: http://gerrit.openafs.org/3640
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: Fix oops in bypass transition functions
Marc Dionne [Fri, 5 Nov 2010 00:49:41 +0000 (20:49 -0400)]
Cache bypass: Fix oops in bypass transition functions

The FCSBypass flag might change between the time we check it before
entering afs_TransitionToCaching or afs_TransitionToBypass and when
we check it again within the functions.

Instead of panicing, just exit if someone beat us to it.  Also move
the checks within the write lock region to make sure the code
doesn't get run multiple times.

Reviewed-on: http://gerrit.openafs.org/3266
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f2c6ae300a211460c24c87752cf9400b9e61ee1f)

Change-Id: I3b7ad3f9672975a87dbe337256d42166fc638b34
Reviewed-on: http://gerrit.openafs.org/3639
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: fix use of incorrect "states"
Marc Dionne [Tue, 11 Jan 2011 02:31:18 +0000 (21:31 -0500)]
Cache bypass: fix use of incorrect "states"

Test and set the correct field for cache bypass flags.  There was
some confusion between cachingStates and the states associated with
vcache entries in a few places.

Change-Id: Iae957b6f838a44d75776e49662b4aba685800d19
Reviewed-on: http://gerrit.openafs.org/3637
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoZero rx_multi_lock before initializing it
Ben Kaduk [Mon, 20 Dec 2010 00:29:17 +0000 (19:29 -0500)]
Zero rx_multi_lock before initializing it

FreeBSD's kernel debugging facilities will panic if it detects
an attempt to re-initialize an already-initialized lock, as detected
through some particular bits being nonzero.  Zero everything out
before starting, to prevent this panic.

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

Change-Id: I7e78989c313269388808c26d521f4075c0749cd4
Reviewed-on: http://gerrit.openafs.org/3638
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoprovide more verbose logging when VGetVolumeByVp_r fails
Tom Keiser [Wed, 13 Oct 2010 05:16:25 +0000 (01:16 -0400)]
provide more verbose logging when VGetVolumeByVp_r fails

FSYNC_com_VolOff() commits sepuku when VGetVolumeByVp_r() fails to return
a heavyweight ref to the volume.  This small patch provides more detailed
debugging information so we have a better idea why VGetVolumeByVp_r failed.

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

Change-Id: Ieebbf65b1764304f0b8e38bb32f0e4f61c332932
Reviewed-on: http://gerrit.openafs.org/3620
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX: afs_linux_put_link is void
Andrew Deason [Mon, 10 Jan 2011 18:11:22 +0000 (12:11 -0600)]
LINUX: afs_linux_put_link is void

The put_link callback doesn't return a value, so declare it as such.

Change-Id: Icdc19de48747fdfbd3349b2ef0c2b51d5a369550
Reviewed-on: http://gerrit.openafs.org/3636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorpm: don't package files twice
Stephan Wiesand [Sat, 8 Jan 2011 16:13:27 +0000 (17:13 +0100)]
rpm: don't package files twice

The LICENSE and two manpages were included in the main
package as well as one of the others. Remove duplicate entries.

Change-Id: I7626d758a65fe305f18e7cc9099d1fe1b4f86c6f
Reviewed-on: http://gerrit.openafs.org/3628
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agogit-version: Do not specify --ignore-submodules
Andrew Deason [Sat, 8 Jan 2011 01:48:18 +0000 (20:48 -0500)]
git-version: Do not specify --ignore-submodules

Only new git versions reognize the --ignore-submodules option to
diff-index and diff-files. Do not pass this, to make git-version more
likely to work across different versions, as we don't have any
submodules in the tree anyway.

Change-Id: Ic9dbd9ec5f332f36cec291fc3d324db14615f831
Reviewed-on: http://gerrit.openafs.org/3627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoFBSD: StopListener glocking fixup
Ben Kaduk [Sun, 19 Dec 2010 05:06:13 +0000 (00:06 -0500)]
FBSD: StopListener glocking fixup

afs_osi_Sleep requires the glock (so that it can sleep on it); we
dropped the glock earlier in osi_StopListener because soshutdown and
soclose can sleep, but we must (unconditionally!) acquire it for our
loop waiting on rxk_ListenerPid.

Change-Id: Ibea3da2c5d18a2609989b547a1c587c25e3f07ff
Reviewed-on: http://gerrit.openafs.org/3549
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 28032bc1c1aaa4c25e94025a8fa9e2b4e8131ce3)
Reviewed-on: http://gerrit.openafs.org/3633

15 years agovos: free ubulkentries with xdr_free
Jeffrey Altman [Fri, 24 Dec 2010 15:06:05 +0000 (10:06 -0500)]
vos: free ubulkentries with xdr_free

Instead of using free() to free the ubulkentries data structure
use xdr_free().

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

Change-Id: I9af8aee92e0e187923ccd952a5487ea419446720
Reviewed-on: http://gerrit.openafs.org/3626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovos release: Avoid full dump on all sites
Andrew Deason [Thu, 11 Nov 2010 20:45:04 +0000 (14:45 -0600)]
vos release: Avoid full dump on all sites

Commit 9fed169b1c5c823fd96cea94daf712b2cf06c901 attempts to remove any
remote RO site that has RO_DONTUSE set. However, we set RO_DONTUSE on
all sites earlier in the release process if this is a full release,
resulting in all sites getting a full dump.

Correct this by remembering in 'origflags' what flags each site has
before we messed with the vldb entry.

Thanks to Mike Meffie.

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

Change-Id: I5a14c490dba7e1ad815856ccb3f90e210e09f50d
Reviewed-on: http://gerrit.openafs.org/3624
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agovolser: Fix broken bulk conversion
Simon Wilkinson [Sun, 26 Dec 2010 14:14:38 +0000 (14:14 +0000)]
volser: Fix broken bulk conversion

The converstions between the original, N and U bulk list return
values were all broken in various ways:

1/ Shifting from malloc to xdr_alloc() (in 4f1efdc8b73ed)
   subtly changed the behaviour when handling an empty list. The
   correct XDR representation of an empty list is {0, NULL}, not
   {0, &memZero}. Fix the code so that if the source list is empty,
   an empty destination list is returned.
2/ The destination list length was never being filled in. This means
   that xdr_free() could not be safely used on this list, as the wrong
   length would be passed to the allocator. Fill in the destination
   list length as part of the conversion.
3/ xdr_free(...) is a no-op when called with an empty list - there's
   no need to check before calling it. Remove these checks to improve
   the code's readability.
4/ xdr_free(...) should only be called when the RPC returned
   sucessfully. The stub is responsible for freeing data should the call
   fail mid way through unmarshalling.
5/ Where an RPC returns the number of entries independently of the
   length of a counted array, it is unsafe to use that length to
   iterate the array without checking that it is within the array
   bounds. Instead, just use the array length when performing
   conversions.

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

Change-Id: I1d3ec3929a8974d571e9b3712e53db4fceab4879
Reviewed-on: http://gerrit.openafs.org/3635
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agovos: Abstract out bulk list conversion
Simon Wilkinson [Sun, 26 Dec 2010 14:00:42 +0000 (14:00 +0000)]
vos: Abstract out bulk list conversion

Pull the various segments of code that do bulk list conversion into
their own functions. This is purely code reorganisation at this point,
fixes for these functions will follow in subsequent patches.

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

Change-Id: Ib6b32fe942f5083e18f32404156a42cd82bf5c5a
Reviewed-on: http://gerrit.openafs.org/3634
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: refactor buf_Get() to improve readability
Jeffrey Altman [Sat, 8 Jan 2011 17:21:23 +0000 (12:21 -0500)]
Windows: refactor buf_Get() to improve readability

Refactor buf_Get() by using a switch() instead of a jumble
of if() conditionals.

Improve comments to make it clear that given the current
use and implementation of cm_BufRead() from cm_dcache.c
that created buffer pages will never be populated with
actual data.

Change-Id: Ib3f5778ae32f210127537e16ecc32e1598dbefc7
Reviewed-on: http://gerrit.openafs.org/3630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: remove all refs to unused buf_GetNew()
Jeffrey Altman [Sat, 8 Jan 2011 17:19:07 +0000 (12:19 -0500)]
Windows: remove all refs to unused buf_GetNew()

Change-Id: I09b87a2042efff1b5930ebe6e50a64379d592bc2
Reviewed-on: http://gerrit.openafs.org/3629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoFBSD: band-aid vnode locking in lookup
Ben Kaduk [Sun, 24 Oct 2010 04:29:07 +0000 (00:29 -0400)]
FBSD: band-aid vnode locking in lookup

The lock order requires that we acquire vnode locks from the root
towards the leaf.  When looking up "..", this requires that we
unlock the directory before locking the child, otherwise we
are susceptible to deadlock.
This is only a band-aid, as afs_vop_lookup should be rewritten.

Change-Id: I594f31ba05c3847e5d83d89748266d24547bf97b
Reviewed-on: http://gerrit.openafs.org/3035
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/3632
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoFBSD: close race in afs_root
Ben Kaduk [Sat, 6 Nov 2010 04:02:31 +0000 (00:02 -0400)]
FBSD: close race in afs_root

Previously, we called afs_PutVCache(afs_globalVp) directly.  This
is unsafe because PutVCache acquires locks which can sleep, losing
the serialization of the GLOCK.  In rare circumstances, this can
result in two threads simultaneously making that call, and the
second one would panic in vputx() with a negative refcount.
Close the race by using a local variable for the afs_PutVCache()
calls, applying the change to afs_globalVp before dropping the GLOCK.
While here, fix up other race conditions.

Change-Id: I4733489d50d3459172ee2eb021190d013f68018a
Reviewed-on: http://gerrit.openafs.org/3275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/3631
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoAdd additional DKMS and module-assistant documentation
Russ Allbery [Fri, 7 Jan 2011 04:03:58 +0000 (20:03 -0800)]
Add additional DKMS and module-assistant documentation

* In README.modules, document the need to install the Linux headers
  package in the DKMS instructions and the need for module-assistant
  clean openafs in the module-assitant instructions.  (Closes: #606235)

15 years agoUse afs_foff_t for file offsets
Andrew Deason [Wed, 10 Nov 2010 15:11:47 +0000 (09:11 -0600)]
Use afs_foff_t for file offsets

Some callers in vol and volser were not using afs_foff_t for file
offsets for calls to STREAM_ASEEK, FDH_TRUNC, FDH_PREAD, or
FDH_PWRITE. Most notably, in code for volume cloning, purging, and
dumping operations. Fix them to use afs_foff_t to prevent errors when
dealing with large special files.

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

Change-Id: I6f950fd23eba9e00470e424ae49ee6ce9d7ca6f4
Reviewed-on: http://gerrit.openafs.org/3618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoprovide more verbose logging when VGetVolumeByVp_r fails
Tom Keiser [Wed, 13 Oct 2010 05:16:25 +0000 (01:16 -0400)]
provide more verbose logging when VGetVolumeByVp_r fails

FSYNC_com_VolOff() commits sepuku when VGetVolumeByVp_r() fails to return
a heavyweight ref to the volume.  This small patch provides more detailed
debugging information so we have a better idea why VGetVolumeByVp_r failed.

Change-Id: I9b8b6e734653701c4f35b458f4c4701a2b0d2d5e
Reviewed-on: http://gerrit.openafs.org/2969
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoWindows: remove unused vars from cm_server.c
Jeffrey Altman [Tue, 4 Jan 2011 16:18:25 +0000 (11:18 -0500)]
Windows: remove unused vars from cm_server.c

Change-Id: Ia2e1d5ecbc5dbc349ac8e7bfcb63b42545f876f5
Reviewed-on: http://gerrit.openafs.org/3617
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: netidmgr_plugin move roken.h to afscred.h
Jeffrey Altman [Wed, 12 May 2010 15:27:17 +0000 (11:27 -0400)]
Windows: netidmgr_plugin move roken.h to afscred.h

Due to historical issues with the MIT KFW headers
the netidmgr plugin must define _USE_32BIT_TIME_T
which alters the size of time_t in all C RTL data
structures that include it.   roken.h must be included
after this definition in order for it to do the right
thing in conjunction with the MIT KFW headers.  This
means that an exception to the rule that roken.h must
be one of the first three files included in every
source file in the tree must exist for this directory.
In the netidmgr_plugin directory, afscred.h includes
roken.h and afscred.h is the first header included
in all other files.

Change-Id: I11214e5eaac0144aaf04c3a21bb92d521d75c6e1
Reviewed-on: http://gerrit.openafs.org/3616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: permit clean when switching platforms
Jeffrey Altman [Tue, 4 Jan 2011 02:07:10 +0000 (21:07 -0500)]
Windows: permit clean when switching platforms

When switching between i386 and amd64 in the same build tree
the "clean" make directive would fail due to NTLang.bat not
having been built in the new platform's destination directory.
Force NTLang.bat to be built as a dependency of cleanup and
delete it at the end along with the version files.

Change-Id: I49a44204c636ab9ad89be44d4fad20ed6050fdda
Reviewed-on: http://gerrit.openafs.org/3615
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoroken: Check for bswap16 and bswap32 defines
Simon Wilkinson [Mon, 3 Jan 2011 10:47:30 +0000 (10:47 +0000)]
roken: Check for bswap16 and bswap32 defines

Our imported roken.h provides definitions for bswap16 and bswap32,
but configure doesn't check to see if those functions already exist.
On operating systems where they do, and where the header containing
them is included in our build, this results in compilation errors.

Add a configure test for bswap16 and bswap32, which is complicated
by the fact that they may be macros, or static inline functions, so
a simple CHECK_FUNCS won't work.

Change-Id: Iae3411bf4bb22af8cfd770e01026a28e1863e078
Reviewed-on: http://gerrit.openafs.org/3613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoUnix CM: Don't blow up if we have non-rxkad tokens
Simon Wilkinson [Sat, 11 Sep 2010 11:53:07 +0000 (12:53 +0100)]
Unix CM: Don't blow up if we have non-rxkad tokens

The legacy GetToken compatibility code assumed that we would always
have at least one rxkad token for a cell, and segfaulted if we didn't.

Just return as if we have no tokens if a cell doesn't have an rxkad
token.

Change-Id: Ica64882c1a64cf140ad6c277c70fbfb747ea6235
Reviewed-on: http://gerrit.openafs.org/3614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoautoconf: Tidy up header includes
Simon Wilkinson [Mon, 3 Jan 2011 10:40:56 +0000 (10:40 +0000)]
autoconf: Tidy up header includes

Tidy up our list of header includes so it's easier to see what
we're testing for. The list is now one-per-line, in alphabetically
sorted order.

Note that this won't affect our use of the default include set, as
autoconf will already have tested for all of those before it starts
this CHECK_HEADERS run.

Change-Id: Iffc8c3bc7cbd56d87508ebdde38e61f8747d0501
Reviewed-on: http://gerrit.openafs.org/3612
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoHPUX: Allow des.c to compile
Andrew Deason [Tue, 21 Dec 2010 21:11:50 +0000 (16:11 -0500)]
HPUX: Allow des.c to compile

The HP-UX compiler does not like des.c without 'register' keywords. Be
sufficiently retro so the build can continue.

Change-Id: Ief032712893d96c2c198da82238eefe6807082cd
Reviewed-on: http://gerrit.openafs.org/3571
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoauth: Move key related code to its own file
Simon Wilkinson [Thu, 30 Dec 2010 16:30:37 +0000 (16:30 +0000)]
auth: Move key related code to its own file

Move all of the libauth code which does KeyFile management out
into its own file, in preparation for a major rewrite.

Change-Id: Id880136307cba726c04a003700ba70f3d74b297f
Reviewed-on: http://gerrit.openafs.org/3611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agolibadmin: Don't use internal struct for key data
Simon Wilkinson [Thu, 30 Dec 2010 17:52:00 +0000 (17:52 +0000)]
libadmin: Don't use internal struct for key data

The afsconf_dir structure should be regarded as private to the libauth
library, which provides accessors for the commonly used parameters
within it. Rework libadmin so that it uses those accessors when looking
up key data.

Change-Id: I9a623ccadba95622894931ee25319d3bcb019136
Reviewed-on: http://gerrit.openafs.org/3608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agotests: Add more tests for auth KeyFile handling
Simon Wilkinson [Thu, 30 Dec 2010 17:56:36 +0000 (17:56 +0000)]
tests: Add more tests for auth KeyFile handling

Add tests to make sure that we serialise updated KeyFiles to and
from disk correctly, and that the restriction on 8 keys in a KeyFile
is enforced by AddKey

Change-Id: Iac5bf7157534879824da92ea58f1515672d59298
Reviewed-on: http://gerrit.openafs.org/3610
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoroken: Export more snprintf symbols
Simon Wilkinson [Thu, 30 Dec 2010 17:53:59 +0000 (17:53 +0000)]
roken: Export more snprintf symbols

Export more of the snprintf symbols from librokenafs, so that we
can actually make use of them.

Change-Id: Ida347c516bec6444d26d0e148ffd781999f0b364
Reviewed-on: http://gerrit.openafs.org/3609
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoAdd "brief" option to rxgen
Simon Wilkinson [Sun, 14 Feb 2010 10:01:14 +0000 (10:01 +0000)]
Add "brief" option to rxgen

Add a new -b option to rxgen that turns on "brief" output. This makes a
number of changes to the data definitions produced by rxgen so they can
be more easily used by the calling code.

The changes are:
   *) Use the new struct rx_opaque structure for all opaque data
      definitions, rather than defining each as a unique structure.
      This permits moving opaque data between rxgen structures to be
      performed by simple assignment.
   *) Use anonymous structures for internal definitions. Currently
      rxgen also uses the field name as the structure name, which
      prevents the use of a field name more than once within a
      source file.
   *) Don't embed the structure name within the names of the elements
      within the structure. This significantly reduces the length of
      assignment code, and makes for more readable callers.

Change-Id: I8cad7e6051f12238a77cf006b0854fb38b54f61a
Reviewed-on: http://gerrit.openafs.org/2585
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agorx: Implement rx_atomic_dec_and_read
Simon Wilkinson [Thu, 16 Dec 2010 11:36:43 +0000 (11:36 +0000)]
rx: Implement rx_atomic_dec_and_read

Add a function which decrements an atomic counter, and returns the
result. This is essential for implementing reference counting.

Change-Id: Ib173f078bcf117369a82f981d58124018648a71c
Reviewed-on: http://gerrit.openafs.org/3581
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agorx: Protect rx_atomic.h against multiple inclusion
Simon Wilkinson [Thu, 16 Dec 2010 11:35:54 +0000 (11:35 +0000)]
rx: Protect rx_atomic.h against multiple inclusion

Add #ifdef guards so that rx_atomic.h can't be included in the same
C file multiple times.

Change-Id: Ic62287ce4a21b9efbfd9530e2517029a69217a56
Reviewed-on: http://gerrit.openafs.org/3580
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoauth: Don't crash if UserList contains bogus line
Simon Wilkinson [Sat, 1 Jan 2011 23:58:20 +0000 (23:58 +0000)]
auth: Don't crash if UserList contains bogus line

If the first line of the UserList was bogus (caused ParseLine to
return an error), then we would attempt to free the contents of
an uninitialised identity structure, and crash. Initialise the
structure so this no longer happens.

Change-Id: I55074a5eb616ac48d8a278db2d8389d3b0e112a6
Reviewed-on: http://gerrit.openafs.org/3607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agorx: Don't crash when emptying an empty identity
Simon Wilkinson [Sat, 1 Jan 2011 23:51:18 +0000 (23:51 +0000)]
rx: Don't crash when emptying an empty identity

In common with our other freeContents functions, freeing the contents
of a structure which is already empty shouldn't crash.

Change-Id: I93b54c0e450d2184c10575b50dadfd1471d43289
Reviewed-on: http://gerrit.openafs.org/3606
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: MIT license applies to parsemode()
Vincent Archer [Thu, 30 Dec 2010 16:34:28 +0000 (11:34 -0500)]
Windows: MIT license applies to parsemode()

Vincent Archer grants permission to OpenAFS to re-license
his MINIX contributions under the MIT license.  A copy of the
e-mail granting permission is located in OpenAFS RT issue 128805.

FIXES 128805

Change-Id: I59774d14a0099f5a48dbc9dbf13157136b8c681f
Reviewed-on: http://gerrit.openafs.org/3605
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoFinalize changes for 1.6.0~pre1-1 debian/1.6.0.pre1-1
Russ Allbery [Wed, 29 Dec 2010 20:28:08 +0000 (12:28 -0800)]
Finalize changes for 1.6.0~pre1-1

15 years agoWindows: buf_CleanAsync scp->fid == bp->fid
Jeffrey Altman [Wed, 29 Dec 2010 16:35:17 +0000 (11:35 -0500)]
Windows: buf_CleanAsync scp->fid == bp->fid

If buf_CleanAsync or buf_CleanAsyncLocked are called
with a non-NULL cm_scache_t parameter, that status object's
fid must be the same as the associated cm_buf_t object.
If not, the wrong locks will be held.

If the cm_scache_t parameter is NULL and cm_FindSCache()
returns NULL, it means that the cm_scache_t object associated
with the bp->fid has been flushed from the cache.  cm_GetSCache()
must therefore be called to allocate a new status object for the
FID.  If the status object cannot be allocated, then any dirty
data stored in the buffer will be discarded.

Change-Id: Ie5d4eb8a1090d4b3c0753b7ddee2de0799485a2e
Reviewed-on: http://gerrit.openafs.org/3604
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoUpdate NEWS for 1.5.78 and 1.6.0pre1
Russ Allbery [Fri, 24 Dec 2010 18:53:22 +0000 (10:53 -0800)]
Update NEWS for 1.5.78 and 1.6.0pre1

Based on the release notes.  Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate.  Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.

Reviewed-on: http://gerrit.openafs.org/3592
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 676a4efc232bc77fe20e46c2dbe45e89f89cd670)

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

15 years agoAdd changelog entry for NEWS pullup
Russ Allbery [Wed, 29 Dec 2010 18:40:29 +0000 (10:40 -0800)]
Add changelog entry for NEWS pullup

15 years agoWindows: fs checkserver skip multi-homed up server
Jeffrey Altman [Tue, 28 Dec 2010 19:39:47 +0000 (14:39 -0500)]
Windows: fs checkserver skip multi-homed up server

Multi-homed file servers can be detected by comparing the
uuid for the cm_server_t entries.  If a server has at least
one up interface, do not list it as being down in the "fs checkserver"
response list.

Change-Id: I718eeee3316d05a33a4af97ca6c7fd947db41f44
Reviewed-on: http://gerrit.openafs.org/3603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: fs checkservers should list vldb as well
Jeffrey Altman [Thu, 23 Dec 2010 04:23:48 +0000 (23:23 -0500)]
Windows: fs checkservers should list vldb as well

The Windows fs checkservers has only listed offline
file servers.  Include vldb as well to match the Unix
cache manager.

Change-Id: I81b8e4a1a813fcd8f19e3dc58c75ef161795518c
Reviewed-on: http://gerrit.openafs.org/3602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agovos: do not mix memory allocation methods
Jeffrey Altman [Tue, 28 Dec 2010 00:34:14 +0000 (19:34 -0500)]
vos: do not mix memory allocation methods

ListVLDB mixed memory allocated with xdr_alloc() and memory
allocated with malloc().  This is not safe to do since it is
possible on some platforms for xdr_alloc() to allocated memory
using a method other than the malloc() linked to the vos
executable.

Instead of stealing the xdr_alloc()'d buffer, allocate a new
buffer and copy the contents.

Change-Id: Icdda3d4d0b7c15464fe7f48123f3e0ebed4c2cc5
Reviewed-on: http://gerrit.openafs.org/3600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
15 years agoWindows: cleanup preprocessor definition namespace
Jeffrey Altman [Mon, 27 Dec 2010 22:57:59 +0000 (17:57 -0500)]
Windows: cleanup preprocessor definition namespace

Do not use reserved preprocessor symbol names.  Instead
use OPENAFS_<PATH>_<HEADER>_H formatted names where <PATH>
is the subdirectory path from src/ in which the header
file originates in the repository.

Change-Id: I998d7feeddeb9660f3fc514e2ba752c54e402a24
Reviewed-on: http://gerrit.openafs.org/3599
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>
15 years agoWindows: separate parsemode from fs into own file
Jeffrey Altman [Fri, 24 Dec 2010 18:36:51 +0000 (13:36 -0500)]
Windows: separate parsemode from fs into own file

Separate parsemode() from fs.c into parsemode.c.

Restructure the function prototypes and the fs.h header
to permit building fs.exe from multiple source files.

Change-Id: I80840899706fd585addd165edc13a9e79928427a
Reviewed-on: http://gerrit.openafs.org/3591
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agovos: free ubulkentries with xdr_free
Jeffrey Altman [Fri, 24 Dec 2010 15:06:05 +0000 (10:06 -0500)]
vos: free ubulkentries with xdr_free

Instead of using free() to free the ubulkentries data structure
use xdr_free().

Change-Id: I367e984d1777fcc8a3ec81b501174fae2fd0c8ff
Reviewed-on: http://gerrit.openafs.org/3590
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
15 years agotests: Add tests for afsconf_'s key functions
Simon Wilkinson [Mon, 27 Dec 2010 20:29:48 +0000 (20:29 +0000)]
tests: Add tests for afsconf_'s key functions

Add tests for all of the public functions that afsconf exports
to manipulate KeyFiles. Include a sample Keyfile to start with, to
ensure that we can continue to read KeyFiles produced by current
versions of the code.

These tests are here to catch regressions with a forthcoming rewrite
of KeyFile handling.

Change-Id: I02aaff82aa7e1b7a73981c7cf26a81164e0dd932
Reviewed-on: http://gerrit.openafs.org/3598
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoDon't trust # of entries from ListAttributes
Simon Wilkinson [Sun, 26 Dec 2010 14:54:43 +0000 (14:54 +0000)]
Don't trust # of entries from ListAttributes

ListAttributes returns the number of entries in its array as an RPC
argument. But, we can't trust this, as it could be manipulated and
end up pointing past the end of the returned array (which is counted,
so the entries argument is actually pointless).

Add bounds checking to the functions which use this value to prevent
this problem.

Change-Id: I62398d8f6b5c54318c1a42f1bad67a21c90ef944
Reviewed-on: http://gerrit.openafs.org/3597
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoRemove extra trailing \s in Makefiles
Andrew Deason [Wed, 22 Dec 2010 02:40:19 +0000 (21:40 -0500)]
Remove extra trailing \s in Makefiles

Remove a few extra trailing \s in Makefiles in viced and bozo. Some
'make's (such as the make on HP-UX) interpret this to e.g. include the
following "headers=" stuff to be included in LIBS, which obviously
causes problems.

Change-Id: I7a49ce5b8d40636bb3b4fe7978aa25b5411c7eed
Reviewed-on: http://gerrit.openafs.org/3575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agovolser: Fix broken bulk conversion
Simon Wilkinson [Sun, 26 Dec 2010 14:14:38 +0000 (14:14 +0000)]
volser: Fix broken bulk conversion

The converstions between the original, N and U bulk list return
values were all broken in various ways:

1/ Shifting from malloc to xdr_alloc() (in 4f1efdc8b73ed)
   subtly changed the behaviour when handling an empty list. The
   correct XDR representation of an empty list is {0, NULL}, not
   {0, &memZero}. Fix the code so that if the source list is empty,
   an empty destination list is returned.
2/ The destination list length was never being filled in. This means
   that xdr_free() could not be safely used on this list, as the wrong
   length would be passed to the allocator. Fill in the destination
   list length as part of the conversion.
3/ xdr_free(...) is a no-op when called with an empty list - there's
   no need to check before calling it. Remove these checks to improve
   the code's readability.
4/ xdr_free(...) should only be called when the RPC returned
   sucessfully. The stub is responsible for freeing data should the call
   fail mid way through unmarshalling.
5/ Where an RPC returns the number of entries independently of the
   length of a counted array, it is unsafe to use that length to
   iterate the array without checking that it is within the array
   bounds. Instead, just use the array length when performing
   conversions.

Change-Id: Ied9a77849062e5a1e506f13d4d90d116cefe41e4
Reviewed-on: http://gerrit.openafs.org/3596
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agovos: Abstract out bulk list conversion
Simon Wilkinson [Sun, 26 Dec 2010 14:00:42 +0000 (14:00 +0000)]
vos: Abstract out bulk list conversion

Pull the various segments of code that do bulk list conversion into
their own functions. This is purely code reorganisation at this point,
fixes for these functions will follow in subsequent patches.

Change-Id: I941e94aaf776ece85f041d02f5bdbaad5cf5b129
Reviewed-on: http://gerrit.openafs.org/3595
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
15 years agoLink hcrypto before roken
Andrew Deason [Wed, 22 Dec 2010 15:46:11 +0000 (10:46 -0500)]
Link hcrypto before roken

We must e.g. -lafshcrypto before we -lrokenafs, since stuff in hcrypto
can use functions provided by roken (such as ct_memcmp or
rk_cloexec_file). Fix any users of LIB_hcrypto that do not do this to
put LIB_roken after LIB_hcrypto.

Change-Id: I55f5589a521ed7da7a6692d817e94f18076ff4bc
Reviewed-on: http://gerrit.openafs.org/3584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoUpdate NEWS for 1.5.78 and 1.6.0pre1
Russ Allbery [Fri, 24 Dec 2010 18:53:22 +0000 (10:53 -0800)]
Update NEWS for 1.5.78 and 1.6.0pre1

Based on the release notes.  Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate.  Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.

Reviewed-on: http://gerrit.openafs.org/3592
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 676a4efc232bc77fe20e46c2dbe45e89f89cd670)

Change-Id: I324e55c82bf2e353143368ccd4ca074a646d11d1
Reviewed-on: http://gerrit.openafs.org/3594
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoUpdate NEWS for 1.5.78 and 1.6.0pre1
Russ Allbery [Fri, 24 Dec 2010 18:53:22 +0000 (10:53 -0800)]
Update NEWS for 1.5.78 and 1.6.0pre1

Based on the release notes.  Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate.  Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.

Change-Id: I8d14dd0ec030e3d047f1d2e85c888c1d86e7f3c0
Reviewed-on: http://gerrit.openafs.org/3592
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoauth: Add more tests and resulting fixes to userok
Simon Wilkinson [Fri, 24 Dec 2010 18:32:30 +0000 (18:32 +0000)]
auth: Add more tests and resulting fixes to userok

Add tests for the functions afsconf_SuperUser() and
afsconf_SuperIdentity(). These had been missing tests because testing
them requires starting a client and a server, so amend the superuser-t
tests so that they can start up a simple server.

Fix a number of problems that the tests expose, with setting (and
freeing) identities in corner cases.

Change-Id: I29f5f9eda7f532c98183d588e488d704f8efad88
Reviewed-on: http://gerrit.openafs.org/3593
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoUpdate CellServDB to 2010-12-13
Anders Kaseorg [Fri, 24 Dec 2010 22:45:59 +0000 (17:45 -0500)]
Update CellServDB to 2010-12-13

15 years agoInclude afs_compile_et in libopenafs-dev
Russ Allbery [Sat, 25 Dec 2010 03:35:39 +0000 (19:35 -0800)]
Include afs_compile_et in libopenafs-dev

* Now that upstream has renamed compile_et to afs_compile_et, include it
  in libopenafs-dev.

15 years agoUpdate libafsrpc1 symbols for upstream changes
Anders Kaseorg [Fri, 24 Dec 2010 22:29:24 +0000 (17:29 -0500)]
Update libafsrpc1 symbols for upstream changes

15 years agoDrop --enable-reduced-depends for right now
Russ Allbery [Sat, 25 Dec 2010 03:23:42 +0000 (19:23 -0800)]
Drop --enable-reduced-depends for right now

* Drop --enable-reduced-depends for right now.  aklog doesn't deal with
  it correctly.

15 years agoAdd initial changelog entry for 1.6.0~pre1-1
Russ Allbery [Sat, 25 Dec 2010 03:18:28 +0000 (19:18 -0800)]
Add initial changelog entry for 1.6.0~pre1-1

15 years agoMerge commit 'upstream/1.6.0.pre1' into experimental
Russ Allbery [Sat, 25 Dec 2010 03:03:03 +0000 (19:03 -0800)]
Merge commit 'upstream/1.6.0.pre1' into experimental

15 years agoFix module loading variable name in openafs-client init script
Russ Allbery [Sat, 25 Dec 2010 01:21:51 +0000 (17:21 -0800)]
Fix module loading variable name in openafs-client init script

$disabled is better since 1 means it is disabled.

15 years agoSupress errors when checking if kernel module loading is disabled
Russ Allbery [Sat, 25 Dec 2010 01:18:38 +0000 (17:18 -0800)]
Supress errors when checking if kernel module loading is disabled

In the openafs-client init script, suppress errors from cat if the
modules_disabled flag file in /proc/sys/kernel doesn't exist, since
this was added in 2.6.31.

15 years agoFix return status when checking if module loading is disabled
Russ Allbery [Sat, 25 Dec 2010 01:15:34 +0000 (17:15 -0800)]
Fix return status when checking if module loading is disabled

A return status of 0 is success in shell.

15 years agoFix suppression of module unloading in openafs-client init script
Russ Allbery [Sat, 25 Dec 2010 01:05:51 +0000 (17:05 -0800)]
Fix suppression of module unloading in openafs-client init script

Use consistent variable names and remove a bashism.

15 years agoImported upstream tag openafs-stable-1_6_0pre1 via tarball upstream/1.6.0.pre1
Anders Kaseorg [Fri, 24 Dec 2010 21:41:31 +0000 (16:41 -0500)]
Imported upstream tag openafs-stable-1_6_0pre1 via tarball

15 years agoDAFS: listvol + unsalvagable volumes = intolerable delay
Derrick Brashear [Thu, 23 Dec 2010 18:20:42 +0000 (13:20 -0500)]
DAFS: listvol + unsalvagable volumes = intolerable delay

a non- inService volume (or more) plus vos listvol equals pain.
return Salvaging instead of waiting for it in the listvol case.

Change-Id: I02bdbb6448bcf56e97db9324aa723cc753a37632
Reviewed-on: http://gerrit.openafs.org/3588
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoPrefer libHcurses over libcurses
Andrew Deason [Wed, 22 Dec 2010 14:46:48 +0000 (09:46 -0500)]
Prefer libHcurses over libcurses

Use the HP-UX-specific libHcurses instead of libcurses, like we used
to. Otherwise we fail to link some gtx programs.

Change-Id: I7b8a012d5d263c611a144e05466c5435b5ff310a
Reviewed-on: http://gerrit.openafs.org/3583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoHPUX: Put __HP_CURSES back in
Andrew Deason [Wed, 22 Dec 2010 05:02:45 +0000 (00:02 -0500)]
HPUX: Put __HP_CURSES back in

We need __HP_CURSES to be defined in order to get the _maxx WINDOW*
field among other things. Define it on HPUX again (it was taken out as
part of 4a6a00d6f45bd0ac94e2eb05adee41552073643a).

Change-Id: I3a17f270a034d97eea04580b8eae98a1784b5640
Reviewed-on: http://gerrit.openafs.org/3582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoAdd $named to Should-Start for openafs-client
Russ Allbery [Thu, 23 Dec 2010 01:01:34 +0000 (17:01 -0800)]
Add $named to Should-Start for openafs-client

* Add $named to Should-Start in the openafs-client init script since the
  client may do DNS lookups for the VLDB and file servers during startup
  in some situations.  (Closes: #586226)

15 years agorx: Make rx_atomic.h a shared header
Simon Wilkinson [Thu, 16 Dec 2010 10:46:43 +0000 (10:46 +0000)]
rx: Make rx_atomic.h a shared header

Copy rx_atomic.h into the shared header directory so that it can be
used by other modules within the AFS build. Note that we can't actually
install this header onto the system (and it cannot be included by
headers which are installed) because it uses autoconf defines to control
its behaviour.

Change-Id: If543f998faa0608b4f7efab90db31f072f9e9981
Reviewed-on: http://gerrit.openafs.org/3579
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX: Avoid unnecessary afs_ShakeLooseVCaches
Andrew Deason [Tue, 21 Dec 2010 15:31:39 +0000 (10:31 -0500)]
LINUX: Avoid unnecessary afs_ShakeLooseVCaches

Before some of the NewVCache refactoring, we only called
afs_ShakeLooseVCaches when afs_vcount was over (or equal to)
afs_maxvcount. Do this again, so we only try to shake loose vcaches
when we need more vcaches. Otherwise, we will call
afs_ShakeLooseVCaches every single time we want a new vcache when
dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning
when we can't free any (which is likely when there are only 1 or 2
vcaches in use).

FIXES 128756

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

Change-Id: I9a108b38fa30e1a45f07c5d5d7d680d2b7d0257f
Reviewed-on: http://gerrit.openafs.org/3578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: remove ifdefs under src/afs/LINUX24
Andrew Deason [Mon, 20 Dec 2010 22:29:37 +0000 (17:29 -0500)]
Cache bypass: remove ifdefs under src/afs/LINUX24

Same as commit 9657695d34badaac654227be8c731a1512f2106b, but for
LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it
is always enabled. Also remove messages about a "cache bypass patched
module".

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

Change-Id: Ia1165e1ff37c18417deef56e79ed791ca77d7a53
Reviewed-on: http://gerrit.openafs.org/3577
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: remove ifdefs under src/afs/LINUX
Marc Dionne [Tue, 23 Nov 2010 23:21:16 +0000 (18:21 -0500)]
Cache bypass: remove ifdefs under src/afs/LINUX

Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled.  Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.

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

Change-Id: Id663878335875d191280f289b8b353c7834648de
Reviewed-on: http://gerrit.openafs.org/3576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoLWP: kill dead code
Derrick Brashear [Tue, 21 Dec 2010 14:08:03 +0000 (09:08 -0500)]
LWP: kill dead code

the pthreads-wrapper LWP doesn't currently compile. it will need
to be revisited if we ever care. remove it (as well as a bit of other
unused code)

Change-Id: I61e7bc493127ec49347ca02b24db8fa79e4cbb28
Reviewed-on: http://gerrit.openafs.org/3564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLWP: don't copy pid to a null pointer
Derrick Brashear [Mon, 20 Dec 2010 21:36:42 +0000 (16:36 -0500)]
LWP: don't copy pid to a null pointer

In LWP_CreateProcess we take a pid. if it's null, don't crash.

Change-Id: I2a491788f5ce23a094e65192164838d5bbfc4b31
Reviewed-on: http://gerrit.openafs.org/3556
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX: Avoid unnecessary afs_ShakeLooseVCaches
Andrew Deason [Tue, 21 Dec 2010 15:31:39 +0000 (10:31 -0500)]
LINUX: Avoid unnecessary afs_ShakeLooseVCaches

Before some of the NewVCache refactoring, we only called
afs_ShakeLooseVCaches when afs_vcount was over (or equal to)
afs_maxvcount. Do this again, so we only try to shake loose vcaches
when we need more vcaches. Otherwise, we will call
afs_ShakeLooseVCaches every single time we want a new vcache when
dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning
when we can't free any (which is likely when there are only 1 or 2
vcaches in use).

FIXES 128756

Change-Id: Ia06f76a6f719e69881b91fb2d975cfc33c85c370
Reviewed-on: http://gerrit.openafs.org/3569
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX: Reduce stack depth on recursive symlink res
Andrew Deason [Fri, 3 Dec 2010 23:20:54 +0000 (17:20 -0600)]
LINUX: Reduce stack depth on recursive symlink res

Instead of calling vfs_follow_link inside afs_linux_follow_link
ourselves, we can just resolve the next step of the symlink resolution
and set the result in nd_set_link(), freeing the string in
.put_link().

For kernels without a usable symlink text cache, this reduces call
depth when resolving a path containing many symlinks by two frames per
layer of indirection, allowing for more deeply-nested symlink paths to
be usable.

Change-Id: I6886c3b67089c8028fd6ad93ab10eb9173bd6fbe
Reviewed-on: http://gerrit.openafs.org/3433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoCache bypass: remove ifdefs under src/afs/LINUX24
Andrew Deason [Mon, 20 Dec 2010 22:29:37 +0000 (17:29 -0500)]
Cache bypass: remove ifdefs under src/afs/LINUX24

Same as commit 9657695d34badaac654227be8c731a1512f2106b, but for
LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it
is always enabled. Also remove messages about a "cache bypass patched
module".

Change-Id: I79526ed78752a4c3da7123e5af1c5eb6afc19fe3
Reviewed-on: http://gerrit.openafs.org/3568
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoDARWIN: replace resource merge script ref with binary
Derrick Brashear [Tue, 21 Dec 2010 14:17:38 +0000 (09:17 -0500)]
DARWIN: replace resource merge script ref with binary

Ro is a helper tool; use Rez directly

Reviewed-on: http://gerrit.openafs.org/3565
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 468ff8e4d298baba9c2d4f96d1a3ec12cf64d0c7)
Change-Id: Ia1fed7345c38b891d644f459b97b36a9f2611a0a
Reviewed-on: http://gerrit.openafs.org/3567

15 years agoDARWIN: make growlagent build not run afoul of ._ fun
Derrick Brashear [Tue, 21 Dec 2010 13:58:31 +0000 (08:58 -0500)]
DARWIN: make growlagent build not run afoul of ._ fun

in some cases a git checkout would promptly merge the ._ file away,
meaning a subsequent build would fail. just use the developer tools
to set an icon instead of clever tricks.

(cherry picked from commit 0ef3ce2006b81f590c62a51b7ec903ebff24b9c8)
Reviewed-on: http://gerrit.openafs.org/3563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I9c30a9b05fb776bff9b19adf58a701799cce0a27
Reviewed-on: http://gerrit.openafs.org/3566
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoDARWIN: replace resource merge script ref with binary
Derrick Brashear [Tue, 21 Dec 2010 14:17:38 +0000 (09:17 -0500)]
DARWIN: replace resource merge script ref with binary

Ro is a helper tool; use Rez directly

Change-Id: I7b3f8105344960a149d7fa0ee1fbb3a332486a04
Reviewed-on: http://gerrit.openafs.org/3565
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoDARWIN: make growlagent build not run afoul of ._ fun
Derrick Brashear [Tue, 21 Dec 2010 13:58:31 +0000 (08:58 -0500)]
DARWIN: make growlagent build not run afoul of ._ fun

in some cases a git checkout would promptly merge the ._ file away,
meaning a subsequent build would fail. just use the developer tools
to set an icon instead of clever tricks.

Change-Id: I34290f0f32cb7ae72a298a7af1ed4bd6a8ef9224
Reviewed-on: http://gerrit.openafs.org/3563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
15 years agoDARWIN: make ARCHFLAGS propagate to shlibs
Derrick Brashear [Tue, 21 Dec 2010 13:57:05 +0000 (08:57 -0500)]
DARWIN: make ARCHFLAGS propagate to shlibs

in order that configure not expand ARCHFLAGS (so we can override from
shell) escape the variable.

Change-Id: I9d5c3f4cc58c66be7ffefbd134ba476673be6ea8
Reviewed-on: http://gerrit.openafs.org/3562
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoSolaris: Support -i in shlib-build
Andrew Deason [Sun, 21 Nov 2010 23:57:22 +0000 (18:57 -0500)]
Solaris: Support -i in shlib-build

Our librokenafs.map file contains symbols that we may not actually
define, since the list of exported symbols varies depending on the
platform's capabilities. This causes errors during linking, which can
be suppressed by marking all symbols as "= EXTERN". Do so by having
shlib-build modify the mapfile at link-time, when -i is specified to
indicate ignoring undefined symbols.

Reviewed-on: http://gerrit.openafs.org/3365
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 222067f6f8fd4f596302befbc48918e10547ed1d)
Change-Id: I4bdf000bbdc10b0818c2fab6eaff912f18e1f4fb
Reviewed-on: http://gerrit.openafs.org/3561
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agobackup: pass in valid dummy pid for LWP
Derrick Brashear [Mon, 20 Dec 2010 21:24:26 +0000 (16:24 -0500)]
backup: pass in valid dummy pid for LWP

LWP_CreateProcess needs memory passed in; instead of a null pointer,
pass in a pointer to a PROCESS.

Reviewed-on: http://gerrit.openafs.org/3555
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4f89d4ad348f1b20b9f27e8985fa09eafb6212e0)
Change-Id: I10c81fc3242294266468560628ff4f328e6e6997
Reviewed-on: http://gerrit.openafs.org/3560

15 years agoLINUX24: Define afs_linux_can_bypass
Andrew Deason [Mon, 20 Dec 2010 16:05:46 +0000 (11:05 -0500)]
LINUX24: Define afs_linux_can_bypass

We call afs_linux_can_bypass, so make sure it exists.

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

Change-Id: Ie31976505170bb01895dfd8734267ab497af901c
Reviewed-on: http://gerrit.openafs.org/3559
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
15 years agoLINUX24: Include linux/pagemap.h
Andrew Deason [Mon, 20 Dec 2010 15:07:11 +0000 (10:07 -0500)]
LINUX24: Include linux/pagemap.h

For 2.4 Linux we need to include linux/pagemap.h, otherwise we get
undeclared references to KM_USER0 and PAGE_CACHE_SIZE.

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

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