]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoWindows: improve handling of volume rename
Jeffrey Altman [Fri, 2 Sep 2011 22:32:40 +0000 (18:32 -0400)]
Windows: improve handling of volume rename

The windows cache manager tracks volumes by volume group.
Up to this point all volume location updates have been performed
by the volume name.  What if the volume name was altered?  In this
case the volume location information for the in use volume ids will
fail until a mount point to the new name is queried.  Before
marking the volume group as non-existent attempt to perform a
lookup using either the volume id for the readwrite or readonly
volume.

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

Change-Id: I33771780a4ace4aa5b4613bef4590d5efaf15922
Reviewed-on: http://gerrit.openafs.org/6021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: refactor volume location updates
Jeffrey Altman [Fri, 2 Sep 2011 22:28:31 +0000 (18:28 -0400)]
Windows: refactor volume location updates

Break out the VL_GetEntryByName RPC calls into support
functions so we can reduce the amount of duplicated code.

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

Change-Id: I7fc8b9ac2902c0909b39c446468307fba30b2a51
Reviewed-on: http://gerrit.openafs.org/6020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: netidmgr krb5_cc_get_principal can fail
Jeffrey Altman [Mon, 14 Nov 2011 15:23:53 +0000 (10:23 -0500)]
Windows: netidmgr krb5_cc_get_principal can fail

Do not dereference a NULL pointer if krb5_cc_get_principal fails.

On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c
but that change is after the conversion to the Kerberos Compatibility
SDK and cannot be applied to openafs-stable-1_6_x.

Change-Id: I646011dd3171fd1aa6f40f349329f8261546b809
Reviewed-on: http://gerrit.openafs.org/6019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agovolser: Remove debugging log messages
Andrew Deason [Fri, 4 Nov 2011 22:19:28 +0000 (17:19 -0500)]
volser: Remove debugging log messages

While the -log option to volserver is supposed to print additional log
information, it shouldn't spam the log with useless data. Remove some
of the log lines that are really more "debug" information, so we log
the same amount of information as in the 1.4 series.

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

Change-Id: I1af47fa1910a98a6175f1f000d0432af1e1126e8
Reviewed-on: http://gerrit.openafs.org/5831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: Don't clear the receive queue when out of packets
Simon Wilkinson [Wed, 12 Oct 2011 13:47:14 +0000 (09:47 -0400)]
rx: Don't clear the receive queue when out of packets

We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.

What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.

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

Change-Id: Ie2f14a0ed7b6d258a7f456387df44ac95fd1748c
Reviewed-on: http://gerrit.openafs.org/5820
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Only use actual connections for GetTime calls
Andrew Deason [Wed, 2 Nov 2011 15:28:35 +0000 (10:28 -0500)]
afs: Only use actual connections for GetTime calls

The for() loop that makes an RXAFS_GetTime call in afs_CheckServers
was iterating over conns and rxconns from 0 to j. However, 'j' here is
just the size of the allocated array, whereas 'nconns' is the number
of structures in the array actually initialized. So, just go up to
nconns to avoid using unitialized connections and Rx connections.

This is a 1.6-only change. On master, the -settime code has been
completely removed in change
Id291f5f88b1ad84594706f2a1a02a933dddd0cb9.

Issue reported by Sebastian Hanigk.

Change-Id: Iec782a4464899b5a7e49e193b04f79e31c6b37f2
Reviewed-on: http://gerrit.openafs.org/5788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agomake bozo honor -rxbind correctly
Adam Megacz [Fri, 23 Mar 2007 19:14:41 +0000 (12:14 -0700)]
make bozo honor -rxbind correctly

Bozo needs to call rxInitHost() rather than rxInit() when -rxbind is
present. This patch causes it to read NetInfo/NetRestrict earlier in
the startup process so it can make that decision.

FIXES 57286

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

Change-Id: If873686f7a7742f82fd5fadf43c6f44379448c29
Reviewed-on: http://gerrit.openafs.org/5771
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoSuppress cmp component version error messages
Andrew Deason [Wed, 13 Apr 2011 17:39:19 +0000 (12:39 -0500)]
Suppress cmp component version error messages

When we use cmp to determine whether to replace
AFS_component_version_number.c, suppress stderr in addition to stdout,
to slightly reduce output during the build.

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

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

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

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

Change-Id: I105f0dc7b480f7328205ae02929f6ca187aa962a
Reviewed-on: http://gerrit.openafs.org/5769
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Check vnode length on read and write
Andrew Deason [Thu, 3 Mar 2011 22:02:47 +0000 (16:02 -0600)]
viced: Check vnode length on read and write

When reading or writing a file vnode, check that the length of the
vnode in the vnode index matches the size of the on-disk file
containing the data for the file. If it does not match, take the
volume offline (and for DAFS, demand-salvage it).

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

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

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

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

Change-Id: I355c53c6f224c5471da70827f30511986abeac27
Reviewed-on: http://gerrit.openafs.org/5767
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Retry unlock after afs_StoreAllSegments
Andrew Deason [Fri, 1 Apr 2011 18:43:13 +0000 (13:43 -0500)]
afs: Retry unlock after afs_StoreAllSegments

HandleFlock calls afs_StoreAllSegments when unlocking an exclusive
flock lock. This can drop the write lock on avc, so we must
effectively retry the entire lock operation again, since the world may
have changed while we were waiting to reacquire the lock on avc. So,
retry once all of the lock checks up to that point, to ensure that a
lock on the file actually still exists.

FIXES 125446

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

Change-Id: Ibd215d586485d8f18f77665f5f85e6bee579e35e
Reviewed-on: http://gerrit.openafs.org/5766
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Avoid memory leak on recursive write flock
Andrew Deason [Fri, 1 Apr 2011 21:43:24 +0000 (16:43 -0500)]
afs: Avoid memory leak on recursive write flock

When a process requests an exclusive lock on a file on which it
already holds an exclusive lock, we basically form a no-op. However,
HandleFlock was allocating a new SimpleLocks and attaching it to
avc->slocks, without freeing the old SimpleLocks structure.

Since we don't need to do anything if we already hold an exclusive
lock, just break out of the loop right away when we detect that
scenario. Thus we avoid adding a new structure to avc->slocks, and we
avoid a memory leak.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thanks to Simon Wilkinson for pointing out F_SETLK64.

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

Change-Id: Iee09a8bc4a0aabbd12fe156940fa61d6947642e8
Reviewed-on: http://gerrit.openafs.org/5758
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovol-salvage: Fix AskOnline error message
Andrew Deason [Wed, 2 Mar 2011 20:13:25 +0000 (14:13 -0600)]
vol-salvage: Fix AskOnline error message

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

Change-Id: I7cf852d563b72c40b183b728143b59e8e4b8da7b
Reviewed-on: http://gerrit.openafs.org/5757
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoGive a default reason in *sync-debug
Andrew Deason [Wed, 2 Mar 2011 19:12:25 +0000 (13:12 -0600)]
Give a default reason in *sync-debug

If no -reason is given for fssync-debug calls, we currently just
transmit garbage to the fileserver or salvageserver. Instead, give a
default (the *_WHATEVER constant), so we do something consistent.

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

Change-Id: I27aefea0e891444e006e5d4b5ed43ed9cd492242
Reviewed-on: http://gerrit.openafs.org/5756
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoConvertROtoRW: Use old copyDate for creationDate
Andrew Deason [Thu, 3 Feb 2011 21:40:48 +0000 (15:40 -0600)]
ConvertROtoRW: Use old copyDate for creationDate

When we convert an RO volume to an RW, currently we just copy the
copyDate and creationDate from the RO metadata into the RW. But the
copyDate and creationDate fields have different meanings for RW and RO
volumes: for ROs, the creationDate is merely the last time the data
was updated from the RW during a release operation.

So, if the copyDate is older than the creationDate, use the copyDate
as the new RW creationDate instead. This will probably not match the
creationDate of the original RW, but it will be closer to it, and it
will more accurately represent the conceptual "created time" of the
new RW.

Doing this can avoid forcing an unnecessary full dump on a subsequent
release of the resultant RW volume, since the creationDate is more
accurate.

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

Change-Id: I54516a20ebb87d9c482cbc4840e0d236e7c54f8a
Reviewed-on: http://gerrit.openafs.org/5755
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: Set tvcp->callback before BulkStatus
Andrew Deason [Thu, 12 Aug 2010 19:38:55 +0000 (14:38 -0500)]
libafs: Set tvcp->callback before BulkStatus

When we call InlineBulkStatus or BulkStatus, we currently do not touch
tvcp->callback for any of the vcaches before making the call. This can
cause us to not notice an InitCallBackState issued by the fileserver
before the BulkStatus call returns, since the InitCallBackState
handler looks at tvcp->callback to determine what vcaches to clear
callbacks for. In turn, this can cause us to think we have a callback
agreement with the fileserver on one of the BulkStatus'd files, when
the fileserver does not actually have such a callback agreement.

So, set tvcp->callback to the server we are contacting, so if we get
an InitCallBackState call from that fileserver, the CBulkFetching
state will be cleared, and we will correctly discard the callback
information for that vcache.

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

Change-Id: I85c89eff061af799a7d8f612bee9b2f182312e6f
Reviewed-on: http://gerrit.openafs.org/5754
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoubik: Log a message when we replay the trans log
Andrew Deason [Wed, 24 Nov 2010 15:03:19 +0000 (10:03 -0500)]
ubik: Log a message when we replay the trans log

It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.

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

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