]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoubik: Replay the transaction log label correctly
Andrew Deason [Wed, 24 Nov 2010 14:36:05 +0000 (09:36 -0500)]
ubik: Replay the transaction log label correctly

Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction
replay log code to correctly identify valid transaction logs on
little-endian systems, but missed ntohl'ing the database label read in
a LOGEND opcode. Fix that, so the database is labelled correctly when
replayed from a transaction log.

And while we're here, actually pass a struct ubik_version* to
adbase->setlabel, to make it a little more clear what's happening.

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

Change-Id: I832eff8641c339a103170f50238bbb669412bda0
Reviewed-on: http://gerrit.openafs.org/5752
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoubik: Record the last write tid in writeTidCounter
Andrew Deason [Wed, 1 Sep 2010 20:10:56 +0000 (15:10 -0500)]
ubik: Record the last write tid in writeTidCounter

ubik is currently tracking writeTidCounter for write transactions
separately from regular transactions (assigned from tidCounter).
Specifically, tidCounter is incremented twice for each transaction,
but writeTidCounter is incremented twice only for write transactions.
As a result, writeTidCounter and tidCounter tend to drift far apart.

This is a problem, since the tid for DISK_* calls uses the transaction
id of the current transaction (based on tidCounter), and VOTE_Beacon
uses writeTidCounter for its transaction id. So, in effect, the tid in
VOTE_Beacon is completely bogus and unrelated to the transaction id of
the actual current write transaction. This can cause valid write
transactions to become invalidated when tidCounter becomes negative,
since VOTE_Beacon will send a positive tid, and if there is a current
in-flight write transaction with a negative tid, SVOTE_Beacon will
deem the transactions inequal and will abort the write transaction.

So instead, record the transaction id counter for the last write
transaction in writeTidCounter. This way, when we call VOTE_Beacon, we
will use the correct transaction id counter for the current write
transaction, and SVOTE_Beacon on the remote site will not invalidate
the transaction.

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

Change-Id: Iabff9bd68db088c30c7e44ad71b7d34bcfaaf207
Reviewed-on: http://gerrit.openafs.org/5751
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: raise vhashsize limit
Andrew Deason [Wed, 8 Sep 2010 19:32:35 +0000 (14:32 -0500)]
DAFS: raise vhashsize limit

Raise the maximum specifiable vhashsize to 28 (from 14). Specifying a
vhashsize over 14 can be reasonable if you expect to have a few
million volumes on a fileserver.

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

Change-Id: I2e2d7ca4986af417c3298c3cfff8f087d795bc53
Reviewed-on: http://gerrit.openafs.org/5750
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Do not ignore out-of-range -vhashsize
Andrew Deason [Thu, 2 Sep 2010 17:56:28 +0000 (12:56 -0500)]
DAFS: Do not ignore out-of-range -vhashsize

If the specified -vhashsize is out of the 6-14 range, do not just
ignore it. Instead, note the error and quit.

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

Change-Id: Ie0ebfcf1b5c88816ef58eab109fb05de4c7fad1e
Reviewed-on: http://gerrit.openafs.org/5749
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoTidy up uio_t meaning
Simon Wilkinson [Sun, 17 Apr 2011 20:30:39 +0000 (21:30 +0100)]
Tidy up uio_t meaning

On IRIX, uio_t is typedef'd to "struct uio".
On Darwin, uio_t is typedef'd to "struct uio *".

Reduce the confusion by just not using "uio_t" in places where it
isn't being defined for us, and avoiding it completely in cross-platform
code.

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

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

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

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

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

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

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

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

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

Change-Id: I3ef7aeb5e111f9365a10d86a440ad31c4fe76902
Reviewed-on: http://gerrit.openafs.org/5776
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoFBSD: deal with kernel API rename
Ben Kaduk [Sat, 8 Oct 2011 21:16:26 +0000 (17:16 -0400)]
FBSD: deal with kernel API rename

Upstream decided to rename the kernel functions that implement
syscalls to have a sys_prefix (including afs3_syscall!).
We use a couple of them, so we need to conditionalize accordingly.
Unfortunately, __FreeBSD_version was not bumped with the change,
so we use something close to it and hope it's close enough.

Reviewed-on: http://gerrit.openafs.org/5572
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4a1d319177ea0e58c9046c3c173bb7d2877d1bc3)

Change-Id: I01d943398a3c15009f72f668720bfe6bc8eac63d
Reviewed-on: http://gerrit.openafs.org/5639
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: get an ip address even when dns and hosts suck
Derrick Brashear [Tue, 11 Oct 2011 19:37:57 +0000 (15:37 -0400)]
ukernel: get an ip address even when dns and hosts suck

gethostname plus gethostbyname being useless make things fun

make things less fun

(cherry picked from commit 6f59c71988d75f76750c46adb11cda7e9189d5f3)

Change-Id: Id7d9181b2d87f7a87a08991b96da664f4297604b
Reviewed-on: http://gerrit.openafs.org/5726
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoallow cloning of any volume to any volume with same parent ID
Jacob Thebault-Spieker [Tue, 19 Jul 2011 22:01:26 +0000 (15:01 -0700)]
allow cloning of any volume to any volume with same parent ID

remove checks to disallow cloning of ro volumes to rw volumes,
which allows cloning of any volume within the same parent ID
grouping, including allowing destruction of newer version of the
volumes.

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

Change-Id: Idc2575538811d278fb65be46cfc0cd4d24d90f5d
Reviewed-on: http://gerrit.openafs.org/5725
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoremove check for disallowing clones of backup or ro volumes
Jacob Thebault-Spieker [Tue, 19 Jul 2011 16:02:49 +0000 (09:02 -0700)]
remove check for disallowing clones of backup or ro volumes

removes the if-statement ensuring that the volume being cloned is
not a backup volume, nor a read-only volume. This allows clones
from any type of volume to a given volume. Parent volume meta-data
is maintained, only the cloneId value changes.

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

Change-Id: Ibda6a8a12804fc35890c99ada6d711e25a50a6c8
Reviewed-on: http://gerrit.openafs.org/5724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: test program update
Michael Meffie [Thu, 6 Oct 2011 11:55:21 +0000 (07:55 -0400)]
bozo: test program update

Add -file option to test program to simulate program crashes.

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

Change-Id: I0cf394c881da7c01f75a7926700f896a905e8172
Reviewed-on: http://gerrit.openafs.org/5723
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER
Andrew Deason [Mon, 29 Aug 2011 22:41:31 +0000 (17:41 -0500)]
DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER

Currently VRequestSalvage_r takes a flag,
VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the
specified volume to be freed (via FreeVolumeHeader). This is almost
never safe to do, since there may be other users of the specified
volume that can be accessing the volume header at the same time.

There is also no reason to invalidate the header at the time of the
VRequestSalvage_r call, since the header must be invalidated when we
detach the volume (other utilities may change header information). So,
if there are any problems in the future because we do not invalidate
the header at the time of VRequestSalvage_r, it is the fault of the
detachment/offlining logic.

So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take
this opportunity to correctly document the VRequestSalvage_r headers
in the VRequestSalvage_r comment, as it was previously missing the
VOL_SALVAGE_NO_OFFLINE flag.

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

Change-Id: Ib991ecefea2115a3c4308ed3c261af7433c9b858
Reviewed-on: http://gerrit.openafs.org/5722
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: fssync online requires a partition name argument
Michael Meffie [Thu, 13 Oct 2011 16:23:35 +0000 (12:23 -0400)]
DAFS: fssync online requires a partition name argument

fssync-debug online silently fails when run without a partition name.
Check for the required partition name on the server side and the client
side.  Report errors back to the client when the server side fails to
pre-attach the volume.

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

Change-Id: Id8776c71cd1712ecb779c76565cfb9e685e54a19
Reviewed-on: http://gerrit.openafs.org/5721
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovolser: Remove ExtractVolId
Andrew Deason [Tue, 11 Oct 2011 15:51:14 +0000 (10:51 -0500)]
volser: Remove ExtractVolId

volser was using its own function to extract a volume ID from a
filename string, and was using atol to do so. The ato* family of
functions can have problems with larger volume IDs, not to mention a
lack of error checking, so don't use it. Since we already have the
function VolumeNumber in the vol package to do the very same thing,
just use that instead.

Reviewed-on: http://gerrit.openafs.org/5594
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 87f969f82d12c8200ede3fd30a151e09ab0bf6ad)

Change-Id: I4f047c4141493e151db0a6b5ec21bee3af35e040
Reviewed-on: http://gerrit.openafs.org/5720
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Check for HOSTDELETED in stillborn check
Andrew Deason [Mon, 3 Oct 2011 18:10:44 +0000 (13:10 -0500)]
viced: Check for HOSTDELETED in stillborn check

h_FindClient_r checks the connection rock for a client object twice.
First it sees if we already have a client object, and if we don't, we
effectively create one (or find a suitable one). Then we check again,
to see if someone else set the rock while we were creating a client
structure.

Currently, the first check checks if client->host->hostFlags has
HOSTDELETED set, but the second check does not. So, if the host
associated with the client has been deleted by someone else, currently
we will unnecessarily log a "stillborn client" message, and we will
continue to use the deleted host. If the host continues to be held by
someone, we will run into the same situation repeatedly on future
requests until all of the host references go away.

To fix this, also ignore HOSTDELETED clients when performing the
stillborn race check.

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

Change-Id: I3fb0b01c2ef14cd077cd4db9476ed6e90c7d3c2a
Reviewed-on: http://gerrit.openafs.org/5719
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovos offline: Bring volume back online for -busy
Andrew Deason [Fri, 14 Oct 2011 16:32:34 +0000 (11:32 -0500)]
vos offline: Bring volume back online for -busy

vos offline is supposed to bring a volume back online from "busy"
status before exiting, as volumes should not be in "busy" status for
extended periods of time. This was being enforced by required that
-sleep be specified; however, -sleep only results in the volume being
brought back online if a non-zero sleep time was specified. So, make
sure the volume is brought back online if -busy was specified.

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

Change-Id: I64aa6f297b787ca666959ff4f35d17aced6e41a7
Reviewed-on: http://gerrit.openafs.org/5718
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache: allow arbitrary sized iovecs
Derrick Brashear [Sun, 23 Oct 2011 23:15:16 +0000 (19:15 -0400)]
bypasscache: allow arbitrary sized iovecs

instead of binding outselves to PAGE_SIZE, just fill any size

Reviewed-on: http://gerrit.openafs.org/5658
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4b817cbb520872e69b01e5675f9037d8948d0ade)

Change-Id: I350f4e7e0936be50960c80d115a44afe750a48fa
Reviewed-on: http://gerrit.openafs.org/5717
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache: do errors correctly
Derrick Brashear [Thu, 6 Oct 2011 08:04:36 +0000 (04:04 -0400)]
bypasscache: do errors correctly

do set errors when we bomb out early
do not unlock and return early when we happen to do a correct zero
length read
do set errors the kernel can deal with if we're feeding a page routine

Reviewed-on: http://gerrit.openafs.org/5554
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 28a159b2bfff7ad450dce612601a0286d4f91df5)

Change-Id: I4f2e1b50a3c0856a08281e0ffbfaa7cbb71db2c4
Reviewed-on: http://gerrit.openafs.org/5716
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorpm: Turn on debugging
Simon Wilkinson [Sun, 23 Oct 2011 23:07:33 +0000 (19:07 -0400)]
rpm: Turn on debugging

Now that we build with a blank CFLAGS line, we need to make sure and
actually turn on debugging in the build system, so that our debuginfo
files are vaguely useful

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

Change-Id: I9384b9632efb5e7a9054b49c6b6f2f4cfc9c9376
Reviewed-on: http://gerrit.openafs.org/5715
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: ackall handling
Simon Wilkinson [Wed, 12 Oct 2011 13:50:18 +0000 (09:50 -0400)]
rx: ackall handling

If we ACKALL a stream, then we're sending a hard ACK for all of the
packets in the stream. We shouldn't send that hard ACK, and then a
load of soft ACKs for packets that don't actually exist.

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

Change-Id: Ibba1d5448f2ba9315b6b9bc3e893d16d8bcdbc3c
Reviewed-on: http://gerrit.openafs.org/5714
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoLINUX: Fix afs_linux_pag_to_groups signature
Andrew Deason [Fri, 21 Oct 2011 20:05:06 +0000 (15:05 -0500)]
LINUX: Fix afs_linux_pag_to_groups signature

"new" is a struct group_info**, not a struct group_info*

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

Change-Id: I6a3f31284f74af8cdeeeecd920bec26f955dc0da
Reviewed-on: http://gerrit.openafs.org/5713
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoLINUX: Revert group changes on keyring failure
Andrew Deason [Fri, 12 Aug 2011 19:50:26 +0000 (14:50 -0500)]
LINUX: Revert group changes on keyring failure

On Linux kernels that support keyrings, when we setpag we try to add
the PAG to the session keyring and to the supplemental group list.
Currently, if we fail to add the PAG to the keyring (which may happen
due to key quotas, or possibly other reasons), we return failure but
the group list is still modified with the new PAG in it.

Therefore, if the keyring-based approach fails, the new PAG may still
be in use, but there are no keyring keys associated with that PAG, so
the PAG may never get destroyed. This can cause a large number of PAGs
to accumulate over time, causing performance problems.

So, change this so that, in the event that keyring installation fails,
we revert the group list back to what it was before we touched it.
Also mark all unixusers with the new PAG as expired, in case one got
created during processing. Thus, the new PAG never gets used.

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

Change-Id: Ie954ce2b1bc502cc1abe2fa1eecc18b31d066038
Reviewed-on: http://gerrit.openafs.org/5712
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Do not swallow errors on StoreData recovery
Andrew Deason [Thu, 20 Oct 2011 21:57:14 +0000 (16:57 -0500)]
viced: Do not swallow errors on StoreData recovery

When we encounter any error in the StoreData fetch/store loop, we
reset the disk usage to ensure it remains correct, even in the face of
unexpected errors. However, when we do so, we use the errorCode from
VAdjustDiskUsage as our return value; if it is 0, we return success,
ignoring the error that got us in this code path in the first place.

Instead, keep track of a temporary errorCode for the disk usage
adjustment, and do not override our return value if there was no error
in the disk usage numbers.

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

Change-Id: I154e6cbc96ee4e32bee2da77441547c1dce8b42c
Reviewed-on: http://gerrit.openafs.org/5711
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolinux: makesrpm should cope with releases with letters
Simon Wilkinson [Wed, 12 Oct 2011 13:44:37 +0000 (09:44 -0400)]
linux: makesrpm should cope with releases with letters

don't just deal with numbered releases.

Reviewed-on: http://gerrit.openafs.org/5602
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 69f54d474827548375c0bd39a87ac7ec376b6d9b)

Change-Id: I3e433fe4b7f1b2dbedcfc70215ba114de16900c4
Reviewed-on: http://gerrit.openafs.org/5710
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: don't try GetDownD if nothing to get
Derrick Brashear [Wed, 12 Oct 2011 18:34:55 +0000 (14:34 -0400)]
afs: don't try GetDownD if nothing to get

if we "need" negative slots or caches, don't run. also,
don't stay "too full"

Reviewed-on: http://gerrit.openafs.org/5612
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 488c7c97854a4bd0ec67bcfe17df93b3fd025f88)

Change-Id: I1bdd37ce5659ce770f0fbb23bcb9174858b5eeed
Reviewed-on: http://gerrit.openafs.org/5709
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: don't define rdwr env on linux
Simon Wilkinson [Wed, 12 Oct 2011 19:26:23 +0000 (15:26 -0400)]
ukernel: don't define rdwr env on linux

We're not vm rdwr env in ukernel. Don't claim we are, otherwise we
will never push chunks out to the fileserver when our cache is full

Reviewed-on: http://gerrit.openafs.org/5613
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 796de9fb43857acccbd51e2af7c8d67eea90fdc5)

Change-Id: I0256c7bdd8a19a191a5d9981525ee288e614fef0
Reviewed-on: http://gerrit.openafs.org/5708
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: set pthread stacksize to an integer multiple of 8k
Derrick Brashear [Wed, 12 Oct 2011 17:09:42 +0000 (13:09 -0400)]
ukernel: set pthread stacksize to an integer multiple of 8k

because some pthread stacks require this to be in units of page size,
guess that page sizes will be 4k or 8k, and use the larger as a divisor

Reviewed-on: http://gerrit.openafs.org/5606
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 7ae1921b76750ef28258777cf1b233c4917663d7)

Change-Id: I273ee935db4cf6c17ca50eedab8cfd577d21a599
Reviewed-on: http://gerrit.openafs.org/5707
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: add morepackets check in listener
Simon Wilkinson [Wed, 12 Oct 2011 17:04:28 +0000 (13:04 -0400)]
ukernel: add morepackets check in listener

Make the listener loop actually check for more packets needed,
like kernel, pthreads and lwp. Only checking for new packets every
20 seconds isn't sufficient on today's networks!

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

Change-Id: I84156d5f1c228e4b3987c17a72ef7c71f0339d4a
Reviewed-on: http://gerrit.openafs.org/5706
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: on uuid init fail, don't leave garbage behind
Derrick Brashear [Tue, 11 Oct 2011 19:21:12 +0000 (15:21 -0400)]
afs: on uuid init fail, don't leave garbage behind

make sure we zero the uuid if we failed

Reviewed-on: http://gerrit.openafs.org/5599
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb)

Change-Id: I20313628c4ac26fc67a2adc909e39bf53742314b
Reviewed-on: http://gerrit.openafs.org/5705
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: set close-on-exec on our socket
Derrick Brashear [Tue, 11 Oct 2011 18:32:04 +0000 (14:32 -0400)]
ukernel: set close-on-exec on our socket

if the process we are in execs a child, it doesn't get our socket

Reviewed-on: http://gerrit.openafs.org/5598
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 87dcfc872c11fdb13ebf0448abe91150aaa86859)

Change-Id: I7e94e5192783c57aa77afc1b583cccda77ec7653
Reviewed-on: http://gerrit.openafs.org/5704
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agodocs: Refer to dafs binaries by their real names
Simon Wilkinson [Mon, 10 Oct 2011 22:19:13 +0000 (17:19 -0500)]
docs: Refer to dafs binaries by their real names

(Most of) the dafs binaries are called da(something). Update the
example in the dafileserver documentation so that we call the binaries
by the names that they are actually installed with on the system.

Reviewed-on: http://gerrit.openafs.org/5654
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit c37a14697df291f641b4fa5a32826054d92210b0)

Change-Id: I001a0e2c94a7c52d91b2ebf257d097ce7400eb3a
Reviewed-on: http://gerrit.openafs.org/5703
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoptserver: Don't check for noauth before rebuilding
Simon Wilkinson [Mon, 10 Oct 2011 21:09:40 +0000 (22:09 +0100)]
ptserver: Don't check for noauth before rebuilding

The ptserver database building scripts would check to see if the server
was running from a bosserver with the noauth flag set before performing
a database rebuild.

This means that you can't start ptserver normally, and then configure
the database using pts -localauth, which is the preferred method for
configuring new cells.

Remove the check for noauth. This is slightly risky, as it means that a
corrupt database could be completely erased upon restart. However, we
already check that the dbheader (65k) is entirely blank - which will
protect us against any single page corruption errors.

Reviewed-on: http://gerrit.openafs.org/5653
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 7a4498850814ea524f55de0b84d6b0ae0b4834bb)

Change-Id: I95acbc980537d08a5a06541a75ec5af1ca5bbdd1
Reviewed-on: http://gerrit.openafs.org/5702
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: don't enforce thread lockers in remove vop
Derrick Brashear [Tue, 11 Oct 2011 18:03:29 +0000 (14:03 -0400)]
ukernel: don't enforce thread lockers in remove vop

we enforce locking by pid. when we are ukernel, MyPidXX is stupid.

don't bother.

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

Change-Id: I84ec39a8fd6367a0a832eb5c9d8a9727454b8948
Reviewed-on: http://gerrit.openafs.org/5701
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: install our sysincludes to root.perf
Derrick Brashear [Mon, 10 Oct 2011 21:56:20 +0000 (17:56 -0400)]
ukernel: install our sysincludes to root.perf

otherwise, we can't actually include sysincludes from something
linking libuafs

Reviewed-on: http://gerrit.openafs.org/5593
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 75179d50eae3258e8baa0a4c9f069fcd11d08260)

Change-Id: I9d0712766539af2f9a4ec2b291960a373e13b7e7
Reviewed-on: http://gerrit.openafs.org/5700
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: add uafs_access
Derrick Brashear [Mon, 10 Oct 2011 20:35:45 +0000 (16:35 -0400)]
ukernel: add uafs_access

we don't have an access vop. add one.

Reviewed-on: http://gerrit.openafs.org/5589
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 3eb60908a1f9b3f2783ec3f7755b242bff3d573d)

Change-Id: If45a7286b31e20e4e37119e5555f49ef69c8bb97
Reviewed-on: http://gerrit.openafs.org/5699
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache for ukernel
Derrick Brashear [Wed, 21 Sep 2011 19:02:40 +0000 (15:02 -0400)]
bypasscache for ukernel

simple (read) bypasscache for ukernel.
does not bother trying any buffercache stuff.

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

Change-Id: Ia66dcdfad42fe95b3456430eeb8b12c161c185a5
Reviewed-on: http://gerrit.openafs.org/5561
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovol_split: avoid using stale open directory vnodes
Hartmut Reuter [Wed, 5 Oct 2011 14:06:05 +0000 (10:06 -0400)]
vol_split: avoid using stale open directory vnodes

we could in case of multiple splits end up using a stale open
vnode for a directory; attempt to close and thus force-reopen
any fdhandles backing ihandles.

Reviewed-on: http://gerrit.openafs.org/5553
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c)

Change-Id: I4894b21ac3ee114f57192261220c002a2e213ae9
Reviewed-on: http://gerrit.openafs.org/5698
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: bosserver man page updates
Michael Meffie [Thu, 6 Oct 2011 10:03:07 +0000 (06:03 -0400)]
bozo: bosserver man page updates

Add the new -pidfiles option to the man page. Add a few other missing
options as well.

Reviewed-on: http://gerrit.openafs.org/5587
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 26253df896a7709847cda041db1dc187f1dbf83e)

Change-Id: Iac3a96bfc825143a7b8c7b4e359f35d72bbb2d4c
Reviewed-on: http://gerrit.openafs.org/5611
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache: don't define uio_t for ukernel
Derrick Brashear [Mon, 10 Oct 2011 20:44:05 +0000 (16:44 -0400)]
bypasscache: don't define uio_t for ukernel

we shouldn't need this

Change-Id: I2141622a70dd9f78676633dce2e0ea11cba6a508
Reviewed-on: http://gerrit.openafs.org/5590
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoRedHat: Add xstat_*_test commands to RPMs
Andrew Deason [Fri, 7 Oct 2011 08:04:03 +0000 (04:04 -0400)]
RedHat: Add xstat_*_test commands to RPMs

Install the xstat_*_test commands in the 'openafs' RPM.

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

Change-Id: I85e94b7616a64e03482b8dc8cb55c589541a6581
Reviewed-on: http://gerrit.openafs.org/5560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodoc: fileserver synopsis typo
Michael Meffie [Fri, 7 Oct 2011 09:50:37 +0000 (05:50 -0400)]
doc: fileserver synopsis typo

Fix a fileserver synopsis typo noticed during Derrick's EACK2011
debugging session.

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

Change-Id: I8765cb2e5b3e0c64611a02dd59b4a8f9a2dac5eb
Reviewed-on: http://gerrit.openafs.org/5559
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agovol: Only check "logging" on vice partitions
Andrew Deason [Wed, 28 Sep 2011 20:02:48 +0000 (15:02 -0500)]
vol: Only check "logging" on vice partitions

We don't care about non-vicepX partitions, so move part of the UFS
"logging" check into VCheckPartition. This API should probably redone
so the "am I a vicepX partition" check is done completely separately,
but for now, this will do.

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

Change-Id: I5cbd7d6eb2db5bbbb8f47e5fed262466ae2ddd1e
Reviewed-on: http://gerrit.openafs.org/5548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoFSSYNC-Client: Consistent use of partition name
Rod Widdowson [Thu, 29 Sep 2011 14:34:48 +0000 (15:34 +0100)]
FSSYNC-Client:  Consistent use of partition name

Over time the FSSYNC code has collected examples where the partition
path is passed rather than the partition name.  In Unix this is the
same (/vicepX), but on windows the path is the DOS device (C:).

This checkin changes FSSYNC client code to always use the partition
name.

This checkin does not address FSSYNC server or SALVSYNC.

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

Change-Id: I84d3dd586c735e9a6e2f598317873ba554a10ece
Reviewed-on: http://gerrit.openafs.org/5547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Do not serialize state for invalid hosts
Andrew Deason [Thu, 29 Sep 2011 19:49:53 +0000 (14:49 -0500)]
DAFS: Do not serialize state for invalid hosts

When we serialize host information for DAFS during shutdown, we have
no guarantee that the host is in a valid state when we look at it.
This can result in a host being saved to disk when we are waiting for
the host to respond to an RPC, and so the information about the host
is invalid. For example, we can save a host that has the
HWHO_INPROGRESS flag set, and when it is restored later, this can
cause odd behavior since the flag is set but no thread is actually
waiting for the host to respond.

So instead, during state serialization, try to determine if a host may
be in an invalid state, and simply skip the host if it may.

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

Change-Id: I9bf8cfec80ff9e626777375e94743ac621b52cb3
Reviewed-on: http://gerrit.openafs.org/5546
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Skip hosts with invalid flags on restore
Andrew Deason [Thu, 29 Sep 2011 21:04:54 +0000 (16:04 -0500)]
DAFS: Skip hosts with invalid flags on restore

Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have
valid state, since those flags indicate that the fileserver was in the
middle of identifying the host when the host struct was serialized.
Skip entries from the on-disk host data that have such invalid flags
set when restoring state, so we do not load invalid data.

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

Change-Id: Ifa69ec30bda8f9ba162954d39f9b60d9fc630289
Reviewed-on: http://gerrit.openafs.org/5545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoDo not call krb5_get_error_message with NULL context
Jeffrey Altman [Fri, 7 Oct 2011 22:45:08 +0000 (18:45 -0400)]
Do not call krb5_get_error_message with NULL context

MIT's krb5_get_error_message() ignores the context and can
be called with a NULL context.  Heimdal's version does not.

Derived from http://gerrit.openafs.org/5508 aka commit
9dd9cfa0e1536e0e75628c84605b3d5b8486d69c

The 1.6 branch is sufficiently different from master.

Change-Id: Ie325705a78b155a04a6a9d44800037b72f5b045c
Reviewed-on: http://gerrit.openafs.org/5569
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: char* is not a Unicode string
Jeffrey Altman [Tue, 4 Oct 2011 21:29:26 +0000 (17:29 -0400)]
Windows: char* is not a Unicode string

Do not treat the output of NetbiosName() as a wide_t when
it is a char*.

Reviewed-on: http://gerrit.openafs.org/5549
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4e02cb72be034ddad019d2ee70e8009ee762d9ed)

Change-Id: I03523441c3520f316232956d22d0f0a7203e4f36
Reviewed-on: http://gerrit.openafs.org/5568
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoFix typo in windows release notes
Jeffrey Altman [Thu, 29 Sep 2011 13:35:51 +0000 (09:35 -0400)]
Fix typo in windows release notes

Reported by Jeff Blaine.

FIXES 132233

Reviewed-on: http://gerrit.openafs.org/5519
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 2fd66404d9deeb292e1eadb23f5e0f287f9bf8f9)

Change-Id: I8dc67108d02a21ce87bfdcbf03bb827644794366
Reviewed-on: http://gerrit.openafs.org/5567
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoFix input size computation in SetSPrefs pioctl
Jeffrey Altman [Mon, 19 Sep 2011 14:35:11 +0000 (10:35 -0400)]
Fix input size computation in SetSPrefs pioctl

Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained
a small typo that prevents the SetSPrefs pioctl processing from
functioning in all cases.  fs setserverprefs continues to work
for non-DB preference lists because fs.c pokeServers() attempts
to try the old SetSPrefs33 pioctl in the non-DB server case.

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

Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6
Reviewed-on: http://gerrit.openafs.org/5566
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: build loopback installer for current DDKs
Jeffrey Altman [Thu, 15 Sep 2011 05:29:57 +0000 (01:29 -0400)]
Windows: build loopback installer for current DDKs

Modify the build rule for the loopback installer to permit
it to build with the latest DDKs.

Reviewed-on: http://gerrit.openafs.org/5435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit b418d381be8c778ebeb93dd75bdc068dc4ed4871)

Change-Id: Ia12842875de3b333bdcb28c426056ad5856b423e
Reviewed-on: http://gerrit.openafs.org/5565
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: no SOCKLEN_T before WDK 6.0
Jeffrey Altman [Thu, 15 Sep 2011 05:26:00 +0000 (01:26 -0400)]
Windows: no SOCKLEN_T before WDK 6.0

Reviewed-on: http://gerrit.openafs.org/5433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 3f3fedecd08834439c462725e04eb04c690c07ee)

Change-Id: I6e867c9d36d7c7f5248e6af7fe6004f1c7905e63
Reviewed-on: http://gerrit.openafs.org/5564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoDAFS: Add explicit 'valid' field for index maps
Andrew Deason [Thu, 29 Sep 2011 20:22:35 +0000 (15:22 -0500)]
DAFS: Add explicit 'valid' field for index maps

The CB, FE, and host serialization structures were just using the
relevant indices to determine whether or not an entry mapping and old
index to a new index was populated with actual data. For host
structures, this really isn't sufficient, since our index can be 0,
and the structure is calloc'd, so the index in the structure could
also be 0.

Add a flag explicitly stating whether or not the structure has been
filled in, to make this unambiguous.

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

Change-Id: I0bd3e50dec4e686acc3e9cda3eef7b7909266f27
Reviewed-on: http://gerrit.openafs.org/5544
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: output dataversion in stat struct if possible
Derrick Brashear [Wed, 28 Sep 2011 14:23:19 +0000 (10:23 -0400)]
ukernel: output dataversion in stat struct if possible

we already have this data; if we can output it, do so.

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

Change-Id: I9ce28fcb20cee8f15f71cd734b9da0ad85c12c3f
Reviewed-on: http://gerrit.openafs.org/5541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: make web enhancements the default
Derrick Brashear [Wed, 28 Sep 2011 14:11:16 +0000 (10:11 -0400)]
ukernel: make web enhancements the default

none of the web enhancements break base functionality,
and they are strictly more functionality; just turn them on everywhere

Reviewed-on: http://gerrit.openafs.org/5509
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 80943970b8cfcdf3fc630b25804aebaea228bd73)

Change-Id: I3d8dedcb84bda70bc3183afcb09ca619c5390476
Reviewed-on: http://gerrit.openafs.org/5540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: report bosserver -rxbind address
Michael Meffie [Thu, 22 Sep 2011 13:13:18 +0000 (09:13 -0400)]
bozo: report bosserver -rxbind address

Create a file on bosserver startup called bosserver.rxbind in the
server local directory which contains an address local scripts may
use to contact the bosserver.

When bosserver is started with the -rxbind option, write the address
selected from the intersection of the interfaces, NetInfo, and
NetRestrict configuration to the bosserver.rxbind file, otherwise
write the loopback address 127.0.0.1.

Update the RedHat init script to use the new bosserver.rxbind file.

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

Change-Id: I44f6f28d750aa0e463093655a64df8099b8d2cd4
Reviewed-on: http://gerrit.openafs.org/5539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: fix overrun from -rxbind on restart
Michael Meffie [Mon, 26 Sep 2011 15:59:55 +0000 (11:59 -0400)]
bozo: fix overrun from -rxbind on restart

Fix buffer overrun in bosctlsrv introduced
by commit 544ff1b295a57b50afefa6146094434db7608355

Reviewed-on: http://gerrit.openafs.org/5504
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 48e326372d89b0d778420f268dbe59236758eba8)

Change-Id: Ic1226d7d093e3d0ab364aa72d676110a6c382dc2
Reviewed-on: http://gerrit.openafs.org/5538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: bosserver -pidfiles option
Michael Meffie [Wed, 24 Nov 2010 01:21:50 +0000 (20:21 -0500)]
bozo: bosserver -pidfiles option

Add an option to bosserver to create pidfiles for long running
processes for simple, fs, and dafs bnode types, as well as the
bosserver process. The pidfiles are located in the server local
directory by default, or in the path specifed by the -pidfiles
command-line option.

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

Change-Id: Id76530b81e2e92c76a015510d04dc8d5e5fd75ce
Reviewed-on: http://gerrit.openafs.org/5537
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: pass -rxbind on restart
Michael Meffie [Thu, 22 Sep 2011 15:28:17 +0000 (11:28 -0400)]
bozo: pass -rxbind on restart

Pass the -rxbind on restarts when bosserver is initially started
with the -rxbind option.

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

Change-Id: I042cce8043bb0797b5c654118c2254f93903a4fa
Reviewed-on: http://gerrit.openafs.org/5536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agofs: fix setserverprefs where long is larger than afs_int32
Marc Dionne [Thu, 22 Sep 2011 00:31:33 +0000 (20:31 -0400)]
fs: fix setserverprefs where long is larger than afs_int32

Make the fscanf and scanf format specifiers match the type of the
target variable.  This prevents trying to store a long int into an
afs_int32 variable which may be smaller, and overwriting neighbouring
data on the stack.

The effect on a 64-bit Linux system was that the high bits of "rank"
would overwrite the first 4 bytes of the scanned host name, causing
setserverprefs to fail with:
: couldn't resolve name.

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

Change-Id: I5869423a8512e6e5d64162b17a69106355ca3639
Reviewed-on: http://gerrit.openafs.org/5535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: add post RPC procedure capability
Marc Dionne [Thu, 29 Sep 2011 01:15:32 +0000 (21:15 -0400)]
rx: add post RPC procedure capability

Add the ability to specify a procedure that will be called after
the end of each RPC for a service.  This is similar to the
existing afterProc, except that it gets called after the RPC
has ended (after EndCall).

rx_SetPostProc and rx_GetPostProc are provided to set and retrieve
a postProc for a specified service.

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

Change-Id: I1f0a5007b0cf0723ef3ade6a14e72aece2d3cb0f
Reviewed-on: http://gerrit.openafs.org/5543
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: remove duplicate declaration
Marc Dionne [Wed, 28 Sep 2011 22:39:55 +0000 (18:39 -0400)]
viced: remove duplicate declaration

viced_uclient_key is declared twice, remove one of the
declarations.

Reviewed-on: http://gerrit.openafs.org/5515
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 11a6fc948983c0a9f1fb41c58b9559750763440b)

Change-Id: Ie05ca3af9d1e6c08272335b09cb3c7a80879fc66
Reviewed-on: http://gerrit.openafs.org/5542
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Remove afs1_readdir
Andrew Deason [Thu, 29 Sep 2011 17:04:07 +0000 (12:04 -0500)]
afs: Remove afs1_readdir

The function afs1_readdir is not referenced anywhere. Remove it, as it
currently causes compilation errors (a typo with the
origOffset/orginOffset variable name).

This is a 1.6-only change. afs1_readdir was removed on master as a
part of commit 0284e65f97861e888d95576f22a93cd681813c39.

Change-Id: I7bd3f73867abb53df0cd2a96180b7cd5f19de3e6
Reviewed-on: http://gerrit.openafs.org/5522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agovolser: dont double-stat vnodes when dumping
Derrick Brashear [Tue, 13 Sep 2011 19:27:37 +0000 (15:27 -0400)]
volser: dont double-stat vnodes when dumping

we get the size, then we get it again. no clue why. let's just not.

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

Change-Id: I743432161a80799e11875cdbcb09b1b15d681d77
Reviewed-on: http://gerrit.openafs.org/5413
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agosalvager: fix filesystem path truncation
Michael Meffie [Tue, 20 Sep 2011 20:21:50 +0000 (16:21 -0400)]
salvager: fix filesystem path truncation

Fix filesystem path truncation for vice partitions beyond /vicepz.

Commit 3d7388b7 moved the filesystem path to a fixed size buffer,
however the path of the filesystem to be salvaged is truncated for
partitions with two character ids (e.g. /vicepaa), in which case
the salvager will salvager the wrong partition, or abort if the
truncated path is not present.

(cherry picked from commit 1e487f6026fb559638fab256362dbda9d4b4a8b1)

Change-Id: I1f69b580e4db59f9e8dc245348ede176fc1d23c1
Reviewed-on: http://gerrit.openafs.org/5474
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafsio: fix build outside of srcdir
Jonathan A. Kollasch [Fri, 23 Sep 2011 00:06:35 +0000 (00:06 +0000)]
afsio: fix build outside of srcdir

Change-Id: I4bab36fe3e3958b3b676bab852192eb1c4cd14fc
Reviewed-on: http://gerrit.openafs.org/5492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: enable debugging support in the volume portion
Derrick Brashear [Wed, 21 Sep 2011 16:55:39 +0000 (12:55 -0400)]
afscp: enable debugging support in the volume portion

readd the missing code when we are compiled for debug

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

Change-Id: I2b9466872b82e5ff8262b44a4bc767f11dc79216
Reviewed-on: http://gerrit.openafs.org/5485
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: allow listing of bare root.cell dirs in dynroot mode
Derrick Brashear [Wed, 21 Sep 2011 06:03:30 +0000 (02:03 -0400)]
afscp: allow listing of bare root.cell dirs in dynroot mode

don't assume that /afs/cell.name (as opposed to /afs/cell.name/)
is bogus. if there's text, at least try

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

Change-Id: I249b9a92b8931f0ac6feafdb9a0576bc83064c6f
Reviewed-on: http://gerrit.openafs.org/5482
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: add confdir override
Derrick Brashear [Wed, 21 Sep 2011 03:26:25 +0000 (23:26 -0400)]
afscp: add confdir override

allow an alternate config dir

Reviewed-on: http://gerrit.openafs.org/5476
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 97004b7b0970bfc2744df49d540521a41177cac8)

Change-Id: I6e0ac4b3a457dafe27ea380bf25ca2d7c8f7361b
Reviewed-on: http://gerrit.openafs.org/5481
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoFix AFSPreference compile error on Mac OS 10.7
Terry Long [Tue, 20 Sep 2011 23:27:35 +0000 (19:27 -0400)]
Fix AFSPreference compile error on Mac OS 10.7

Lion llvm/clang complains about main returning void instead of int.
Fixed main to return int in DARWIN/AFSPreference/afshlp.m.

Change-Id: Ic251cc3d21357ad5493b53ac7b802c648a728f76
(cherry picked from commit 76e0b97eaa64088b8d8381a80b6ada0a080f0cbd)
Reviewed-on: http://gerrit.openafs.org/5472
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorxkad ticket5 function rewriting
Derrick Brashear [Fri, 10 Jun 2011 22:33:30 +0000 (18:33 -0400)]
rxkad ticket5 function rewriting

avoid conflicting with heimdal in environments where we might
need bits of their asn1 library also

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

Change-Id: I127b34f8575bf3ff156d6a724cb2fa2312cc2154
Reviewed-on: http://gerrit.openafs.org/5478
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agodarwin armv6 and armv7 support
Derrick Brashear [Wed, 21 Sep 2011 03:52:57 +0000 (23:52 -0400)]
darwin armv6 and armv7 support

simply compile lwp process assembler for both arm arches.

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

Change-Id: Iabb3490d20a441b0bb535e444b0930f5533723b1
Reviewed-on: http://gerrit.openafs.org/5477
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoFix build of user-space on nbsd50 and greater
Jonathan A. Kollasch [Thu, 21 Apr 2011 15:20:55 +0000 (10:20 -0500)]
Fix build of user-space on nbsd50 and greater

Reviewed-on: http://gerrit.openafs.org/4509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit da3ee813960d90ea83851c47fbd59eb3012c7904)

Change-Id: If5d8b7e2edd3a8b6ff3cec97800900011fb6ea90
Reviewed-on: http://gerrit.openafs.org/5423
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: mountpoints always have a trailing dot
Jeffrey Altman [Thu, 15 Sep 2011 02:41:20 +0000 (22:41 -0400)]
Windows: mountpoints always have a trailing dot

when expanding a cell alias to a full cell name the trailing
dot was forgotten when putting the mountpoint string back
together.

Reviewed-on: http://gerrit.openafs.org/5427
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 17be9b775c0be234879eeda66707581e23a18d08)

Change-Id: I2e3fbfb922614d9888e9e6957bff66bbb407abfa
Reviewed-on: http://gerrit.openafs.org/5429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: minor cm_ioctl corrections
Jeffrey Altman [Thu, 15 Sep 2011 02:39:52 +0000 (22:39 -0400)]
Windows: minor cm_ioctl corrections

remove unused variable

fix a comment to reference correct function name

remove debugging windows event log entry that doesn't
belong in production code

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

Change-Id: I0fe583c65e6352b9f33786df5a836c4df52301cf
Reviewed-on: http://gerrit.openafs.org/5428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoAdd nbsd60 param files and autoconf logic
Jonathan A. Kollasch [Thu, 21 Apr 2011 08:24:15 +0000 (08:24 +0000)]
Add nbsd60 param files and autoconf logic

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

Conflicts:

src/cf/osconf.m4

Change-Id: Ibac29f9b80624800db7c2829153fb9b2aeb44d6c
Reviewed-on: http://gerrit.openafs.org/5422
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoAllocate system type ID numbers for i386_nbsd60 and amd64_nbsd60
Jonathan A. Kollasch [Wed, 20 Apr 2011 10:00:34 +0000 (10:00 +0000)]
Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60

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

Change-Id: I3f3245c33e7c1ed2c263fce6b799860f58a0e9bb
Reviewed-on: http://gerrit.openafs.org/5421
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoMake whitespace consistent in NetBSD system type ID number section
Jonathan A. Kollasch [Wed, 20 Apr 2011 09:53:52 +0000 (09:53 +0000)]
Make whitespace consistent in NetBSD system type ID number section

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

Change-Id: I21d9b385400d1a72ba627e0b67f418056aeba070
Reviewed-on: http://gerrit.openafs.org/5420
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodarwin: minimal afsbackgrounder ticket fix
Derrick Brashear [Tue, 13 Sep 2011 20:17:18 +0000 (16:17 -0400)]
darwin: minimal afsbackgrounder ticket fix

avoid the "default" API since it's broken. this will at least prompt for
tickets.

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

Change-Id: I80a50febaa8b367c40abfed18a08dae4b1d846c4
Reviewed-on: http://gerrit.openafs.org/5409
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: avoid nat ping during shutdown
Derrick Brashear [Thu, 8 Sep 2011 14:44:38 +0000 (10:44 -0400)]
rx: avoid nat ping during shutdown

shutdown_rx, unlike rx_Finalize, kills the socket before the conns.
since we call osi_NetSend directly, we lose. just do a simple
check for rxinit_status, and exit immediately before sending if rx
is not up.

Reviewed-on: http://gerrit.openafs.org/5377
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 8d939c08f60b44c83ed8db8892b93563ddea0e15)

Change-Id: Ic22dc3b6e6c6d330eeabddead7ed8f0a0da73b57
Reviewed-on: http://gerrit.openafs.org/5407
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: add decl for roken function
Derrick Brashear [Tue, 13 Sep 2011 18:44:32 +0000 (14:44 -0400)]
afscp: add decl for roken function

strnlen needs to be declared if we provide it

Change-Id: I31183b1c98e6e30ba166ea05c49132872f66029a
Reviewed-on: http://gerrit.openafs.org/5406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoihandle: Fix IH_REALLYCLOSE for positional I/O
Andrew Deason [Wed, 24 Aug 2011 17:48:19 +0000 (12:48 -0500)]
ihandle: Fix IH_REALLYCLOSE for positional I/O

Currently, ih_fdclose (which is called by IH_REALLYCLOSE), goes
through every FD_HANDLE_OPEN FdHandle_t and closes it. If it finds
handles that are FD_HANDLE_INUSE, it skips those and sets a flag on
the parent IHandle_t. For non-positional I/O, any future opens cannot
use these _INUSE handles, since _INUSE handles cannot be reused, and
the handle will be actually closed when it is FDH_CLOSE'd.

For positional I/O, the situation is different. Multiple threads can
use the same _INUSE FdHandle_t, and so there is nothing currently
stopping a thread from IH_OPEN'ing an ihandle that has been
IH_REALLYCLOSE'd, and getting back an FdHandle_t that existed before
the IH_REALLYCLOSE was issued. This is important, since IH_REALLYCLOSE
is used on files that are deleted, and future IH_OPENs for the same
inode must not use the cached file descriptor. Getting this wrong can
cause data loss, since it can cause us to read from or write to a file
descriptor referring to a deleted file, when we instead should open a
new copy of that file.

To fix this, we create a new FdHandle_t state called
FD_HANDLE_CLOSING, which is set in IH_REALLYCLOSE if we encounter an
FD_HANDLE_INUSE FdHandle_t. In IH_OPEN, we always skip
FD_HANDLE_CLOSING handles, so we can never get back a cached file
descriptor from before an IH_REALLYCLOSE call.

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

Change-Id: I4ac2e4d10ce20f8575b35385e324b637dffd0671
Reviewed-on: http://gerrit.openafs.org/5404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoGenerate stub header files for h/*.h files included in libuafs
Russ Allbery [Tue, 23 Aug 2011 19:50:55 +0000 (12:50 -0700)]
Generate stub header files for h/*.h files included in libuafs

Previously, the libuafs build created a symlink from h to
/usr/include/sys so that files included under h/* by kernel source
files could be found in the normal system header location.  However,
this assumption about the system header location is no longer valid.
Debian and Ubuntu systems with multiarch have arch-specific include
paths so that the same host can be used to build 32-bit and 64-bit
binaries with different system headers, and those include paths are
automatically searched by the compiler.  This means some standard
headers are no longer found directly in /usr/include/sys but are
instead found in /usr/include/<arch>/sys.

Using a stripped-down version of similar code for building the kernel
module on Linux, create an h directory containing stub header files
that just include the relevant system <sys/*.h> header file instead.
This allows the compiler to implement its normal internal header
search algorithm.

Also remove all the other symlinks, such as sys, netinet, etc., that
just pointed to the same directories under /usr/include.  We can assume
the normal compiler search algorithm will find these headers without
requiring this assistance.

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

Change-Id: I4360eede894846a52c54c29486fa774bde3def5e
Reviewed-on: http://gerrit.openafs.org/5397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp: add lock support
Derrick Brashear [Fri, 15 Apr 2011 17:45:57 +0000 (13:45 -0400)]
libafscp: add lock support

add support for locking as well as for tracking callbacks so a
lock break can be detected

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

Change-Id: I2011486d6d604dbebf9f91afd7eebd50b5438e16
Reviewed-on: http://gerrit.openafs.org/5384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafsio: Remove unused 'code' value
Simon Wilkinson [Wed, 13 Jul 2011 13:03:59 +0000 (14:03 +0100)]
afsio: Remove unused 'code' value

main always return 0, so don't bother getting an exit value back from
cmd_Dispatch that we have no intention of doing anything with.

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

Change-Id: I6b01cf20bb2e08b73985ce069e24c196060cd711
Reviewed-on: http://gerrit.openafs.org/5390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafsio: remove unnecessary reference to malloc.h
Chaz Chandler [Tue, 26 Apr 2011 20:49:39 +0000 (16:49 -0400)]
afsio: remove unnecessary reference to malloc.h

Fixes breakage on freebsd for missing malloc.h, reported by GAWollman,
and, since roken.h already includes stdlib.h to pull in malloc, is no
longer necessary

Reviewed-on: http://gerrit.openafs.org/4578
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 675bd1007de6594321c03d6f92261f909120643f)

Change-Id: I9706a4d05044740fc6bb700fc5f1ef92923ce4bf
Reviewed-on: http://gerrit.openafs.org/5389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoBuild libafscp when we lack kerberos
Andrew Deason [Tue, 26 Apr 2011 19:44:46 +0000 (14:44 -0500)]
Build libafscp when we lack kerberos

Currently, venus fails to build without kerberos, since the
dependencies for afsio always include afscp.h, which does not exist
when we do not build libafscp. To fix this the easy way, and since
libafscp is still very useful without kerberos, allow libafscp to
build without kerberos support (which limits it to anonymous
connections only).

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

Change-Id: I32ad1e26ab4f45647a69c0641e3027006e28bc2e
Reviewed-on: http://gerrit.openafs.org/5385
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafsio: rewrite using libafscp
Chaz Chandler [Tue, 20 Jul 2010 14:25:20 +0000 (10:25 -0400)]
afsio: rewrite using libafscp

afsio is a utility for file transfer to and from AFS file space
without the help of the AFS client/cache manager.  Using libafscp,
this (partially rewritten) version of afsio is able to accomplish
(1) authenticated access to an AFS path or FID (an existing
KerberosV ticket is required), (2) fall back on unauthenticated
("anonymous") access if authentication (token acquisition) fails,
and (3) work independtly of the AFS cache manager (afsd need not
be running, though CellServDB and ThisCell are currently required).

issues:
1) libvldbint and libafsint are not compiled pthreaded. we link in
what we need. this should be changed when we are all-pthreaded.
2) venus is not a pthreaded-directory otherwise. same deal:
in an all-pthreaded universe, undo the bodge that we do here.
3) venus is not an all-krb5 directory either. slight ick.

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

Change-Id: Ibe140c58970f1b4f2f9e7f016e55d770f8cdcc09
Reviewed-on: http://gerrit.openafs.org/5383
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp: fix install/dest in sep. Objectdir
Christof Hanke [Wed, 1 Jun 2011 09:48:46 +0000 (11:48 +0200)]
libafscp: fix install/dest in sep. Objectdir

When compiling libafscp in separate objdir,
make dest and make install fail, because of wrong
pathes. Fix it.

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

Change-Id: I6aab1c62cc5f341628d4fdfe9aeac1293e37cf10
Reviewed-on: http://gerrit.openafs.org/5388
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: tellmeaboutyourself stub wants host byte order
Derrick Brashear [Thu, 12 May 2011 14:59:53 +0000 (10:59 -0400)]
afscp: tellmeaboutyourself stub wants host byte order

we get network byte order addresses from rx_getAllAddr; swap back
to host order.

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

Change-Id: I9c80d61fc73af936cc87c87033a121cf4593a4c9
Reviewed-on: http://gerrit.openafs.org/5387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: use closesocket when closing sockets
Jeffrey Altman [Wed, 4 May 2011 18:41:03 +0000 (14:41 -0400)]
afscp: use closesocket when closing sockets

close() is not portable to platforms where a socket is
not a file descriptor.

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

Change-Id: I8131c788fdcceee330f66bb8b47f76324b1735b1
Reviewed-on: http://gerrit.openafs.org/5386
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp: fix kerberos bits
Derrick Brashear [Fri, 15 Apr 2011 17:36:04 +0000 (13:36 -0400)]
libafscp: fix kerberos bits

get the correct afs principal. this entire blob will go away
and be replaced by rxgk token getting, but deal for now.

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

Change-Id: I8fd6e99faff18f310954cbb2bac3dc36d9362a36
Reviewed-on: http://gerrit.openafs.org/5382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp fixes
Derrick Brashear [Fri, 15 Apr 2011 17:34:14 +0000 (13:34 -0400)]
libafscp fixes

fix callback package in libafscp to track addresses correctly (use
correct byte order)

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

Change-Id: I71fed5388074b3ca33c374e57a921ff3f4f2e410
Reviewed-on: http://gerrit.openafs.org/5381
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafscp: build for windows
Derrick Brashear [Mon, 4 Apr 2011 17:43:44 +0000 (13:43 -0400)]
afscp: build for windows

attempt windows support for afscp

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

Change-Id: I568ddc0d257a8ac106426f9ecd4ab44c42ce160c
Reviewed-on: http://gerrit.openafs.org/5380
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp: code cleanup
Chaz Chandler [Sat, 3 Jul 2010 19:02:30 +0000 (15:02 -0400)]
libafscp: code cleanup

This patch is intended to bring libafscp into accordance with the
current OpenAFS coding standards while also fixing a few small
issues.  Apologies in advance for the numerous whitespace changes.

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

Change-Id: Ia1fbe4489b89d6b8c13f296243784233dcc6d158
Reviewed-on: http://gerrit.openafs.org/5379
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafscp: a library for "clientless" operations
Chaskiel Grundman [Fri, 2 Jul 2010 18:08:23 +0000 (14:08 -0400)]
libafscp: a library for "clientless" operations

libafscp provides the ability to accomplish many of the functions of an AFS
client without a running afsd cache manager.  It is being introduced into
the OpenAFS source tree in order to improve the capabilities of several
utilities but may have additional benefits for testing clients and servers
and for use on platforms which do not have afsd support.

Reviewed-on: http://gerrit.openafs.org/2371
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.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 08b7ca67a781ec93ae71677dd165133d9679a9bc)

Change-Id: I007528fa01c9f20f29a5e7e5665e0865c71fe431
Reviewed-on: http://gerrit.openafs.org/5378
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agomacos: update 32 bit kernel build flags
Derrick Brashear [Thu, 11 Aug 2011 14:39:11 +0000 (10:39 -0400)]
macos: update 32 bit kernel build flags

this is what the current xcode uses. do the same.
(cherry picked from commit 85f917d0762dfb0c22cddf4b0cab3bf76efa0f62)

Change-Id: I18c0dbbd53231c24e5b88e69231174c6ae74d234
Reviewed-on: http://gerrit.openafs.org/5327
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: version 1.6.0002 (aka 1.6.0b)
Jeffrey Altman [Tue, 30 Aug 2011 03:10:16 +0000 (23:10 -0400)]
Windows: version 1.6.0002 (aka 1.6.0b)

Change-Id: I826c76f075f07d57defbcceb71366a65920ea4cd
Reviewed-on: http://gerrit.openafs.org/5321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: correct CheckOfflineVolumeState logic
Jeffrey Altman [Tue, 30 Aug 2011 13:49:11 +0000 (09:49 -0400)]
Windows: correct CheckOfflineVolumeState logic

Do not blindly set the return 'online' state to TRUE if
the state has not in fact changed.

Do not blindly clear the 'alldown' flag without checking the
actual 'down' state of the file server.

Reviewed-on: http://gerrit.openafs.org/5323
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7)

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