For future use of OSD and vicep-access osi_fetchstore.c should not depend on
the rx-fileserver-protocol but call instead the routines pointed to by ops.
Some code beautyfication in afs_fetchstore.c to use nBytes instead of code.
New global variable afs_protocols in afs_fetchstore.c which will be used
in RXOSD/VICEP-ACCESS programs in the future.
Change-Id: Id6b6e6c794b4fb00ad4719670caefd381f98949b
Reviewed-on: http://gerrit.openafs.org/2952
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
as discovered by Benjamin Kaduk, we were usually holding rx_refcnt_mutex
but briefly, and here we held it longer, and thus around acquiring freepktQ
mutex. undo it by simply setting STATE_RESET sooner as newcall does.
Change-Id: I3ae6fce1832d79c7cf17e93831cf8f30aebeb82b
Reviewed-on: http://gerrit.openafs.org/3219
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
During cm_volume_t object recycling the object is removed
from the LRU to ensure that a single object is not recycled
by multiple threads at the same time. Before cm_FindVolumeByName()
exits the object must be re-inserted into the LRU if it is not
present.
LICENSE MIT
Change-Id: I3feb3fb55beddffdbbf52a79efcc8d44af39b891
Reviewed-on: http://gerrit.openafs.org/3220
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
attach2() is required to return with the VOL_LOCK held
even though it is called without it. This must be true
for error conditions as well. Not all error paths are
obtaining the VOL_LOCK before returning. Add out paths for
lock held and lock unheld error cases.
Change-Id: Ib6a05a9bafd9eb3a26a1dd3881d19baa6d59a05e
Reviewed-on: http://gerrit.openafs.org/3177
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
mapcnt is no longer used in either linux client and should be removed
to save a little space/sanity.
Change-Id: Iea734fcbcb7bb639ea080de7b5bf70238bcb60f2
Reviewed-on: http://gerrit.openafs.org/3207
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Currently, when an error is encountered for an attached volume, we
call VRequestSalvage_r, which makes the volume go into the
VOL_STATE_SALVAGING state. This state implies that the volume is
offline, however, which is not necessarily the case if we're calling
VRequestSalvage_r from, for example, VAllocVnode_r or VUpdateVolume_r.
So now, make a new state called VOL_STATE_SALVAGE_REQ to indicate when
a salvage has been requested but the volume is not offline yet (and
thus is not yet ready to give to the salvager). If VCheckSalvage finds
a volume in this state, it offlines the volume first. The FSSYNC
VOL_OFF handler now checks for this state, and if we're giving the
volume to the salvager, we wait for the volume to exit that state.
VRequestSalvage_r also gains a new flag, VOL_SALVAGE_NO_OFFLINE. This
is to ensure that the existing salvaging code paths for unattached
volumes does not change (for when VRequesetSalvage_r is called from
attach2). If this flag is passed, we do what we used to do, which is
just salvage the volume without offlining it.
Change-Id: Ie709ac7013ab2b52c87fa408c254651abe5e6af3
Reviewed-on: http://gerrit.openafs.org/2329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit fd592c7674 fixed the 'Volume X
(Y) is now offline' message for DAFS, but the same problem persists
for non-DAFS. Fix the non-DAFS case.
Change-Id: I7b19a3c2cad8b7233eb03a83598f9bf95db5ac65
Reviewed-on: http://gerrit.openafs.org/3213
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
For DAFS, you want to use 'dasalvager' not 'salvager'. One place was
still referencing 'salvager' in a DAFS example, so fix it.
Change-Id: Id671fa6125212beb1fb7f23a8743c1288848ee12
Reviewed-on: http://gerrit.openafs.org/3217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
IRIX apparently has enough krb5 to try building aklog, but no
error_message. ok. so let's cope
Change-Id: I3cb6d529829de348f73d5c9f5380e153f8ccce52
Reviewed-on: http://gerrit.openafs.org/3208
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
as reported by Marc Dionne, debug.h was still redefinining assert()
yeah, let's be done with that.
Change-Id: Icf2cf3db0f4972ebd4ee8cc0547e436b612e8bbc
Reviewed-on: http://gerrit.openafs.org/3194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Include libroken as a library in its own right, so that the whole
of the code can benefit from it. This change purely adds libroken
for the Unix build system. It doesn't replace those pieces of
libroken in hcrypto or util, or enable it for Windows.
There is also the option of using a system-install libroken, if one is
found at configure time.
*) If --with-libroken=yes, or is not supplied than a system library
will be used if suitable. Otherwise, we'll use the internal
libroken
*) If --with-libroken=/path/to/installation then the libroken at
that path will be used. If there is no libroken there, or it
is not suitable, an error will be returned
*) If --with-libroken=internal then the internal libroken is used,
regardless of what is present on the system.
We deliberately do not provide installed headers for the internal
libroken. If other applications wish to make use of libroken, then
they should use the Heimdal one, rather than piggybacking on ours.
Change-Id: Iff01e1e17090404cc8e4783108ae8a8784170918
Reviewed-on: http://gerrit.openafs.org/3191
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
For consistency, we should use a version of token.xdr.c built with
the -k flag when we build it into our kernel modules.
Change-Id: I08e7a1966664141af6c4ed160d3fb860eb5821bd
Reviewed-on: http://gerrit.openafs.org/3202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This time, these are files which are needed to get Windows going.
Change-Id: I262c5770ec04318f02cbc3e02520e63e09bc4dc6
Reviewed-on: http://gerrit.openafs.org/3203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The 2.6 code doesn't have an afs_read_super, so remove the
prototype and the outdated comments that reference it.
Change-Id: I1ff5c836ea0ba326d4512ddcfab3f34765347331
Reviewed-on: http://gerrit.openafs.org/3199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Build rules that use COMPILE_PART1 must be prefixed with +
to indicate to make that the subprocess is a make and that it
can run with parallel jobs.
Change-Id: If48b32b885c7c5be6a820cd44a83d01d1eecd20d
Reviewed-on: http://gerrit.openafs.org/3198
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The fs bypassthreshold command assumes a value of -1 means the feature
is disabled, but the CLI refused to accept this argument, since it is
not strictly a digit (according ti isdigit()). This patch accepts the
string -1, and makes it possible to both enable AND disable this
feature.
Change-Id: I87720b2dcfc4e9ee9f322c4841836b74440ac442
Reviewed-on: http://gerrit.openafs.org/3009
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
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>
I noticed that all of the other commands that accept a list of paths
use the SetDotDefault() function to default to ".", when no arguments
are given. This patch adds that call to getfid, making it more
consistent with similar commands.
Change-Id: Ia50c6805996d338cbd8d006107caa4ea56178c8e
Reviewed-on: http://gerrit.openafs.org/3008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This patch removes the redundant volume ID from the output of fs
getfid, and replaces it with the cell name, which is what the Windows
implementation provides.
Change-Id: I7ce009733a204eeb744683d9c4355c436e9e07aa
Reviewed-on: http://gerrit.openafs.org/3007
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This patch makes the fs getfid command print errors for paths that
can't be handled correctly, instead of quietly ignoring them, and it
also returns an error code if any such paths are encountered. This
makes the behavior consistent with other fs commands, such as
listquota, whereis, etc.
FIXES 128372
Change-Id: Ibb6e3f6cee5dccbf9347dfa8bfee8776a7552b91
Reviewed-on: http://gerrit.openafs.org/3005
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
osi_VM_FlushVCache and osi_TryEvictVCache were both attempting
to be wrappers around vgone(), with some checks before hand.
Implement the latter in terms of the former to prevent
code duplication and propagation of incorrect code.
Additionally, correct the locking around vgone(). The
vnode lock must be held, and we must also increase the vnode's
hold count so that it does not disappear out from under us.
As we need the interlock to check the usecount, keep it
locked until we lock the vnode lock, for extra protection.
As an added bonus, we no longer try to call vgonel(), which
is not an exported symbol and merely happened to work due
to the current kernel linker implementation.
Remove some stale comments.
With this change, a parallel buildworld completes on
my four-core machine.
Change-Id: I665607da25518ddd786869b139d87baed8a05e9f
Reviewed-on: http://gerrit.openafs.org/3196
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The FreeBSD vnode locking strategy requires that the vnode
interlock be held for all accesses to v_usecount, such as those
used by our VREFCOUNT and VREFCOUNT_GT macros. Conveniently,
a wrapper function is provided that takes the lock around its
access of the element, vrefcnt(). Use it for our macros.
Change-Id: Ia88eb21046fe844a6adb830734dcae2f76ef2dc5
Reviewed-on: http://gerrit.openafs.org/3195
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
add a mode where a newbinary restart can be used instead of
condrestart to induce a restart.
also, on upgrade, don't turn on the server RC script if it was
previously manually disabled.
Change-Id: I0e45be751cb2c5d9392d85467a979a22f5a777cf
Reviewed-on: http://gerrit.openafs.org/3163
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add asserts for any failures cases not explicitly handled and remove
any casting.
Change-Id: I282d917ab84b37012553233f2c913b2aef1c92e2
Reviewed-on: http://gerrit.openafs.org/3012
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs_osi_Alloc_NoSleep() is no longer used by the SOLARIS or IRIX
clients. It is used by the *BSD code in rx, so just let those
platforms define/prototype it in their osi_machdep.h
Change-Id: Ie2e4a6f7520329c345ac63c67d7b156ed21d109f
Reviewed-on: http://gerrit.openafs.org/3010
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this patch contains only the RPC interface to rxosd which already
contains the definition of all RPCs not just those few used in the
cache manager.
The code which calls these RPCs will follow in subesquent patches.
Change-Id: Ia90934b06e809d0a34ed5d4a0d77eed78b74780c
Reviewed-on: http://gerrit.openafs.org/3192
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
CreateProcess requires a null-terminated list of null-terminated strings
as an environment parameter.
A missing level of indirection was causing the final null to be
missed, meaning that if bosserver ran from somewhere which had an
environment the create process would fail.
Fix the null termination.
Change-Id: I3496d1c76570b80c760d0c0d8ee7fe046cec75b6
Reviewed-on: http://gerrit.openafs.org/3193
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The src/vol directory on Windows is one of the rare examples
where a single directory builds both lwp and pthreaded versions
of libraries and executables. With this patchset the executables
are fully converted from lwp to pthread. This requires that
afsrpc.dll include the pthread implementations of the threadname,
fasttime, and lock implementations from the LWP directory.
The inclusion within afsrpc.dll permits the dviced and
dvolser directories to avoid rebuilding those object modules.
Change-Id: I70c6e9ec346b5d9ef05d2400ddaf21e33a0c67a4
Reviewed-on: http://gerrit.openafs.org/3181
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Separate the windows code out in ihandle.c to reduce dependency on ntops.
As an aid to future threading issues, pass the offset in an OVERLAP
rather than doing a separate SetFilePointerEx.
Change-Id: I225387a574b1301516a9313838bbcb86e9e14b8d
Reviewed-on: http://gerrit.openafs.org/3176
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
The FSync file descriptor is an osi_socket which has an invalid
value of OSI_NULLSOCKET which is not necessarily -1. Be sure to
compare against OSI_NULLSOCKET and not -1 when checking an invalid
value.
Change-Id: I5b7531e690ea06046b337222b52a5013c7f8802e
Reviewed-on: http://gerrit.openafs.org/3179
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
file descriptors on Windows are not ints and therefore
cannot be safely compared against -1. Always use INVALID_FD
which is -1 on UNIX and INVALID_HANDLE_VALUE on Windows.
Change-Id: I8788f95817ee45367f04f4b90b4e6625c5a39dca
Reviewed-on: http://gerrit.openafs.org/3178
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the necessary files to our import list such that roken can be
built as a standalone library.
Change-Id: Ia9b5b14c618f4ac47eb99bd500d6465b6b25e4dd
Reviewed-on: http://gerrit.openafs.org/3189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add an option to shlib-build to ignore missing symbols in the map file.
This is already the default on some platforms, but others (such as
Darwin) require that all symbols in the mapfile be present in the
objects. This is a pain for libraries such as libroken, which will
have different symbols on different platforms.
Specifying -i adds the necessary magic to Darwin's ld to relax this
check. Changes may also be necessary for other platforms, but I
don't currently have those available for testing.
Change-Id: Ieaff8ed6dd4e16dfc420b90b85e4471952d83bd2
Reviewed-on: http://gerrit.openafs.org/3188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The process is only returned locked if the process is found.
Don't try to unlock it if it's not found.
Change-Id: I3911955561d0d97e8080bcd18b4e4393b19ad860
Reviewed-on: http://gerrit.openafs.org/3186
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
in order that our .c.o rule applies, force yacc source to
not be built directly into an object.
Change-Id: I9d0722ae74726feef92b1bc7eb7647ce7f97633b
Reviewed-on: http://gerrit.openafs.org/3149
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix an instance of a Makefile rule with multiple targets.
This can cause a parallel make to fail when two instances of
compile_et compete to write the same output files.
Spotted by a build failure with a corrupt bc.h header.
Change-Id: I4adee125a82d640bc78f15c77494a22157cf7f5d
Reviewed-on: http://gerrit.openafs.org/3165
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Recent versions of windows add a whole bunch of attributes above
A_ARCH. (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED was what bit be but
encryption of compression would do it).
This makes ~_A_ARCH not a good choice for testing nonwritability
of a file - so files with these new attributes just get silently ignored.
Using an explicit mask is much better. So do that.
Change-Id: Ie176ffae1995dd50c70319e196c0d30420733ccf
Reviewed-on: http://gerrit.openafs.org/3182
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
free() destroys GetLastError, so preserve it before giving back all the
buffers. Then if the create process failed we have something sensible to
log.
Change-Id: Ibb8bb870230f9c4e96f5ec9d4948552616cd7456
Reviewed-on: http://gerrit.openafs.org/3175
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
on windows we use ctime_s for ctim'ing to a buffer. except we
allocate an extra buffer. "uh"
Change-Id: Ic40583814d0e1d05d7c98cde09855c036045208e
Reviewed-on: http://gerrit.openafs.org/3174
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
side effect: remove the version which breaks on 64 bit windows
Change-Id: I8a1d2cde1f2eebe3242b26d0c8b62e39bfc7dfec
Reviewed-on: http://gerrit.openafs.org/3173
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit updates the code imported from heimdal to
a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69)
Upstream changes are:
Chas Williams (CONTRACTOR) (1):
hcrypto: struct x64 doesn't need bitfields
Love Hornquist Astrand (1):
Switch to ULL
Simon Wilkinson (1):
hcrypto: Flag 64bit bit constants as long long
Change-Id: Ifc11c14942a2b283d7f5879de5bf88f53b290512
Reviewed-on: http://gerrit.openafs.org/3100
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>