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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
we happily go to the "good dentry" path and exit, leaking the
result of dget_parent, if parent is globalVp. Let's not
Change-Id: I3848a1aa2611d17ba08e04b3f33f22623645d233
Reviewed-on: http://gerrit.openafs.org/3448
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/talocale has not been built for UNICODE in a long time.
Fix it.
Change-Id: Ia8b182b711838e2d6592f9040d2173f5977f9cfd
Reviewed-on: http://gerrit.openafs.org/3439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add link.ico and mount.ico Windows icon files.
Use these images as overlays instead of extracting an image
from shell32.dll which is a bad idea. See
Change-Id: I624f959229a91329507aec5ff61045c49d296401
http://blogs.msdn.com/b/oldnewthing/archive/2005/10/26/485133.aspx
Reviewed-on: http://gerrit.openafs.org/3445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Make the context menu handler also work for folder backgrounds
and on Win7 for library folder backgrounds
For folder backgrounds, the shell passes the PIDL of the folder
instead of a data object. Extract the path from that PIDL. Also
extended the register function of the dll to add the required
registry keys.
Change-Id: I8928efd25058dced3820478a2858ce20336b4301
Reviewed-on: http://gerrit.openafs.org/3443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
If the file server responds to RXAFS_GetCapabilities with
RXGEN_OPCODE the server is up and there is no need to fallback to
RXAFS_GetTime. Remove the code that performs the extra work.
Change-Id: Ieb0d1cce6f356a8988f2464227dec9b6cd9e6fcf
Reviewed-on: http://gerrit.openafs.org/3419
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>
Just ignore some files created during the build.
Change-Id: Ifb276b2a71fe8e58517605584e918d990b8f2f5d
Reviewed-on: http://gerrit.openafs.org/3435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When the kernel does not have the zero_user_segments function, we
define it ourselves. Also define the zero_user_segment function, since
we use it, and a kernel lacking zero_user_segments will also lack
zero_user_segment.
Change-Id: I5c786d2af27227793a7a2768d1af76ccd2d6a415
Reviewed-on: http://gerrit.openafs.org/3432
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When building libafs, the make file variable COMMON_INCLUDE is
assigned a value in two places: Makefile.common.in and
MakefileProto.OBSD.in. The assignment in the latter place is both
wrong and unnecessary. Remove it.
Change-Id: Ie322f01b023898d4f246243ee3d196aa714147df
Reviewed-on: http://gerrit.openafs.org/3430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The netinet/in.h header file requires the inclusion of sys/types.h
(or some portion thereof). Most systems include it implicitly
within netinet/in.h. Some, such as OpenBSD, do not. In kopenafs.c,
sys/types.h is included after netinet/in.h which is fine in most
cases but means that, as a result, it will not compile on OpenBSD.
Moving sys/types.h before netinet/in.h solves this problem (and
should cause no problems on any other system).
Change-Id: Ifc3295f3eb4f0b2b4718d0b2aa6dcbb2b06da8df
Reviewed-on: http://gerrit.openafs.org/3429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we get a negative (rx) error, it means the server is down,
*except* for RXGEN_OPCODE. make this handling consistent
Change-Id: I8459ec49ca311dc336aed8da7b106fe0f647fc32
Reviewed-on: http://gerrit.openafs.org/3407
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Implements a connection pool for Rx client connections with the
same credentials. The code trivially avoids the limit on Rx
call channels, without touching Rx directly. The conn call limit
is known to be hit in cache-bypass, and probably other use cases,
so there is an incentive to address it potentially sooner than
larger Rx changes are ready to merge.
Upgrade to exclusive lock before calling find_preferred_connection.
Unset trace option. Fix a warning around modular increment of
select_index, we'll go with the change suggested by Marc, I don't
see a real need to save the value mod CVEC_LEN.
Change-Id: I956aa22cd52b1c43187c7e03230e36820ba11c4d
Change-Id: Ie5f936ba912bcfe0544dbc1d035bb74e5ddc50f8
Reviewed-on: http://gerrit.openafs.org/2216
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
when we dole out a vcache, count it.
Change-Id: Id0f9e20b4b8a9de6ee83dcb383c3a152f6b733e6
Reviewed-on: http://gerrit.openafs.org/3423
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
previously both root and reclaim could end up leaking refs. fix it.
Change-Id: Ib3c9dab2f31b988a2887821f5192ff1fad0e732c
Reviewed-on: http://gerrit.openafs.org/3424
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
fix quoting to avoid substing during configure, instead let it happen in make
Change-Id: I31ec2e7f15ca14f337b4f3f43dd1ef5c0b423756
Reviewed-on: http://gerrit.openafs.org/3420
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>