If we need to resend something, the peer we're sending to may be dead.
Check if the peer is dead in rxi_Resend, so we don't have to wait
(possibly several seconds) for the next rxi_CheckCall.
Change-Id: I0ecc0b1fc23bb4194ebadcea97dd58c938af8154
Reviewed-on: http://gerrit.openafs.org/8118
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
When we receive a buffer of errors from the error queue, loop through
all of them, and do not stop at the first applicable one we find.
Change-Id: Iad928e0489041b360fe705ac397836650b30091e
Reviewed-on: http://gerrit.openafs.org/8116
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
even if we are not handling socket errors, have a stub function
Change-Id: I1f3c1631c5ddcf10e74612e13aafbae833bd5eaa
Reviewed-on: http://gerrit.openafs.org/8240
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
We call osi_HandleSocketError in a loop, so make sure we process all
of the errors. We were allocating a buffer to process the errors in
osi_HandleSocketError itself, but we can reuse the same buffer on
subsequent invocations, to reduce allocation/free pressure if we need
to call osi_HandleSocketError more than once. So, do that.
Change-Id: Idca2b9d21a48a868574ce6cfc5efe2efba3570a1
Reviewed-on: http://gerrit.openafs.org/8115
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
If errors exist in the socket error queue, we will notice by a sendmsg
or recvmsg returning an error. If we never get an error, we don't need
to check the error queue. So, only call osi_HandleSocketError after
such an error has been returned, so we can avoid unnecessarily
checking the error queue when there are no errors.
Change-Id: I7c8aaaac42728dac7fb0634538b8cc317f0e7212
Reviewed-on: http://gerrit.openafs.org/8114
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
This reverts commit 94bf003a72.
The fuse tests are fundamentally broken as they stand:
*) They rely on files that have not been committed to the tree. To
function correctly the file fuse/conf/CellServDB must be present
*) They always run, regardless of whether the fuse helper binaries are
installed on the developers system, or even on whether the tree was
built with fuse support enabled.
*) They pass, even if fuse fails to start up
*) The file fuse.sh is committed, despite being unused. This is
particularly confusing, as it looks like this is where the tests
are performed from (its not, testing is done in dynroot-t)
*) fuse-log should be either cleaned up, or flagged as ignored in
.gitignore
Revert the commit until such time as all these issues can be fixed
Change-Id: I5ff9a95f33c0a5d0614bb47c521a8770d92fe2eb
Reviewed-on: http://gerrit.openafs.org/8230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.
Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile
Use roken.h, instead of hardcoding system libraries
Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
An hlist is not circular, and the end is marked by a NULL next
pointer.
Change-Id: Iec7ad7e3e7ee989d548233b045aa8def1ebfb1dc
Reviewed-on: http://gerrit.openafs.org/8233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.
Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.
Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.
Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
in order that this can potentially be extracted entirely
to a platform-specific file, (and possibly dbus-equivalents
inserted also) consolidate the macos system events handling code
Change-Id: I8fc4a96dc2590778a13f27610b383ee35626871e
Reviewed-on: http://gerrit.openafs.org/8201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Advisory file locks for RO volumes don't make a lot of sense, since
there are no possible writes to worry about. The fileserver already
does not track these, so don't even bother processing them in the
client.
Change-Id: Ie2a20d2f7af67799cfb8d30e72aa3e52a1ecc2d5
Reviewed-on: http://gerrit.openafs.org/8197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
provide a way to run native rxgen, config and compile_et
Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Update makefiles to have 'make test' and 'make check' use the
_nolibafs build version, since there are no tests that (currently)
require the AFS kernel module to be built.
Clean up fuse test copyright notice, Alphabetize configure.ac
Change-Id: Icc95dd3393cd66f0d04fa5f6e8f806db60ca031e
Reviewed-on: http://gerrit.openafs.org/8135
Reviewed-by: Troy Benjegerdes <hozer-gerrit@hozed.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
all of our helper tools should be configured in one place,
so a cross compile can override them
Change-Id: I35044832257fa3389504f79207aa423e39d1ad4a
Reviewed-on: http://gerrit.openafs.org/8198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
afs_lockctl has common cleanup code in the 'done' label. Use it here,
instead of trying to duplicate it.
Currently this code path appears to not be dropping the discon lock,
which this rectifies.
Change-Id: I136a78bc3235454db7e3d69bb79b0061cfcab265
Reviewed-on: http://gerrit.openafs.org/8196
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode to use the common linked list code from opr.
bnode_Deactivate() was converted but is unused by the code and isn't
tested.
Change-Id: I0edec453f15cf19e82088e3d361483cc5833f897
Reviewed-on: http://gerrit.openafs.org/8168
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode_proc to use the common linked list code from opr.
Change-Id: I30753ad10387b23509be0831d378772049f4be9d
Reviewed-on: http://gerrit.openafs.org/8167
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode_type to use the common linked list code from opr.
Change-Id: I21329aff81a91a79a1fcf525f4fdd3a22b33ec92
Reviewed-on: http://gerrit.openafs.org/8166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Move the bosserver specific parts of bnode.p.h into bnode_internal.h
so that inclusion of bnode.h doesn't expose bosserver's internals.
Change-Id: Id58714507211331a57c36eb71c1c3937fff0dd2a
Reviewed-on: http://gerrit.openafs.org/8169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
For Symlinks, always set the Reparse Point attribute and
set the Directory attribute if the target is a directory.
Do not return the file attributes of the target.
Change-Id: I72dcde912c998e1ab3eea45426d019314e10e740
Reviewed-on: http://gerrit.openafs.org/8171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe
with regards to directory enumeration show that when Symlink file
information is returned that the "reparse point" data should be
reported along with whether or not the target is a directory.
For mount points, the reparse point file information should always
be returned and the type should always be directory.
The target timestamps, file sizes, etc. should never be returned.
Change-Id: I0f899229061a282d0d218155407ffc4ab62ad377
Reviewed-on: http://gerrit.openafs.org/8170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The process type check in afsredir.sys was performed during the
Process Creation callback which is processed in the context of the
parent process which might not be the same type (32-bit or 64-bit)
as the process being created.
Change-Id: I6ae79a6dacf434a986c7bb0135b2238fcfeeb0cd
Reviewed-on: http://gerrit.openafs.org/8165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
In commit 19f1e0f7cf strdup()
was replaced by xdr_alloc() and memcpy(). Unfortunately,
the patch was wrong and the pointer to which the result of
xdr_alloc() was assigned was overwritten with zero.
Change-Id: I0a9e6c03d67e2a1c811e84808fbbdd39f782ba87
Reviewed-on: http://gerrit.openafs.org/8162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
All callers to AFSDoExtentsMapRegion() hold the ExtentsResource
so there is no need to obtain it again within the function. Instead
add an ASSERT to confirm that the resource is held.
Change-Id: Id34a3d650062d6e519a66732d248c136a92e4be3
Reviewed-on: http://gerrit.openafs.org/8161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions
are helper functions within RDRIoctl.cpp. Make them static
and remove them from the header.
Change-Id: I5f3b68f87701e2d8423a01c236c7cb598c3ff743
Reviewed-on: http://gerrit.openafs.org/8160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The RDR_IoctlWrite and RDR_IoctlRead functions no longer
use the cm_req_t parameter so remove it.
Change-Id: I1c6f09da9e4a386f79dae1c15b0b2ccdce944d51
Reviewed-on: http://gerrit.openafs.org/8159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The cm_req_t structure flags store information related to
the source of the request and whether the process is WOW64 or not.
This information is required for proper pioctl processing. Add
a cm_req_t structure to the RDR_ioctl_t structure and initialize
it in RDR_SetupIoctl() which is called from RDR_PioctlOpen().
Change-Id: I351101f036f63bbb1f0d7b19e9b092b18a3e070e
Reviewed-on: http://gerrit.openafs.org/8158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
on 64-bit Windows, only 32-bit processes have the WOW64 request
type flag set. Reverse the conditional to permit proper evaluation
of the 64-bit sysname list.
Change-Id: I0bbad7b275b836ecaff73c69afdde08e17f310a7
Reviewed-on: http://gerrit.openafs.org/8147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Depending on the version of DKMS, the current MAKE[0] variable in the
dkms.conf needs different numbers of backslashes. Commit 81a9a33e
tried to address this by changing the contents of dkms.conf depending
on whether or not we were on Fedora. However, the change occurred in
DKMS 2.2, so if someone running RHEL tries to use a newer DKMS, this
will fail.
So instead of trying to guess at the level of escaping we need, just
avoid needing to escape anything with backslashes. We can quote the
heredoc marker to avoid variable expansion inside the heredoc, we can
use a case statement instead of using backticks and local variables
and such, and we can use single quotes for the outer MAKE assignment.
With this, we should not need any backslashes when writing dkms.conf,
so we should work with any DKMS version.
Change-Id: I5484826c37da13ee383e08bbfeb473aa993e245e
Reviewed-on: http://gerrit.openafs.org/8156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Casting NULL shouldn't be necessary in most cases. Eliminate this
in favor of shorter lines and consistency. Function pointers, variadic
arguments should still be cast.
Change-Id: Ibcd67378556e45c2b24f7aa85a4d73c72cd88e02
Reviewed-on: http://gerrit.openafs.org/8151
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
StartTime and EndTime are set with gettimeofday(), but are not
used for any calcualtions or statistics, and appear to never have
been used. There are platforms where gettimeofday is expensive,
so remove the variables and the calls.
Change-Id: I9ff8035377227cb07383ffea15b7e04f155e307f
Reviewed-on: http://gerrit.openafs.org/8164
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
instead of reallocing n+1 tokens, we would realloc 1 token
plus N bytes
Change-Id: Idb5a20b5b9becc9d48cb645bbc0bd26459220ccd
Reviewed-on: http://gerrit.openafs.org/8163
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Allow the user to optionally not use encryption (and also allow
user to ensure that encryption is being used).
Change-Id: I3ad590e21f5139654b22c8284ea2634ce902a1b5
Reviewed-on: http://gerrit.openafs.org/8138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
The following exports are added:
libafsauthent:
afsconf_SetExtendedCellInfo
afsconf_PickClientSecObj
afsconf_SawCell
ka_PrintBytes
ka_KeyIsZero
libafsrpc:
initialize_RXK_error_table
Those functions are referenced by the bos code.
Change-Id: I26898070c8e9dc7cac53f13c49dadf28d58457f4
Reviewed-on: http://gerrit.openafs.org/8154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Fix a typo for "interface" in the help text for bosserver.
Change-Id: I042fc52e46f50dd00be9fc9bf62525a0f2755dda
Reviewed-on: http://gerrit.openafs.org/8144
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Make 'wakeup' a static inline function instead of redefining 'wakeup',
so we can use the keyword 'wakeup' elsewhere.
Specifically, 'wakeup' is used in some Linux kernel structures, so
redefining it can confuse some things.
Change-Id: I462903099426b4d2e940e749dd958e03a04f7eb1
Reviewed-on: http://gerrit.openafs.org/8149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Instead of defining the string 'printf' itself, make printf (and
uprintf) variadic macros. This avoids renaming printf to printk for
things like '__attribute__((format(printf,X,Y)))'.
Note that this is Linux-specific; compilers on other platforms may not
support variadic macros.
This avoids many warnings in the Linux kernel module build if we
include Linux headers after AFS headers.
Change-Id: I2b8ed67f25e93f559535e40680ecab6fe7579e9c
Reviewed-on: http://gerrit.openafs.org/8150
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
For Linux, each object in the kernel module needs to be in only one
module for KBUILD_MODNAME. For AFS_RXERRQ_ENV, we pull in some
additional headers that require KBUILD_MODNAME in rx. So, just add a
few more afspag-specific rx objects.
Change-Id: I80b4a8648141856dffce6e26d5c034dffd8dd5cf
Reviewed-on: http://gerrit.openafs.org/8113
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
This isn't available in userspace; we don't need it, so just don't
include it at all.
This was introduced in 9cd98379. I had thought it fixed a build
failure, but I believe now I just made a mistake during build.
Change-Id: If97d8e3204b27acd053ec021ddd8cd1527dad3c5
Reviewed-on: http://gerrit.openafs.org/8112
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@your-file-system.com>