]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoImported upstream tag openafs-stable-1_6_0pre6 via tarball upstream/1.6.0.pre6
Russ Allbery [Thu, 16 Jun 2011 15:27:37 +0000 (08:27 -0700)]
Imported upstream tag openafs-stable-1_6_0pre6 via tarball

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).

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

Change-Id: I48dafa5fb442cfc92fb673f2b26e1034fc44c0c7
Reviewed-on: http://gerrit.openafs.org/4730
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolinux: add read_descriptor_t configure test and ifdef
Christof Hanke [Thu, 26 May 2011 05:46:32 +0000 (07:46 +0200)]
linux: add read_descriptor_t configure test and ifdef

With linux 2.6.8 the struct read_descriptor_t changed.
Add a configure-test and respective ifdef to deal with that.

Reviewed-on: http://gerrit.openafs.org/4719
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b)

Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77
Reviewed-on: http://gerrit.openafs.org/4726
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoautoconf: add test for typedef'd structs
Christof Hanke [Wed, 25 May 2011 20:16:59 +0000 (22:16 +0200)]
autoconf: add test for typedef'd structs

AC_CHECK_LINUX_STRUCT does not work for structs which are typedef'd.
The gcc will complain with "error: storage size of ‘_test’ isn’t known"
and fail the test.
Thus the new test-macro AC_CHECK_LINUX_TYPED_STRUCT.

Reviewed-on: http://gerrit.openafs.org/4718
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit baf7656f666e0d47047c545561345e7803b8a141)

Change-Id: I7feca884d7796ccd3a490d6b81e745c644d9c8f1
Reviewed-on: http://gerrit.openafs.org/4725
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFBSD: VIMAGE support
Ben Kaduk [Thu, 26 May 2011 05:11:14 +0000 (01:11 -0400)]
FBSD: VIMAGE support

Starting in FreeBSD 8.0, there is support for multiple virtual
network stacks (generally to be exposed to separate jail(8) environments).
It is enabled as a kernel configuration option, so our builds against
GENERIC have not failed, but we fail to build when options VIMAGE
is present.  Fix our variable references accordingly.

Submitted-by: Hiroki Sato of freebsd.org
Reviewed-on: http://gerrit.openafs.org/4721
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 9703b023cc0f5088eab5135acf7417e90ebbb2cd)

Change-Id: I058ed4fd637f205701e5aab4d88d65386097f9c0
Reviewed-on: http://gerrit.openafs.org/4724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: note parms file deprecation
Derrick Brashear [Wed, 25 May 2011 21:05:53 +0000 (17:05 -0400)]
viced: note parms file deprecation

/vice/file/parms is unsupported and will be removed later. 1.6 only change.
master version will remove it.

Change-Id: Id41ca57c1331fb59b87f7f6a06281b640a8c9879
Reviewed-on: http://gerrit.openafs.org/4720
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: disable bulkstat
Derrick Brashear [Wed, 25 May 2011 19:31:40 +0000 (15:31 -0400)]
macos: disable bulkstat

1.6 only change. there's still an issue where potentially
multiple contexts reference a vnode which needs to be finalized; the fixup
is successful but there's no hint to other threads to reref before proceeding
(no actual troublesome access while waiting for the fixup as the vnode
will not have actually been CStatd yet)

Change-Id: Ib72f69b74c94b7cac74a9a01a54a8872e32f9717
Reviewed-on: http://gerrit.openafs.org/4717
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agodes: generated files should not require objects needed in libdes
Derrick Brashear [Tue, 24 May 2011 18:36:04 +0000 (14:36 -0400)]
des: generated files should not require objects needed in libdes

1.6 only change, since DES is dead. don't require the same misc.o
in both libdes and when generating generated files to making, as
make dependencies then throw away valid input.

Change-Id: Icf6a211e66d7390ac73fa1effb89a0c4a131666f
Reviewed-on: http://gerrit.openafs.org/4713
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: ChangeLog for 1.5.9906 (1.6.0pre6)
Jeffrey Altman [Mon, 23 May 2011 17:26:20 +0000 (13:26 -0400)]
Windows: ChangeLog for 1.5.9906 (1.6.0pre6)

Reviewed-on: http://gerrit.openafs.org/4706
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from ba76149a57f0cfd92672580b7047a557f159ee52)

Change-Id: Id400d48bf5e8699558133b4b7812a2703a4508e5
Reviewed-on: http://gerrit.openafs.org/4707
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoReplace uintptr_t type cast with uintptrsz in afs_vcache.c
Antoine Verheijen [Tue, 17 May 2011 15:40:15 +0000 (09:40 -0600)]
Replace uintptr_t type cast with uintptrsz in afs_vcache.c

A recent change (commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0)
to afs_vcache.c contains a call to afs_warn() whose second parameter
contains a "(uintptr_t)" type cast as part of a double type cast.
This presents an issue on some systems, such as OpenBSD, where this
object type is defined in a header that is not presently included.
This change modifies that type cast to instead use the AFS-internal
"(uintptrsz)" type which should provide the same effect.

Note that an earlier version of this patch attempted to remove the
"offending" type cast as redundant but it was pointed out that some
systems require this kind of cascading type cast when casting pointers
to integers to deal with possible size issues.

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

Change-Id: I3c7452d1f09dc7fdbcffe9b047e4ec682ac6ea03
Reviewed-on: http://gerrit.openafs.org/4705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomake 1.6.0pre6
Derrick Brashear [Sun, 22 May 2011 15:40:46 +0000 (11:40 -0400)]
make 1.6.0pre6

update for 1.6.0pre6 the various build strings

Change-Id: Ic5deaa84f28cc39e955a0fcb1472a849d9feb4a3
Reviewed-on: http://gerrit.openafs.org/4703
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Flush vcaches in afs_shutdown
Andrew Deason [Tue, 10 May 2011 19:16:06 +0000 (14:16 -0500)]
libafs: Flush vcaches in afs_shutdown

Currently, a few platforms (linux, linux24, solaris, irix) flush all
vcaches during shutdown. However, they do this before calling
afs_shutdown(), resulting in afs_FlushVCache queueing VCBs and
possibly trying to give the callbacks back to the server.

Instead of this, perform the flushes in afs_shutdown itself, so we do
this after we try to give up all callbacks to all servers, and we do
this while afs_shuttingdown is set, so we don't try to queue VCBs.
This also consolidates some of the duplicated code to flush all
vcaches, and now does this for all platforms.

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

Change-Id: I90afacbdd7ef0f52de4589001ec9bb8ffd292782
Reviewed-on: http://gerrit.openafs.org/4702
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoxdr symbol fallout
Derrick Brashear [Wed, 30 Mar 2011 13:46:43 +0000 (09:46 -0400)]
xdr symbol fallout

changes to xdr make xdr_vector and xdr_reference missing from libuafs.
fix it.

(cherry picked from commit 6bdba897f49b8358d3592588a78d9b59757a9c13)
Change-Id: I6ed0e035ff928f3cf93fdc42c7ee0f31096de978
Reviewed-on: http://gerrit.openafs.org/4379
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/4704

14 years agodoc: -afsdb uses SRV records
Ken Dreyer [Mon, 16 May 2011 23:53:43 +0000 (19:53 -0400)]
doc: -afsdb uses SRV records

afsd's -afsdb option now uses DNS SRV records (RFC 5864). Update the manpages
to reflect this.

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

Change-Id: Ibcdb7c0564d9ac56fa9e50123950e7f758761111
Reviewed-on: http://gerrit.openafs.org/4701
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: bulkstat redux
Derrick Brashear [Fri, 20 May 2011 18:13:01 +0000 (14:13 -0400)]
macos: bulkstat redux

simplify the logic which can require sleeps in various vcache
resolution paths. instead of the two-pass system we had before,
just guess using the even/odd hack what type a vnode will be.
if a vnode turns out to be a link and thus we are wrong, we
do a fixup later. other callers who "race" with bulkstat
(which is a supported feature, otherwise you'd have to block
callbacks) will also call through a fixup to get the correct
backing vnode type. this is necessary as the KPI doesn't
let us change the type of a vnode after it's been created.

side effect: eliminate many of the ugly cases where we had been
sleeping waiting for a vnode to be finalized even before bulkstat.

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

Change-Id: I7a9c3e4f94496aa1a553ad54f6d43a0d0e6ccd5a
Reviewed-on: http://gerrit.openafs.org/4699
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agodynroot: mark vnode types on dynroot vnodes
Derrick Brashear [Fri, 20 May 2011 18:10:49 +0000 (14:10 -0400)]
dynroot: mark vnode types on dynroot vnodes

when we create a vnode using a dynroot fid, we weren't bothering
to update the type from the default (typically VREG); most
dynroot vnodes are actually VDIR...

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

Change-Id: Ic0392216ca5da072022baa1388380f658d324df2
Reviewed-on: http://gerrit.openafs.org/4698
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovolinfo: fix -filenames option check
Michael Meffie [Wed, 18 May 2011 17:42:27 +0000 (13:42 -0400)]
volinfo: fix -filenames option check

Fix the logic for checking the presense of the volinfo -filenames
option.  The original patch inadvertently added the -filenames
check as an if-else cause to the -orphaned flag check, which
prevents filenames from being printed when listing orphaned
vnodes.

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

Change-Id: Ic538976a697317fd3458c8a619f14dd100c4cdab
Reviewed-on: http://gerrit.openafs.org/4697
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Reset syscalls on mod_install failure
Andrew Deason [Thu, 19 May 2011 22:02:35 +0000 (17:02 -0500)]
SOLARIS: Reset syscalls on mod_install failure

If our call to mod_install fails for any reason (for example, if the
afs entry is missing from /etc/name_to_sysnum), we may still have set
the sysent structures for setgroups and ioctl to point at libafs code.
So calls to those syscalls will cause a panic, since the code they
point to is no longer loaded.

To avoid this, just reset the sysent entries back to what they were if
we fail to load, just like we do when unloading the module.

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

Change-Id: Ifb2cd9848b5468c950b600052308370b7c8c2af9
Reviewed-on: http://gerrit.openafs.org/4687
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: always use/protect the xdr routines in the kernel
Chas Williams (CONTRACTOR) [Wed, 16 Mar 2011 14:32:48 +0000 (10:32 -0400)]
rx: always use/protect the xdr routines in the kernel

This clears up some warnings about duplicate symbols with Solaris 11
since the Solaris kernel already has these routines.  Since we never
use stock kernel version of the xdr routines perhaps we should always
use/protect our version of the symbols.

Reviewed-on: http://gerrit.openafs.org/4252
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 8336d31ac5092a16cfb206707e69c19f07f99241)

Change-Id: Iebf4470f5ddfc591f52f51d1d080bd58d11683a8
Reviewed-on: http://gerrit.openafs.org/4682
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoauth: failback to afs3-vlserver for afs3-prserver
Jeffrey Altman [Wed, 18 May 2011 17:51:53 +0000 (13:51 -0400)]
auth: failback to afs3-vlserver for afs3-prserver

If the DNS SRV lookup is for afs3-prserver or afs3-kaserver,
fallback to a lookup for afs3-vlserver since those services
are traditionally hosted on the same machine as the vlserver.

FIXES 129887

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

Change-Id: I9d0e2f0ca9d4ddc5ebf9defb44c62f6bf00955d6
Reviewed-on: http://gerrit.openafs.org/4681
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: lock protected fields must be 32-bit
Jeffrey Altman [Mon, 16 May 2011 01:56:17 +0000 (21:56 -0400)]
Windows: lock protected fields must be 32-bit

It is not safe to protect two 16-bit fields in a structure
with different locks.  Switch to using 32-bit fields.

Increment the cm-memmap version number since the data structure
sizes changed and the cache file must be invalidated.

Change-Id: If363654c4d0dd8efd225c9ff19b99bb4f4b7b70e
Reviewed-on: http://gerrit.openafs.org/4675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: add lock assertions to cm_buf.c
Jeffrey Altman [Mon, 16 May 2011 01:53:56 +0000 (21:53 -0400)]
Windows: add lock assertions to cm_buf.c

add lock assertions to cm_buf.c in hopes of detecting why
periodic buf_scacheHashTable corruption is being detected.

Change-Id: Ib93ac7d449c7f2cb065219981f16ba319a9273b1
Reviewed-on: http://gerrit.openafs.org/4659
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4674

14 years agoWindows: test return from krb5_cc_start_seq_get
Jeffrey Altman [Mon, 16 May 2011 01:51:14 +0000 (21:51 -0400)]
Windows: test return from krb5_cc_start_seq_get

If krb5_cc_start_get fails when using Heimdal, the cursor
is invalid and it is not safe to pass it into subsequent
functions.

Change-Id: I2218d8824af0e35392457b960f11bef970072638
Reviewed-on: http://gerrit.openafs.org/4658
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4673

14 years agorpm: Really undefine %dist
Andy Cobaugh [Wed, 11 May 2011 21:02:40 +0000 (17:02 -0400)]
rpm: Really undefine %dist

rpmbuild --eval '%undefine dist' wasn't sticking on redhat 5.x. I think
the correct way to undefine this is to --define 'dist %undefined'

Some redhat 5.x installs have %dist defined depending on what else has been
installed.

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

Change-Id: I41828880a10097059ae0297ae191fa2a96e804d2
Reviewed-on: http://gerrit.openafs.org/4665
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoLinux: fix reading files larger than the chunk size
Marc Dionne [Sun, 15 May 2011 00:57:12 +0000 (20:57 -0400)]
Linux: fix reading files larger than the chunk size

Commit 2571b6285d5da8ef62ab38c3a938258ddd7bac4e fixed an issue with
the use of tmpfs as a disk cache and ftruncate() on files in AFS.
But it introduced a problem reading larger files as reported in
RT ticket 129880.

What should be compared against the current cache file size is the
offset into the current chunk, not the overall offset for the whole
file.

FIXES: 129880

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

Change-Id: I0349d744a9e16b6448a621fe6f4078b1eb1fa9d2
Reviewed-on: http://gerrit.openafs.org/4664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Do not write-lock afs_xserver on ICBS
Andrew Deason [Tue, 10 May 2011 17:54:53 +0000 (12:54 -0500)]
libafs: Do not write-lock afs_xserver on ICBS

Our RXAFSCB_InitCallBackState* handler currently write-locks
afs_xserver when it clears the SCAPS_KNOWN flag for the relevant
server. However, the afs_xserver lock is for protecting the global
list and hash table of server structures, and is not necessary to
acquire in order to modify the flags of an individual server struct.
For instance, CkSrv_GetCaps does not acquire any locks to modify the
server flags.

Taking this lock conflicts with a read lock on afs_xserver acquired by
afs_FlushVCBs when it traverses the list of server structures.
afs_FlushVCBs may contact a server that then calls InitCallBackState
on us, causing a deadlock if ICBS waits for the afs_xserver lock.

So, avoid locking afs_xserver in this case, to avoid that deadlock.

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

Change-Id: I095c74f51f1ddb74ebaecda221ca45a4f6ad09c8
Reviewed-on: http://gerrit.openafs.org/4663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agodasalvager: unlink fsstate.dat when standalone
Andrew Deason [Fri, 6 May 2011 18:12:17 +0000 (13:12 -0500)]
dasalvager: unlink fsstate.dat when standalone

If the DAFS salvager is running in a standalone mode, unlink the
fileserver's fsstate.dat file if any volumes change. Otherwise, volume
data could have changed and the fileserver will retain callback
promises for the data in those volumes until it tries to attach the
volume. This way, callbacks are broken via callback state
reinitialization.

A better solution is to record which volumes have changed, and the
fileserver can break callbacks for them on startup. But this at least
eliminates a regression from non-DAFS behavior.

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

Change-Id: Ic931ce8118e8d76d799ce7e731451a6a4bf3c241
Reviewed-on: http://gerrit.openafs.org/4662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Put back GetCapabilities user reference
Andrew Deason [Thu, 5 May 2011 22:13:21 +0000 (17:13 -0500)]
libafs: Put back GetCapabilities user reference

afs_GetCapabilities gets a user reference for the conn for the
GetCapabilities call. Put the ref back so we don't leak refs.

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

Change-Id: Ia505de8e5ec7ded14f2e2e40ac8bd3ef0b91c2fc
Reviewed-on: http://gerrit.openafs.org/4637
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoLinux: fix permission op test for certain compilers
Marc Dionne [Sat, 14 May 2011 17:19:52 +0000 (13:19 -0400)]
Linux: fix permission op test for certain compilers

Some compilers complain that _inode is used uninitialised here.
Since this test requires -Werror, it causes the test to fail
and our permission op to be used in RCU mode, leading to lockups.

Initialise it to make the compilers happy.

Fixes a lockup seen on kernels 2.6.38+ on Gentoo and Debian.

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

Change-Id: Icc4e65946c8d04bd519c95b969dec1d2359dce51
Reviewed-on: http://gerrit.openafs.org/4655
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoImported upstream tag openafs-stable-1_6_0pre5 via tarball upstream/1.6.0.pre5
Russ Allbery [Sat, 14 May 2011 17:42:32 +0000 (10:42 -0700)]
Imported upstream tag openafs-stable-1_6_0pre5 via tarball

14 years agoWindows: always try afs/cell@USER-REALM first
Jeffrey Altman [Mon, 9 May 2011 14:46:46 +0000 (10:46 -0400)]
Windows: always try afs/cell@USER-REALM first

In the KFW_AFS library, always try afs/cell@USER-REALM
first, even when KFW_AFS_klog() is called with an explicit
realm mapping for the cell.  An afs service principal from
the user's realm is always preferred.  No cross realm and
if the realm is AD, the ability to avoid the inclusion of
a PAC.

Change-Id: Ie1a963f3826e10b3f37acf5829532046fe42e88e
Reviewed-on: http://gerrit.openafs.org/4633
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4635

14 years agoWindows: support dotted names in aklog
Jeffrey Altman [Mon, 9 May 2011 14:45:33 +0000 (10:45 -0400)]
Windows: support dotted names in aklog

Do not reject dotted principal names if the registry
configuration states that they should be accepted.

Change-Id: I68a3054e77236ff307cc45b6563f34ec6605113a
Reviewed-on: http://gerrit.openafs.org/4632
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4634
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: replace CYGWIN envvar with CYGWINDIR
Jeffrey Altman [Fri, 6 May 2011 13:49:52 +0000 (09:49 -0400)]
Windows: replace CYGWIN envvar with CYGWINDIR

The environment variable CYGWIN (starting with cygwin 1.7.1) is
now used by CYGWIN to set configuration parameters for the cygwin
runtime library.  OpenAFS used it to indicate the location of the
Cygwin install directory.  Since there is a conflict, rename CYGWIN
to CYGWINDIR.

Change-Id: I32cd79eba33fc80e15308010fafdaecb527d23f0
Reviewed-on: http://gerrit.openafs.org/4629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4630
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: change log for 1.5.9905
Jeffrey Altman [Fri, 6 May 2011 00:36:38 +0000 (20:36 -0400)]
Windows: change log for 1.5.9905

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

14 years agomake 1.6.0pre5
Derrick Brashear [Tue, 3 May 2011 12:47:31 +0000 (08:47 -0400)]
make 1.6.0pre5

update bits needed for pre5

Change-Id: Iec57e2a69ea02c25b1c71b3d7ac4beb6eafc69c1
Reviewed-on: http://gerrit.openafs.org/4618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoNetBSD: DEBUG can not typically be defined
Jonathan A. Kollasch [Mon, 2 May 2011 21:06:34 +0000 (21:06 +0000)]
NetBSD: DEBUG can not typically be defined

Like IRIX 6.5, some NetBSD kernel structures change size in the presence
of the DEBUG preprocessor symbol.

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

Change-Id: I15771316dc657474d8b906df26f927fdbefe384c
Reviewed-on: http://gerrit.openafs.org/4617
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoNetBSD: translate timeval structure format in clock_GetTime()
Jonathan A. Kollasch [Mon, 2 May 2011 20:03:50 +0000 (20:03 +0000)]
NetBSD: translate timeval structure format in clock_GetTime()

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

Change-Id: I819abb0b3207517f4a560e10896db211006f1980
Reviewed-on: http://gerrit.openafs.org/4616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoavoid downward vcache pressure when entries are free
Derrick Brashear [Fri, 29 Apr 2011 07:59:19 +0000 (03:59 -0400)]
avoid downward vcache pressure when entries are free

we try to keep VCACHE_FREE entries free. if there's already that many free,
do nothing.

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

Change-Id: Ia19b748596eadc75c6487d5fe854d2c7c4a4595a
Reviewed-on: http://gerrit.openafs.org/4615
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFix com_err renaming
Simon Wilkinson [Tue, 3 May 2011 09:03:22 +0000 (10:03 +0100)]
Fix com_err renaming

The pull up of 352c3e366c2e0a8de4550547192276e62afd2cc1 to the 1.6
branch missed replacing occurences of com_err with afscom_err in
the sgistuff and pam directories. Fix this so that Irix builds
again.

Change-Id: I38ab02859a7cb2ebd60e455e6db4dc2c47710766
Reviewed-on: http://gerrit.openafs.org/4614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Drop xvcache for AllocCBR
Andrew Deason [Tue, 15 Feb 2011 18:04:32 +0000 (12:04 -0600)]
libafs: Drop xvcache for AllocCBR

Normally when we AllocCBR, we are holding xvcache write-locked, since
it is called from FlushVCache. Before
a309e274632993c5aeec04c6e090f5ac95837a40, when AllocCBR needs to flush
CBRs due to a lack of space, we hit the net, giving up callbacks on
fileservers.

This can cause a problem if one of those fileservers needs to contact
us in order to complete that request, since the callback service
thread may be waiting for xvcache, causing a deadlock (that is
eventually broken by network timeouts).

To avoid this, drop xvcache if AllocCBR looks like it does not have
sufficient space. Fix all callers of afs_FlushVCache to handle the
case where we sleep, since with this change, afs_FlushVCache can sleep
on all platforms.

This partially reverts a309e274632993c5aeec04c6e090f5ac95837a40, as it
contains an alternative method of avoiding the xvcache lock in this
situation. This commit restores much of the code path to be much more
similar to how it used to be, except that it allows for dropping
xvcache for AllocCBR. This should make any change to our prior
behavior smaller/simpler, and thus safer and more consistent with
existing clients. This reintroduces the hard limit to how much space
we allocate for CBRs, although the part of
a309e274632993c5aeec04c6e090f5ac95837a40 that raised this limit is
retained.

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

Change-Id: I6d2d7512682b93e6524f8f60bb8e15818d888e00
Reviewed-on: http://gerrit.openafs.org/4603
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Use vcount, not maxvcount to trim vcaches
Andrew Deason [Thu, 28 Apr 2011 16:48:18 +0000 (11:48 -0500)]
libafs: Use vcount, not maxvcount to trim vcaches

Every five minutes we afs_ShakeLooseVCaches to try and return the
number of vcaches in use down to the originally configured -stat level
(when we are using dynamic vcaches). We should calculate how many
vcaches to flush based on the number of currently active vcaches
(afs_vcount), not the peak number (afs_maxvcount). Otherwise, once we
exceed the configured -stat level, we will always keep trying to flush
numerous vcaches, even if we barely have any vcaches in use.

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

Change-Id: I80cfbf31ba81d7cf23013c0efcea0b8ac8c341db
Reviewed-on: http://gerrit.openafs.org/4602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoLinux: Don't read pages beyond the cache eof
Simon Wilkinson [Mon, 25 Apr 2011 18:18:39 +0000 (14:18 -0400)]
Linux: Don't read pages beyond the cache eof

If we attempt to read past the end of the current cache file (for
example, when we're extending the file with ftruncate), don't force
the backend filesystem to populate that page with non-existent data.

This will hopefully fix a bus error when using tmpfs as a backing
cache.

FIXES 128452

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

Change-Id: Id9956be824a4c4d8db7deb65403f4d9740758e42
Reviewed-on: http://gerrit.openafs.org/4600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Improve deleted client log messages
Andrew Deason [Wed, 27 Apr 2011 21:24:46 +0000 (16:24 -0500)]
viced: Improve deleted client log messages

Change the information logged related to deleted clients to be a
little more useful. In particular this includes adding the client and
host refcounts, to help see if the cause is a reference count leak.

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

Change-Id: I3bfcf49587f826129979b81de95b92cb2b332790
Reviewed-on: http://gerrit.openafs.org/4593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Avoid ref leak on origin callback break
Andrew Deason [Wed, 27 Apr 2011 19:23:43 +0000 (14:23 -0500)]
viced: Avoid ref leak on origin callback break

When breaking a callback, sometimes we send a callback to the host
that performed the callback-inducing operation. When we do this,
currently BreakCallBack gives the origin host structure to
MultiBreakCallBack_r, which avoids releasing that host after the
callback is broken.

However, BreakCallBack obtains a reference to every host to which it
delivers a callback, even if it is the origin host, so a reference is
leaked. Fix this by not ever passing a host to MultiBreakCallBack_r,
and just have MultiBreakCallBack_r release a reference for every host
to which it delivers a callback break.

FIXES 129376

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

Change-Id: Ifd59c8ce93939f7b23e9f64bd7c0e527d3a2fa52
Reviewed-on: http://gerrit.openafs.org/4592
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Transfer host ref in h_FindClient_r
Andrew Deason [Wed, 27 Apr 2011 18:51:23 +0000 (13:51 -0500)]
viced: Transfer host ref in h_FindClient_r

In h_FindClient_r, we can change which client structure we're dealing
with if we find a different client struct in the Rx conn-specific
data. We adjust the refcounts for the client structures themselves,
but not the associated hosts. While the host structures should be the
same most of the time, we are not guaranteed that, so adjust their
refcounts as well.

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

Change-Id: I9ec5ed707ef6b726c358fcaa46d81b9ea1a17ce7
Reviewed-on: http://gerrit.openafs.org/4591
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Release all hosts in h_Enumerate*
Andrew Deason [Sat, 23 Apr 2011 21:52:30 +0000 (16:52 -0500)]
viced: Release all hosts in h_Enumerate*

h_Enumerate and h_Enumerate_r were not releasing all of the holds they
obtained when the callback function caused the enumeration to bail
early. Correct them so all host holds are released.

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

Change-Id: Iceb1e2961e9bbb11640c6fccdeb8713a9657df99
Reviewed-on: http://gerrit.openafs.org/4534
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Print a warning when using a deleted client
Andrew Deason [Sat, 23 Apr 2011 21:44:41 +0000 (16:44 -0500)]
viced: Print a warning when using a deleted client

We should never get a deleted client back from GetClient. Log a
message if we do, to explain why access may suddenly appear to fail,
and assist in determining why.

Note that we still try to service the request, since the accessing
user may still have enough access to do whatever was requested.

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

Change-Id: I0b1d9fe46e5b83b93b59ff6facc2421db9136c12
Reviewed-on: http://gerrit.openafs.org/4533
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoviced: Force valid host enumeration flags
Andrew Deason [Sat, 23 Apr 2011 21:32:10 +0000 (16:32 -0500)]
viced: Force valid host enumeration flags

Make sure that the callback functions for h_Enumerate and
h_Enumerate_r give us back valid flags values by aborting if they
return an invalid value.

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

Change-Id: Ia1b7537d7988203bd8c0bbc619c04f5b3f9387a1
Reviewed-on: http://gerrit.openafs.org/4532
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agodoc: Fix 'vos endtrans' copyright
Andrew Deason [Thu, 28 Apr 2011 18:55:09 +0000 (13:55 -0500)]
doc: Fix 'vos endtrans' copyright

SNA owns this, not me.

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

Change-Id: Ib260b89ced9616d31242237048a900616ca9820b
Reviewed-on: http://gerrit.openafs.org/4601
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Fix caching of non-existing vols
Jeffrey Altman [Sun, 1 May 2011 04:11:13 +0000 (00:11 -0400)]
Windows: Fix caching of non-existing vols

In cm_UpdateVolumeLocation() the conditional that would
trigger the immediate return of CM_ERROR_NOSUCHVOLUME
was backwards which prevented the caching from working.

cm_CheckOfflineVolumes() is called by the daemon thread
to reset the status of offline volumes.  Non-existing
volumes are by definition offline and cannot be brought
online.  Therefore, the cm_CheckOfflineVolumes() function
should skip volumes with the CM_VOLUMEFLAG_NOEXIST flag
set.

Change-Id: I65534b78842b4887d2fde67162a9d854437001ed
Reviewed-on: http://gerrit.openafs.org/4597
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4598
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRename libcom_err to libafscom_err
Ben Kaduk [Sun, 19 Dec 2010 04:52:43 +0000 (23:52 -0500)]
Rename libcom_err to libafscom_err

We no longer provide a compatible libcom_err, and in fact
we renamed the symbols in our libcom_err several years ago
to reflect this fact.
When we build on a system where KRB5_LIBS includes
-lkrb5 -lcom_err , the new Unix build system will pick up
our libcom_err (as $(AFS_LDFLAGS) is the first argument in
AFS_LDRULE and pulls in a linker search path for our libcom_err)
which does not provide all the needed symbols for libkrb5.

Fully rename our libcom_err away to avoid these conflicts.

FIXES 128640

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

Change-Id: I3aa116d280fe1b0efdfda79787f53fbee336a4e3
Reviewed-on: http://gerrit.openafs.org/4572
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomacos: further next version support
Derrick Brashear [Tue, 26 Apr 2011 14:46:41 +0000 (10:46 -0400)]
macos: further next version support

try to optimize out things which will be missing

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

Change-Id: Ie20120aad8cb477d532594b9462aca3cf993aabb
Reviewed-on: http://gerrit.openafs.org/4571
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoIRIX: set vfs pointer when creating new vcaches
Derrick Brashear [Tue, 26 Apr 2011 02:23:40 +0000 (22:23 -0400)]
IRIX: set vfs pointer when creating new vcaches

add missing call to set our vfsp on irix.

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

Change-Id: If0cccaa47f1110eca347734bfbaedc0456e53b21
Reviewed-on: http://gerrit.openafs.org/4579
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoLinux: Fix fallout from path_lookup commit
Marc Dionne [Wed, 30 Mar 2011 22:32:04 +0000 (18:32 -0400)]
Linux: Fix fallout from path_lookup commit

Fix a few issues with the recent commit to deal withg the removal
of path_lookup, spotted on RHEL 5:
- the configure tests needs fs.h to be included before namei.h, to
get the definition of struct inode
- we need to avoid the use of struct path unless its needed; on
older kernels the structure doesn't exist

(cherry-picked from commit f2e91cc3fe61956e7661eae9da82ddf746e63824)

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

14 years agoviced: Fix host enumeration flags
Andrew Deason [Sat, 23 Apr 2011 21:25:00 +0000 (16:25 -0500)]
viced: Fix host enumeration flags

Do not give uninitialized flags values to h_Enumerate callback
functions. In fact, do not give a flags value to h_Enumerate or
h_Enumerate_r callback functions at all, since they are not actually
used.

Fix host enumeration callback functions to just return 0 or the
relevant flags, instead of basing the return value off of the given
flags value. Update MultiBreakVolumeCallBack_r to use the correct
return values, since it currently tries to use the old meanings of the
host enumeration return values.

FIXES 129376

(cherry picked from commit 5b9d427141f0a6fd0e83de9564e70ef2cfebf656)

Change-Id: Icae627318cd523fa225beb8b53449f61532c4a90
Reviewed-on: http://gerrit.openafs.org/4531
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: afskfw return error if krb5 not loaded
Jeffrey Altman [Tue, 26 Apr 2011 01:41:17 +0000 (21:41 -0400)]
Windows: afskfw return error if krb5 not loaded

If the Kerberos v5 library cannot be loaded (pkrb5_init_context
equal to NULL) return a reasonable error code instead of
returning success and doing nothing.

Change-Id: I90c106ff6bb4463c3d55d5ac1bbf225464c80c0d
Reviewed-on: http://gerrit.openafs.org/4560
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-on: http://gerrit.openafs.org/4568

14 years agoWindows: build afskfw.c without leashw32.dll
Jeffrey Altman [Tue, 26 Apr 2011 01:40:28 +0000 (21:40 -0400)]
Windows: build afskfw.c without leashw32.dll

remove our dependency on mit kfw leashw32.dll

Change-Id: Ibb5bc58dc6bf250d50ae8bd884a08449a356b6e2
Reviewed-on: http://gerrit.openafs.org/4559
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-on: http://gerrit.openafs.org/4567

14 years agoWindows: avoid preprocessor symbols redefinitions
Jeffrey Altman [Tue, 26 Apr 2011 01:29:46 +0000 (21:29 -0400)]
Windows: avoid preprocessor symbols redefinitions

In afskfw.h avoid preprocessor symbol redefinitions when
RD_AP_TIME or INTK_BADPW are already defined.

Change-Id: If123c7a7564c5dbe509ad107f2c856e96e562d33
Reviewed-on: http://gerrit.openafs.org/4558
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-on: http://gerrit.openafs.org/4566

14 years agoWindows: NPLogonNotify provide password in all cases
Jeffrey Altman [Tue, 26 Apr 2011 01:24:32 +0000 (21:24 -0400)]
Windows: NPLogonNotify provide password in all cases

When calling KFW_AFS_get_cred() from NPLogonNotify()
always provide the user password.  Do not count on a
credential cache existing from a previous call.

Change-Id: I24c51395f22c07b11107c03dc749a7c2eff694f7
Reviewed-on: http://gerrit.openafs.org/4557
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-on: http://gerrit.openafs.org/4565

14 years agowindows: improved logging from NPLogonNotify
Jeffrey Altman [Tue, 26 Apr 2011 01:23:34 +0000 (21:23 -0400)]
windows: improved logging from NPLogonNotify

Improve the detail and formatting of the windows event log
entries.

Change-Id: I28350202b954765c570582540fac180bd1f68206
Reviewed-on: http://gerrit.openafs.org/4556
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4564

14 years agoAIX51: Fix PAGs
Andrew Deason [Fri, 15 Apr 2011 16:18:37 +0000 (11:18 -0500)]
AIX51: Fix PAGs

On AIX 5.1 and later, we set a process' PAG by using the AIX PAG
mechanism (and not by group ids), but we were determining what PAG a
process was in by the group list. Instead use the PAG identifier.

This effectively reverts 277c37f48c8126ba9cb986ffc7361fcb98e2bbf2, but
it puts the kcred_getpag call in a different place that makes more
sense in the current PAG code organization.

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

14 years agoLinux: Restrict # of cbrs we allocate at once
Simon Wilkinson [Thu, 21 Apr 2011 15:07:05 +0000 (16:07 +0100)]
Linux: Restrict # of cbrs we allocate at once

With commit a309e274632993c5aeec04c6e090f5ac95837a40, we changed the
number of CBRs that we allocate in a chunk from 300 to 1024. However,
this change takes the amount of memory requried to allocate a chunk
of CBRs above PAGE_SIZE on Linux. This changes the allocator that we
use from kmalloc to vmalloc. Whilst we can, and do, prevent kmalloc
from flushing filesystem pages when we invoke it, we don't have a
similar level of control over vmalloc. 1.6 only: limit it back to 300
elsewhere.

In one reported case, clients deadlock whilst attempting to allocate
this memory, in a call stack that looks something like:

  afs_Daemon -> afs_ShakeLooseVCaches -> osi_TryEvictVCache
      -> afs_FlushVCache -> afs_QueueVCB -> afs_AllocCBR
      -> osi_linux_alloc -> ... -> __vmalloc_node -> ...
      -> try_to_free_pages

This is probably because we end up deadlocking in the writeback
invoked by try_to_free_pages, likely due to locks which are held
by ShakeLooseVCaches.

As a quick fix for the problem, make sure that the memory we
allocate always fits within a page, so we always use kmalloc for
it.

FIXES 129751

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

Change-Id: I28a480788271eac1b69fb9704bed5c286be2c4c5
Reviewed-on: http://gerrit.openafs.org/4555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove trailing whitespace
Jeffrey Altman [Mon, 25 Apr 2011 11:58:49 +0000 (07:58 -0400)]
Windows: remove trailing whitespace

remove trailing whitespace from

  NTMakefile
  *.h
  *.c
  *.cpp
  *.idl
  *.def
  *.txt
  *.htm

Change-Id: Ia1e44d8e15c1e4e076cc6d9bda42ffeaef943f76
Reviewed-on: http://gerrit.openafs.org/4548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ebf5329e8ca1b3c0b581f436b28f6affe2c7c454)
Reviewed-on: http://gerrit.openafs.org/4549

14 years agoDarwin CM: afs_IsDynrootFid takes a fid ...
Simon Wilkinson [Thu, 21 Apr 2011 17:18:54 +0000 (18:18 +0100)]
Darwin CM: afs_IsDynrootFid takes a fid ...

... not a vcache.

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

Change-Id: If77fd99c5b96b243e1a5aee10f93c75fcca3cc94
Reviewed-on: http://gerrit.openafs.org/4552
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoWindows: Remove duplicate file
Simon Wilkinson [Mon, 25 Apr 2011 12:56:38 +0000 (13:56 +0100)]
Windows: Remove duplicate file

The 'Streamfiles.txt' file had been committed with both that name,
and an all lower case name. This makes git very sad on systems with
case insensitive filenames.

Change-Id: Ifc61e8b2366d8a191279f6ccbe394e55ffe15fef
Reviewed-on: http://gerrit.openafs.org/4550
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ce256d586468911d5501f667c53247a837378c06)
Reviewed-on: http://gerrit.openafs.org/4551

14 years agoWindows: change thyper to offset and fix error
Jeffrey Altman [Tue, 19 Apr 2011 17:17:56 +0000 (13:17 -0400)]
Windows: change thyper to offset and fix error

In cm_ReadMountPoint and cm_HandleLink the variable 'thyper'
represets the 'offset' at which cm_GetData should fetch data.
Rename 'thyper' to 'offset' and fix a coding error caused by
misinterpreting the variable purpose.

Change-Id: Icdd2493e356803b4b2bd00c7349d8d882283d29b
Reviewed-on: http://gerrit.openafs.org/4501
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>
Reviewed-on: http://gerrit.openafs.org/4523

14 years agoWindows: avoid race when writing mountPointString
Jeffrey Altman [Tue, 19 Apr 2011 04:12:49 +0000 (00:12 -0400)]
Windows: avoid race when writing mountPointString

cm_GetData() drops the cm_scache_t rw lock which permits other
threads to access the data while it is in an inconsistent state.
Avoid the race by using a stack allocated temporary buffer to
receive the data from cm_GetData().  Only copy the data into
the mountPointStringp buffer under the rwlock.

Change-Id: Id5ab3c5ed7c76551d53fedea96eeded59c2c699d
Reviewed-on: http://gerrit.openafs.org/4498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoaklog: Return token when performing 524 conversion
Andrew Deason [Thu, 21 Apr 2011 19:24:45 +0000 (14:24 -0500)]
aklog: Return token when performing 524 conversion

We weren't actually returning a token and username from
rxkad_get_converted_token. Do so.

This is a 1.6-specific change. This issue was fixed on master when
aklog was changed to use the new SetTokenEx family of pioctls in
commit 53837416cbed3ba4d11f63015e1f13800519f2ed.

Change-Id: I7395034c5225ca62b562ea39bd01762c74090b03
Reviewed-on: http://gerrit.openafs.org/4518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoasetkey: permit des-cbc-md5 and des-cbc-md4 keys
Jeffrey Altman [Tue, 12 Apr 2011 15:48:27 +0000 (11:48 -0400)]
asetkey: permit des-cbc-md5 and des-cbc-md4 keys

A DES key is a DES key.  Permit importing CRC, MD5 and MD4
when using non-MIT keytab support.

Add a special error message that specifies what principal
name, kvno, and enctype were being searched for when the
error is KRB5_KT_NOTFOUND.

Change-Id: Ie04e86fc5516064a67d7804cc47f2e27a30ea7ea
Reviewed-on: http://gerrit.openafs.org/4459
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolibafs: Do not specify an Rx busy channel error
Andrew Deason [Tue, 12 Apr 2011 21:30:55 +0000 (16:30 -0500)]
libafs: Do not specify an Rx busy channel error

Do not specify an error for Rx busy channels in libafs, so we do not
get notified of busy channel notifications. The current code just
specifies RX_CALL_TIMEOUT for the busy channel error, which has
problems (in particular, for RXAFS calls that are not wrapped in an
afs_Analyze loop). So, disable this behavior.

This is a 1.6-specific change. The master branch will instead get
fixes for this functionality, and it will get turned on in 1.6 again
as appropriate.

Change-Id: I0ed292a61ba4c8d0e59017b3dfaadc88d17591e6
Reviewed-on: http://gerrit.openafs.org/4460
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Complete implementation of afs_osi_TimedSleep
Antoine Verheijen [Mon, 28 Mar 2011 16:05:40 +0000 (10:05 -0600)]
OpenBSD: Complete implementation of afs_osi_TimedSleep

The OpenBSD version of afs_osi_TimedSleep() is missing the required
afs_event structure and afs_getevent routine. This update adds them
(by borrowing a copy of the code from the FreeBSD implementation).

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

Change-Id: I1886cbb995a6c3e6ef3d4cc73895215d6293fe15
Reviewed-on: http://gerrit.openafs.org/4388
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoImported upstream tag openafs-stable-1_6_0pre4 via tarball upstream/1.6.0.pre4
Russ Allbery [Thu, 31 Mar 2011 21:17:58 +0000 (14:17 -0700)]
Imported upstream tag openafs-stable-1_6_0pre4 via tarball

14 years agoLinux: 2.6.39: replace path_lookup with kern_path
Marc Dionne [Sun, 27 Mar 2011 14:59:55 +0000 (10:59 -0400)]
Linux: 2.6.39: replace path_lookup with kern_path

path_lookup is no longer available, use kern_path instead.

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

Change-Id: I1c2aba273d1d597346ecb92f75caed6b6d624454
Reviewed-on: http://gerrit.openafs.org/4371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.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.

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

Change-Id: I8e7e244b2e45a7a3af0505531757b8a54a0b3d29
Reviewed-on: http://gerrit.openafs.org/4370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.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)

Reviewed-on: http://gerrit.openafs.org/4347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 620ec4382fbf79908c62e4ce1e451b8743e457ac)

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

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

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

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>
(cherry picked from commit 55781a831954cb1e7253a12e0f9b581b586c3603)

Change-Id: I184a7e0b0ac05361c491821bc6a3756db3e24221
Reviewed-on: http://gerrit.openafs.org/4352
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 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 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 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 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 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 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>