Commit Graph

8294 Commits

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

FIXES 128756

Change-Id: Ia06f76a6f719e69881b91fb2d975cfc33c85c370
Reviewed-on: http://gerrit.openafs.org/3569
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:07:57 -08:00
Andrew Deason
2ce159fbf4 LINUX: Reduce stack depth on recursive symlink res
Instead of calling vfs_follow_link inside afs_linux_follow_link
ourselves, we can just resolve the next step of the symlink resolution
and set the result in nd_set_link(), freeing the string in
.put_link().

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

Change-Id: I6886c3b67089c8028fd6ad93ab10eb9173bd6fbe
Reviewed-on: http://gerrit.openafs.org/3433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:02:15 -08:00
Andrew Deason
64e564b29e Cache bypass: remove ifdefs under src/afs/LINUX24
Same as commit 9657695d34, but for
LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it
is always enabled. Also remove messages about a "cache bypass patched
module".

Change-Id: I79526ed78752a4c3da7123e5af1c5eb6afc19fe3
Reviewed-on: http://gerrit.openafs.org/3568
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 08:44:15 -08:00
Derrick Brashear
468ff8e4d2 DARWIN: replace resource merge script ref with binary
Ro is a helper tool; use Rez directly

Change-Id: I7b3f8105344960a149d7fa0ee1fbb3a332486a04
Reviewed-on: http://gerrit.openafs.org/3565
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:19:17 -08:00
Derrick Brashear
0ef3ce2006 DARWIN: make growlagent build not run afoul of ._ fun
in some cases a git checkout would promptly merge the ._ file away,
meaning a subsequent build would fail. just use the developer tools
to set an icon instead of clever tricks.

Change-Id: I34290f0f32cb7ae72a298a7af1ed4bd6a8ef9224
Reviewed-on: http://gerrit.openafs.org/3563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:11:19 -08:00
Derrick Brashear
9de81541aa DARWIN: make ARCHFLAGS propagate to shlibs
in order that configure not expand ARCHFLAGS (so we can override from
shell) escape the variable.

Change-Id: I9d5c3f4cc58c66be7ffefbd134ba476673be6ea8
Reviewed-on: http://gerrit.openafs.org/3562
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:02:55 -08:00
Ben Kaduk
b1cb3607ff FBSD7: Don't sleep with the glock
On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic
when the kernel is configured with WITNESS and we hold the glock around
it.
Drop the glock in this case.

Change-Id: I0036aad3059805d77afe9aa9bf7f5d421d6810f8
Reviewed-on: http://gerrit.openafs.org/3551
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:44:11 -08:00
Ben Kaduk
6040a4daa0 Bring FBSD 7.X client back to life
Having been untested for quite some time, we had several
places that needed more conditionals to compile on FreeBSD 7.

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

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

FIXES 128612

Change-Id: I831cea711067d04dc276deb171faf3369c55b775
Reviewed-on: http://gerrit.openafs.org/3548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:43:22 -08:00
Ben Kaduk
28032bc1c1 FBSD: StopListener glocking fixup
afs_osi_Sleep requires the glock (so that it can sleep on it); we
dropped the glock earlier in osi_StopListener because soshutdown and
soclose can sleep, but we must (unconditionally!) acquire it for our
loop waiting on rxk_ListenerPid.

Change-Id: I38c3ab6689a6af7f1693bd3c8348068ee280e530
Reviewed-on: http://gerrit.openafs.org/3549
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-20 13:43:09 -08:00
Andrew Deason
ad0b390ec5 LINUX24: Define afs_linux_can_bypass
We call afs_linux_can_bypass, so make sure it exists.

Change-Id: Ie4393cc57af1a52748b76d3403370fbd788d9f8a
Reviewed-on: http://gerrit.openafs.org/3554
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:41:27 -08:00
Andrew Deason
6f65ace58d LINUX24: Include linux/pagemap.h
For 2.4 Linux we need to include linux/pagemap.h, otherwise we get
undeclared references to KM_USER0 and PAGE_CACHE_SIZE.

Change-Id: I1bd6c6484a9b46f923fa31d1d45fbfedc243abbd
Reviewed-on: http://gerrit.openafs.org/3553
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:40:27 -08:00
Derrick Brashear
4f89d4ad34 backup: pass in valid dummy pid for LWP
LWP_CreateProcess needs memory passed in; instead of a null pointer,
pass in a pointer to a PROCESS.

Change-Id: I451d803461252e3afb5d89b840a1ee047228d204
Reviewed-on: http://gerrit.openafs.org/3555
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:39:59 -08:00
Ben Kaduk
37c20528df Zero rx_multi_lock before initializing it
FreeBSD's kernel debugging facilities will panic if it detects
an attempt to re-initialize an already-initialized lock, as detected
through some particular bits being nonzero.  Zero everything out
before starting, to prevent this panic.

Change-Id: I7f3abae978d1cbe7eb4908d90c52a0dc46b81e08
Reviewed-on: http://gerrit.openafs.org/3550
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 08:56:23 -08:00
Jeffrey Altman
afef1712f2 Windows: fs chmod and display mode in fs examine
Make use of the new pioctl VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
operations to display the current mode in fs examine and permit
setting the mode with "fs chmod".   The mode string parsing makes
use of Vincent Archer's code from Minix.  The required copyright
statement and license is attached to parsemode().

afsconfig-windows.h gains definitions for various mode symbols
that are not defined by Visual Studio runtime headers.

Change-Id: I624f73154b7f177f93289e2641da5d9478ea931c
Reviewed-on: http://gerrit.openafs.org/3546
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 08:06:39 -08:00
Jeffrey Altman
bb4c0234b2 Windows: clear mountPointStringp on status change
If the data version of the cm_scache_t changes, we must clear
the mountPointString.  Otherwise, if the object is a mountpoint
or symlink, cm_HandleLink() will not attempt to build the new
target string.   The Windows CM never updates the contents of
a mountpoint or symlink.  It always destroys the old and creates
a new one.  However, the Unix CM simply updates the link data.
Apparently, the Windows clients have never noticed.

Change-Id: If2297ed0a323411df13b7828d11dbb653669d351
Reviewed-on: http://gerrit.openafs.org/3552
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 08:06:10 -08:00
Jeffrey Altman
27469e59b1 Windows: Add VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
Add pioctls to get and set the UNIX mode bits for an
object in AFS.

Change-Id: I220047d8be50b5db511e41004b8248859f479c0c
Reviewed-on: http://gerrit.openafs.org/3545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 07:08:53 -08:00
Jeffrey Altman
16dac6d4a6 Fix fallback processing for ktc_GetTokenEx()
The fallback processing after ktc_GetToken() generates
a token set or fails.  Immediately return 'code' to the
caller after freeing ktcToken.

Change-Id: If82c5c94b75152eaa4d077b428238e8f77478d05
Reviewed-on: http://gerrit.openafs.org/3544
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-18 17:54:02 -08:00
Derrick Brashear
f32a0df37b darwin: fix fixed setpag error handling
looks like testing 9da7f3cc73
failed to have the right dependencies. fixing the fix!

Change-Id: Ib295e819667c895bfe52c4d5b217ebbeaf1e4c52
Reviewed-on: http://gerrit.openafs.org/3542
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-17 18:20:01 -08:00
Derrick Brashear
98c6aadfa1 macos nfs translator vnode ref fix
code won't trigger today but we might as well get it right.
we already ref the vnode. don't leak refs.

Change-Id: Ib2aa87ffbb8c6bbd38d8858328d26f1a37cf04b9
Reviewed-on: http://gerrit.openafs.org/3532
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-16 09:15:03 -08:00
Anders Kaseorg
1519144f83 Linux: Fix AFS_NORETURN violation with osi_AssertFailK
Commit d86f0c44d3 changed the
AFS_LINUX26_ENV implementation of osi_AssertFailK so that it returns,
contradicting its AFS_NORETURN prototype, in an effort to make the
following BUG() display the right line number.  To fix this, move the
returning implementation into its only caller, the osi_Assert macro.

This fixes possible compiler misoptimizations due to

rx_kcommon.c:255:1: warning: ‘noreturn’ function does return

Change-Id: Ibbcc630037002ce4659e2e6a36b39d271f9bdc58
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3276
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 15:53:01 -08:00
Simon Wilkinson
acfc61eca8 opr: Add new queue implementation
Add a new queue implementation for OpenAFS. This has a similar calling
form as the current RX queue implementation, but is implementated using
type safe functions, and supports structures with multiple queue
headers. This permits threading a structure onto multiple queues at the
same time.

The eventual intention is that this queue implementation will replace
both rx_queue and the Unix cache manager afs_q.

Change-Id: I8f815872b017a85eb52a6e6451cdcee3eb869519
Reviewed-on: http://gerrit.openafs.org/3139
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:32:51 -08:00
Derrick Brashear
e8d8a2240a refactor afs_CheckServers
basically, we need the ability to reuse this function, so, let's make it work
differently so we can.

Change-Id: I41a7e1dc62feeb137f1a7f5c939f54cb59cc6c13
Reviewed-on: http://gerrit.openafs.org/3403
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:25:32 -08:00
Andrew Deason
4e00fc6f0e Add ioctl-based AFS calls for Solaris 11
Switch from using syscall-based AFS calls to ioctl-based AFS calls,
since syscall 65 was repurposed in some kernels in Solaris 11 and
OpenSolaris. Update the provided afs init script to accomodate the
additional steps needing for starting the AFS client.

Partially based off of some work by Derrick Brashear.

Change-Id: If694af8ac576856fed113851f1be4154b4d970d3
Reviewed-on: http://gerrit.openafs.org/3498
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:12:58 -08:00
GCO Public CellServDB
8815f50991 CellServDB update 13 Dec 2010
Change-Id: Ic3c96d99656f50da82243385cb7f9bcdf78f12e4
Reviewed-on: http://gerrit.openafs.org/3503
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-13 08:06:09 -08:00
Jeffrey Altman
f8400699a8 Windows: log error code for smb lan thread fail
When creation of the smb_LanAdapterChangeThread fails
log the error code as part of the panic message.

Change-Id: Iac034bdf2f04aed08cf77702c701882c31a10b36
Reviewed-on: http://gerrit.openafs.org/3502
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-13 07:49:51 -08:00
Jeffrey Altman
6229ffb7ae Windows: PerformanceTuningInterval Merge error
Due to a merge error, if RankServerInterval was set via the
registry, its value would also be used for the
PerformanceTuningInterval.  Fix it.

Change-Id: I6605146db0c25ecbf0d20f9d7198934f5bf411ad
Reviewed-on: http://gerrit.openafs.org/3500
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-11 20:35:04 -08:00
Andrew Deason
2cd0a1e4ff Add afs init script for Solaris 11
Change-Id: I978454a5d34aee412ec3e3d57a38859b1405e5fb
Reviewed-on: http://gerrit.openafs.org/3499
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-10 15:06:14 -08:00
Andrew Deason
f88c91f777 DAFS: Avoid logging harmless LEAVE_OFF failures
The DAFS volserver can create temporary destroyMe volumes, which it
then tells the fileserver to keep offline with an FSYNC_VOL_LEAVE_OFF
message. When the fileserver doesn't know that the volume exists,
currently it responds with SYNC_DENIED, which causes the volserver to
log the error with a "negative response on circuit FSSYNC" message.

These are harmless, though, since leaving a volume offline that the
fileserver does not know about is a no-op. So return the SYNC_FAILED
code instead, which does not get logged, and is more consistent with
some other FSYNC handlers like FSYNC_VOL_DONE.

Change-Id: I315d091fb419767ae33c1846d90e5ef83372477d
Reviewed-on: http://gerrit.openafs.org/3494
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-10 13:02:04 -08:00
Andrew Deason
95fc9ece50 DAFS: Fix VOL_QUERY_VOP error codes
Volumes in the VOL_STATE_DELETED state effectively do not exist. So,
when receiving an FSYNC_VOL_QUERY_VOP request for a volume, report
FSYNC_UNKNOWN_VOLID for a volume in the VOL_STATE_DELETED state.
Similarly, if the volume exists but on a different partition, we
should return the FSYNC_WRONG_PART reason code.

This allows volumes to be usable by the volume server in some corner
cases. For example, when a volume X exists on partitions A and B, and
the volserver deletes X on B. The fileserver then puts volume X in the
DELETED state, allowing checkouts over fsync, but FSYNC_VOL_QUERY_VOP
reports that no vop exists.

With this change, FSYNC_VOL_QUERY_VOP will instead report that the
volume does not exist, and so FSYNC_VerifyCheckout can succeed for
such volumes.

Change-Id: I6c4f7deead745ddba44963a9f66a9f2ef25686a5
Reviewed-on: http://gerrit.openafs.org/3493
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-10 13:01:52 -08:00
Andrew Deason
9da7f3cc73 DARWIN: Fix setpag syscall error detection
Darwin uses the same variable as the return value for
ioctl_afs_syscall, and as the last 'out' parmater, so the return value
for ioctl_afs_syscall will always overwrite whatever is written to the
last 'out' parameter. Instead, record two different variables, and
allow the returned error to overridte the error set as the last
parameter.

Change-Id: I7db1b226612c55c892810ce446b486b7e503529c
Reviewed-on: http://gerrit.openafs.org/3497
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-10 11:41:57 -08:00
Christof Hanke
f46bba8611 Fix mech of building export on AIX
Presently, the distinction between 32Bit and 64Bit AIX is done by
inserting a "#" (comment-sign) into the Makefile.
This fails on some AIX-installations. Thus, just use normal
conditionals for distinguishing betwenn 32 and 64 bit.

Change-Id: Ie83bbdcd3c7c4b7b0858c9691bf6e1bf6c4ba32a
Reviewed-on: http://gerrit.openafs.org/3434
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-10 08:46:21 -08:00
Andrew Deason
b20329e019 Fix AUD_HOST callers
Servers using the AUD_HOST audit message should give the host IP in
network-byte order, as that is how the auditing code interprets it.
Fix the users of AUD_HOST that do not do so.

Change-Id: Iaf6abec850e691febfa3e07bff368eab6fb71409
Reviewed-on: http://gerrit.openafs.org/3492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-10 08:38:46 -08:00
Andrew Deason
ddc4057ce7 tvolser: Link libafsrpc after libusd
libusd can contain a reference to AssertionFailed, which is in
libafsrpc. So link libafsrpc after libusd, so it gets resolved when
building e.g. vos.

Change-Id: I30140b5ede5afa2495f4c2b7b7edbbd878bf6dca
Reviewed-on: http://gerrit.openafs.org/3477
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-09 04:52:57 -08:00
Andrew Deason
4dd9bc32a3 auth: Return SuperUser identity for localauth
The caller expects identity to be populated when we return 1. So for
localauth, give it an identity. Don't set uname, and in fact, move the
uname declaration so that it is clear that it's not used for most of
this function.

Change-Id: I4dcd466b25f578362290ed2fc65b5bd6e23a91e4
Reviewed-on: http://gerrit.openafs.org/3475
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-09 04:52:37 -08:00
Andrew Deason
c1b71c4e7b auth: Move <NoAuth> to a named constant
Add a #define for "<NoAuth>" and related values. Use them.

Change-Id: I0e1d374403a0ad20be6a2839e37a5894b15446cd
Reviewed-on: http://gerrit.openafs.org/3482
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-09 04:52:12 -08:00
Anders Kaseorg
3fd789dfbd rxi_NatKeepAliveEvent: Shrink excessive stack buffer
Fixes
rx.c:6138:1: warning: the frame size of 1600 bytes is larger than 1024 bytes

Change-Id: I2f5b4961a7d929454a99ea99c637d1a0b2468a14
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-08 05:48:42 -08:00
Derrick Brashear
7b7cd95ec0 DAFS: make FSYNC_VOL_QUERY_VOP DAFS-only
all the support code handles this only for DAFS. the
case statement should treat as unknown if it is.

Change-Id: I14816875b7a0b172d6f6fc9893cb0add90503111
Reviewed-on: http://gerrit.openafs.org/3485
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-07 21:01:57 -08:00
Derrick Brashear
fea0ee62ab DAFS: fix ifdef
there's no DEMAND_ATTACH_ENV ifdef. don't use it.

Change-Id: I2f6f9c57b187fcb514f318d977a15de1889f9055
Reviewed-on: http://gerrit.openafs.org/3484
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-07 20:41:52 -08:00
Andrew Deason
592a33a478 SOLARIS: Free vcache mappings on shutdown
Right before shutdown, go through all of our vcaches and flush them,
freeing any pages associated with the vcaches. If we don't do this,
pages associated with our vcaches may still be around after we
shutdown and the module is unloaded, causing a panic when the kernel
tries to deference the page's vnode.

Abstract out afs_freevfs() following the gafs_foo/afs_foo convention
from the vnode ops, since we're calling this in two different places.

Change-Id: I64b88799acce3a55648ec94b53ed63319cd04698
Reviewed-on: http://gerrit.openafs.org/3472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-07 12:49:20 -08:00
Jeffrey Altman
9aad0979e9 modify FindIndex to compare uuids
If FindIndex is provided a server address and entry has a valid
uuid, obtain the uuid for 'server' and use that search for a
matching entry.

This modification is necessary in order to permit operations
against multi-homed servers in split horizon DNS configurations.

Change-Id: I8929c500eb4f71c8cf0aa8328bc3b3a0345368aa
Reviewed-on: http://gerrit.openafs.org/3468
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-07 09:21:51 -08:00
Derrick Brashear
90199686e6 afsconf_SuperUser verify identity before use
if we didn't get an identity back, don't try to use it.

Change-Id: Iff6069b9231c3adc3f74cbf7fff4dffcfc289cd3
Reviewed-on: http://gerrit.openafs.org/3471
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-07 09:20:38 -08:00
Jeffrey Altman
cb02cfcdfb Windows: partial impl of TokenEx functions
No pioctl yet but implement enough so that GetTokenEx and
ListTokensEx can provide results.

Change-Id: I261f21db6e10502602aa0cb453b24632fdefd25c
Reviewed-on: http://gerrit.openafs.org/3469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-07 06:28:46 -08:00
Jeffrey Altman
f71219918e Windows: test for path in afs before symlink test
Check that the path is in afs before testing to see
if it is a symlink

Change-Id: If22331595b675bf9347d832eca70edfc6d1d0365
Reviewed-on: http://gerrit.openafs.org/3467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-07 06:28:15 -08:00
Andrew Deason
ac1c4b30ba RX: Always define kernel XDR symbols to be AFS XDR
Always define xdr_foo to afs_xdr_foo when we're in the kernel.
Otherwise, we can get warnings that our xdr_foo symbols are colliding
with the xdr_foo symbols from the kernel.

Change-Id: I74b2cdd24f01734c2c36506bb5bab0b386d46094
Reviewed-on: http://gerrit.openafs.org/3465
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 21:38:38 -08:00
Andrew Deason
1c45cc746e Remove unreached lines
Fix some macros to eliminate unreached trailing empty statements (such
as: "{code = foo; goto error;};"), and other oddities causing
"statement not reached" warnings. Also eliminate a couple of code
blocks that were never reached.

Change-Id: Iac626976268e13f5ef05f379ad1c9b5437c57f86
Reviewed-on: http://gerrit.openafs.org/3368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 21:38:13 -08:00
Andrew Deason
94591a635b vol_split: Recover from stream open failure
Make sure we go through the error recovery code when we can't create a
stream, instead of just returning without cleaning up.

Change-Id: Ie3a5be9a81b36624a7d49958233c42e82a0e4bfa
Reviewed-on: http://gerrit.openafs.org/3466
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 21:37:50 -08:00
Andrew Deason
8f7ae51c61 tubik: Link with libafsauthent
libubik_pthread.a requires libafsauthent.a, since we make use of
afsconf_* functions. Add libafsauthent to LIBS and make tubik depend
on it.

Remove linking to liblwp while we're here, as we should not be using
any LWP code.

Change-Id: Ie028fedfbc3e7a8a78dc69a2c38be99eb72602da
Reviewed-on: http://gerrit.openafs.org/3464
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 21:37:23 -08:00
Andrew Deason
2a64776a50 roken: Export rk_daemon, not daemon
We never export a function called 'daemon'. We only export a function
called rk_daemon, and the define daemon to rk_daemon. So, only include
rk_daemon in the map file, since that is the only symbol that will
appear.

Change-Id: Ib0f5ba88ba6d8bdefe3191050bc9e9e36f1b9134
Reviewed-on: http://gerrit.openafs.org/3463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 12:32:26 -08:00
Andrew Deason
6bcee8821f SOLARIS: Fix some rx_atomic.h warnings
Include atomic.h so we get atomic_* prototypes, pass atomic->var in
rx_atomic_sub, and pass unsigned int*s to  the atomic_* functions.

Change-Id: Ic8d745bc1726c850bd15d38702163e92587bb0a5
Reviewed-on: http://gerrit.openafs.org/3462
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 12:32:10 -08:00
Andrew Deason
37817796c4 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.

Change-Id: Ib8790c8f9621d7a9da12588ea6115f9cb3ff9022
Reviewed-on: http://gerrit.openafs.org/2548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-06 10:50:16 -08:00