Chas Williams (CONTRACTOR) [Fri, 18 May 2012 00:57:38 +0000]
afs: the assert seems to be inverted when using memcache
needvalid will always be 1 for the memory cache -- i.e. the slots are
always valid. see change id I53ea6e99649e4d6d5cbde58929dfcee1d45a3e7b.
Change-Id: Id1294d54cb5f20d226258e5da39fb4d4f782a694
Reviewed-on: http://gerrit.openafs.org/7421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Mark Vitale [Tue, 8 May 2012 19:03:46 +0000]
vos: volume lock not released on convertROtoRW error
If an error occurs during convertROtoRW, the volume lock may
not be released.
Change-Id: Ic03af00676de836cade4e39a743b234a0dc9b6cf
Reviewed-on: http://gerrit.openafs.org/7389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Mark Vitale [Tue, 8 May 2012 18:45:16 +0000]
vos: convertROtoRW does not respect volume lock
vos convertROtoRW was not checking the return code from
ubik_VL_SetLock().
Change-Id: I651c543f9a0070a9d34d9cca7583437e50e95dc8
Reviewed-on: http://gerrit.openafs.org/7388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Fri, 18 May 2012 20:31:19 +0000]
Windows: avoid deadlock TreeLock vs Fcb Resource
Cannot call AFSPerformObjectInvalidate directly because
ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is
held during the sequence
AFSVerifyEntry->AFSValidateDirectoryCache->AFSVerifyDirectoryContent
and AFSPerformObjectInvalidate requires the Fcb->NPFcb->Resource
which must be held prior to the TreeLock.
Change-Id: I337f52e2927c8e5ae2d218867987625c3240a792
Reviewed-on: http://gerrit.openafs.org/7423
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 18 May 2012 14:19:13 +0000]
Windows: buf redir queue mgmt scp can be null
buf_InsertToRedirQueue, buf_RemoveFromRedirQueue, and
buf_MoveToHeadOfRedirQueue can be passed a NULL cm_scache_t pointer.
If the pointer is NULL (as is the case during buf_Init() processing)
the scp->redirMx must not be obtained or a crash will occur.
Change-Id: I157091afd973a8b4789976c42de253831a2698a3
Reviewed-on: http://gerrit.openafs.org/7422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 May 2012 13:52:00 +0000]
Windows: Apply MAX_FID_COUNT to AFS Redirector
Provide consistency between the SMB path parser and the AFS
redirector path processing by using the same constant, MAX_FID_COUNT,
for both. MAX_FID_COUNT is the maximum number of unique file ids
that can exist in a path after all mount points and symlinks have
been expanded. The current value is 512.
Change-Id: Ife1a29ce7c064c986589bc9e2836899864da2f76
Reviewed-on: http://gerrit.openafs.org/7412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 14 May 2012 15:11:57 +0000]
Windows: AFSTearDownExtents may experience active extents
If there are extents with a non-zero ActiveCount when AFSTearDownExtents()
is executed, it must leave them alone and attached to the File Control
Block. This has implications for its callers, especially AFSCleanupFcb()
since it may be the case that a Cleanup cannot be completed.
The AFSPrimaryVolumeWorker thread must therefore check after calling
AFSCleanupFcb() whether or not the Fcb ExtentCount is zero before
calling AFSRemoveFcb().
Change-Id: I164dbe24d2bfe69aba0fcb5d845f66415d5bb0c3
Reviewed-on: http://gerrit.openafs.org/7406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 May 2012 03:27:36 +0000]
Windows: avoid duplicate work cm_Analyze
During VNOVOL processing, if the volume is replicated and the
server reference status is "not busy", set the status to busy
and avoid calling cm_SetServerBusyStatus() because that function
mirrors the loop that is already being processed.
Change-Id: I1c92fd02fecc92c3dcd94a33eb87fe5c2fa254ae
Reviewed-on: http://gerrit.openafs.org/7411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Mark Vitale [Tue, 8 May 2012 14:01:12 +0000]
vos: convertROtoRW may create two RW volumes
If the RW volume is listed after the RO convert target in the VLDB,
the code failed to detect that an RW is already present and would
create a second RW volume.
Change-Id: Ia77004214c4d1b18699b5527bc1fc928e8e1143d
Reviewed-on: http://gerrit.openafs.org/7385
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Tue, 15 May 2012 04:23:17 +0000]
Windows: init section ptrs for pioctl files
FIXES 130783
Change-Id: I809d21d5d30727172d6e1026d99b32466fcc74c6
Reviewed-on: http://gerrit.openafs.org/7407
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 14 May 2012 04:12:17 +0000]
Windows: Redir Ioctl thread safety
A crash dump showed that it is possible for a Cleanup
to race with a Read from the ioctl file. Add reference counting
to protect against crashing under such a circumstance.
Change-Id: I5dada2b5855603807b48a191db46ff48043c1997
Reviewed-on: http://gerrit.openafs.org/7405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 11 May 2012 23:24:54 +0000]
Windows: Permit Media Player to work with mapped drives
Windows Media Player was failing to play media files from
mapped drives if the mapping was to a directory several
levels below \\afs\cellname\. The code to permit SUBST drive
letters to work got in the way during NPGetConnection processing.
Try to get the connection info without the drive substitution
logic. Try again with the drive substitution if the result
is no connection present.
FIXES 130757
Change-Id: I0c2037d1d8f4c6cf82fbff7d4baee995b5124b39
Reviewed-on: http://gerrit.openafs.org/7402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Michael Meffie [Thu, 23 Feb 2012 17:34:44 +0000]
volser: preserve stats over reclones and restores
Optionally, preserve the volume usage statistics instead of clearing
them during reclone and restore operations.
Change-Id: I436b39b129b892912533ddeff5569b07224b075c
Reviewed-on: http://gerrit.openafs.org/3312
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Mark Vitale [Tue, 8 May 2012 16:38:38 +0000]
vos: convertROtoRW misc error reporting problems
Fixes a few inconsistencies and bugs in some error messages.
Change-Id: Ic4971c4cc3a3aa3623ee0f13161fd7793d3acb19
Reviewed-on: http://gerrit.openafs.org/7387
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Simon Wilkinson [Sun, 9 Oct 2011 00:20:57 +0000]
cmd: Add support for pulling options from files
With this change, we gain the ability to set our command line options
from krb5.conf configuration files. This is only available for tools
which are implemented using the new cmd_OptionAs accessor methods.
Callers should load their configuration file using
cmd_OpenConfigFile("/path/to/config/file.conf");
(an addition to libauth to return a path to a system wide
configuration file will be forthcoming)
and then set their command name (for example, "fileserver", "afsd",
"vos" and so on) using
cmd_SetCommandName("mycommand");
The accessor functions will then populate their return values with
either:
a) The command line options, if specified
b) The contents of the tag matching the option name, in the
[command_subcommand] section of the configuration file, if it
exists
c) The contents of the same tag, in the [command] section of the
configuration file, if it that exists.
d) The contents of the same tag in the [defaults] section of the
configuration file.
Callers can also gain access to the entire configuration file by
calling cmd_RawFile, or to just the section corresponding to their
command line by calling cmd_RawSection. Note that when using the file
directly, it is up to callers to preserve consistency by implementing
similar inheritance rules as the above.
Change-Id: Ic501ab296af3638f961486869af79c9ce47b77b8
Reviewed-on: http://gerrit.openafs.org/7135
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Simon Wilkinson [Thu, 10 May 2012 15:51:01 +0000]
tests: Add additional cmd tests
Add additional tests to the libcmd test suite to verify the
behaviour of cmd_OptionPresent and cmd_OptionAsList
Change-Id: I81a235fb5ee87682c72ca942f1341f77be6fda39
Reviewed-on: http://gerrit.openafs.org/7392
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Derrick Brashear [Wed, 18 Apr 2012 15:57:10 +0000]
macos: update AFS prefs pane
modify afshelper to just run what it's told instead
of offering fixed operations. this avoids having a setuid
tool around. in spite of apple's suggestion this is correct,
it's actually more dangerous. instead, elevate privilege only
to run a small set of commands, then drop. allow
unlocking of the prefs pane, but make the menu extra prompt
for authentication when needed.
deactivate controls in the prefs pane when locked.
Change-Id: I0e2510efc98605f464e04d26cc8f2ce2bfe116f4
Reviewed-on: http://gerrit.openafs.org/7196
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Fri, 4 May 2012 22:23:42 +0000]
Call rx_SetNoJumbo earlier
For ubik server processes, rx_SetNoJumbo needs to be called before
ubik initialization for it to effect the communication between
dbservers; otherwise, full database transfers may result in Rx
jumbograms on the wire regardless of the jumbo/nojumbo setting. Move
the call to rx_SetNoJumbo to before ubik initialization to avoid this.
Also move the call to rx_SetNoJumbo to immediately after rx_Init* for
all server processes, for consistency. Move similar calls to
rx_SetMaxMTU for the same reason.
Change-Id: Ic79415829601fcfb4e74e72fbf5711d0c32aaa0c
Reviewed-on: http://gerrit.openafs.org/7350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Mark Vitale [Wed, 2 May 2012 17:55:16 +0000]
DOC: vos convertROtoRW security requirements
They were copied from another command; corrected them.
Change-Id: Ic77f1a91520ec4147e42864438d98942f6a7effc
Reviewed-on: http://gerrit.openafs.org/7305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Ken Dreyer [Fri, 16 Mar 2012 19:37:20 +0000]
doc: add Windows section to fs newcell
fs newcell works slightly differently on Windows. Document the
differences in the man page.
FIXES 125094
Change-Id: I3fb71ebb28290222069d795762f50a82f3fb6495
Reviewed-on: http://gerrit.openafs.org/6919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 3 May 2012 21:36:03 +0000]
vol: Free vol header on attach_volume_header error
In attach_volume_header, make sure we free the volume's header if
we're returning an error. We take care of the locks and i/o handles in
the immediately preceding block, but for an actual error we don't get
rid of the header. Do so.
Noticed by Tom Keiser.
Change-Id: I97e61700f644066ac1a0e6b45a67dd62c5397034
Reviewed-on: http://gerrit.openafs.org/7325
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 22 Apr 2012 14:20:18 +0000]
Make the cmd config file parser build on Windows
Change-Id: Id6c3515869529b6fb5c48a06661b63bed974e436
Reviewed-on: http://gerrit.openafs.org/7141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sun, 9 Oct 2011 00:17:19 +0000]
cmd: Don't expose krb5 error codes
Don't use krb5 error codes in our configuration parser, instead use an
error allocated from the existing cmd error table
Change-Id: I777d9638c676d198d13a3bd33a90acdc53dc26cc
Reviewed-on: http://gerrit.openafs.org/7134
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Russ Allbery [Fri, 11 May 2012 20:28:41 +0000]
Import of code from rra-c-util
This commit updates the code imported from rra-c-util to
3900f94b9b8c46a3cb2d83d73c6cf4b73be1cc10 (release/4.4)
New files are:
m4/krb5-config.m4
Change-Id: I6ef966e4a30cd23feac4a159be2ffeb7357765b7
Reviewed-on: http://gerrit.openafs.org/7401
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Fri, 11 May 2012 20:27:02 +0000]
rra-c-util: Add additional file
Add the m4/krb5-config.m4 file, which is required for version 4.4,
to the list of imports.
Change-Id: Ib5d3d0d7be67eaa75f6edc6d030cdb3c47838d3c
Reviewed-on: http://gerrit.openafs.org/7400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Mon, 7 May 2012 20:52:16 +0000]
tests: Start using the upstream C TAP harness
Instead of bundling our own copies of Russ's C TAP Harness, start using
source pulled from his git repository using the src/external import
mechanism. Note that we are not currently building the floating
point (is_double) portion of the harness.
In the process of doing so, we also upgrade our test harness to the latest
upstream version, 1.11. This is somewhat problematic, as there have been
some significant code changes since the version bundled with OpenAFS.
Work around these by
*) Referencing the basic.h header as <tests/tap/basic.h>, rather than
just <tap/basic.h>, to match the new upstream layout
*) Changing the include path so that the tests/ directory can be
found within it.
Change-Id: I63efbb30248165e5729005b0a791e7eb7afb051d
Reviewed-on: http://gerrit.openafs.org/7374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Russ Allbery [Fri, 11 May 2012 20:16:22 +0000]
Import of code from c-tap-harness
This commit updates the code imported from c-tap-harness to
d3fc03606efc8e76ff34f04470e6133db25a3982 (release/1.12)
New files are:
LICENSE
NEWS
README
tests/runtests.c
tests/tap/basic.c
tests/tap/basic.h
tests/tap/float.c
tests/tap/float.h
tests/tap/libtap.sh
tests/tap/macros.h
Change-Id: I4435bbb240f9db3cf2883cb0711f592f9d865f92
Reviewed-on: http://gerrit.openafs.org/7399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Fri, 11 May 2012 20:14:38 +0000]
c-tap-harness: Fix import paths
Somehow or another, the file list committed as
098e6f141f2234dcd0196096ab6f739db678f746 is missing the tests/
prefix for a number of object files. Reinstate this prefix.
Change-Id: I2b807bf6fb8e5f136aef571e576c036714280b0c
Reviewed-on: http://gerrit.openafs.org/7398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Thu, 10 May 2012 12:36:33 +0000]
Windows: Avoid deadlock during "fs memdump"
When the afs redirector is in use, it is possible that "fs memdump"
could be executed while all of the pages in the Windows page cache
are dirty with data that must be purged and flushed to \\afs. In
such a situation it is not safe for afsd_service.exe to hold
global locks such as buf_globalLock, cm_scacheLock, etc. while
performing WriteFile() calls against %TEMP%\afsd_alloc.log if
afsd_alloc.log was opened without the FILE_FLAG_NO_BUFFERING flag.
Doing so can result in a deadlock as it can become impossible for
the Windows page cache to purge data to complete the WriteFile()
as all extent operations block waiting for the global lock to
be cleared.
The correct long term approach would be to use the FILE_FLAG_NO_BUFFERING
flag when opening %TEMP%\afsd_alloc.log. However, this requires that
all writes to the file be performed using buffers that are consistent
with the drive geometry. Such an approach would be incompatible with
the _CrtMemDumpAllObjectsSince() operation and would require a redesign
of the current interfaces. See
http://msdn.microsoft.com/en-us/library/windows/desktop/
cc644950(v=vs.85).aspx
for requirements when using non-buffered writes.
The short term fix is to dump the contents without holding the
global locks. This can result in an inconsistent view of the world
but will ensure that deadlocks are avoided. This patchset makes
such a change when the afs redirector is in use.
Change-Id: I6ffc0ff7c80707f16bf132f2dcab7dab5727894d
Reviewed-on: http://gerrit.openafs.org/7391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 9 May 2012 14:44:39 +0000]
Windows: cm_GetBuffer do not retry if biod empty
Change-Id: I583a69199b0e3163c3bc5b620543028f2950bfeb
Reviewed-on: http://gerrit.openafs.org/7390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Hartmut Reuter [Mon, 7 May 2012 10:31:15 +0000]
Make it build outside source tree
some missing ${srcdir}/ inserted
Change-Id: I323d4475dcf10bb5753741d611e3869779ff22d9
Reviewed-on: http://gerrit.openafs.org/7383
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Wed, 2 May 2012 17:11:01 +0000]
vol: Remove redundant vop check in GetVolume
VAttachVolumeByVp_r (specifically attach_check_vop in attach2) already
handles checking for conflicting vol ops, and gives us VOFFLINE
appropriately. We don't need to check again in GetVolume.
Change-Id: Ibb93d423d3c856dd957a2569412a85698180ff8e
Reviewed-on: http://gerrit.openafs.org/7304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Tue, 8 May 2012 03:31:02 +0000]
c-tap-harness: add float.h
add float.h to the list of files we import for c-tap-harness from
upstream
Change-Id: I133dd6172bab17ae183cc6fc983f92f19005ba85
Reviewed-on: http://gerrit.openafs.org/7381
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sat, 8 Oct 2011 22:33:37 +0000]
tests: Use enum rather than #defines for tests
Change the command test so that it uses an enum, rather than #defines
for offsets into the parms array. This is mainly a cosmetic change, but
brings the test suite into line with the way that we're doing stuff in
the "real" code.
Change-Id: Ia9d72e13230edd4fe13af52ba6816cf775693c36
Reviewed-on: http://gerrit.openafs.org/7133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Wed, 2 May 2012 17:07:49 +0000]
vol: Pay attention to specialStatus after VAVByVp
attach2/VAttachVolumeByVp_r do not alter the yielded error code
according to specialStatus. So, pay attention to specialStatus after
receiving an error from VAttachVolumeByVp_r, to ensure we respond with
the correct error code.
Change-Id: I59e977dd1f0949f8fe5670c7a52429acbfb7d7e9
Reviewed-on: http://gerrit.openafs.org/7303
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Wed, 2 May 2012 16:38:57 +0000]
vol: Avoid VBUSY/VRESTARTING trick for offline vop
Currently, if GetVolume() finds that the volume we're trying to attach
has a vol op that leaves the volume offline, we do the
VBUSY/VRESTARTING trick as described in CheckVnode(). This doesn't
make any sense for a couple of reasons.
For one, VBUSY/VRESTARTING is not the correct error code to return to
the client when an offline vol op is in progress and vp->specialStatus
is not set everywhere else we yield VOFFLINE.
Additionally, this block of code is only hit once for a particular vol
op. Once we reach this section, the volume is in UNATTACHED state, and
so on the next iteration of GetVolume we will immediately return
VOFFLINE (or specialStatus). So the CheckVnode-like situation is not
applicable, since we are not returning VBUSY to the same client for 15
minutes; we would return VBUSY once and then return VOFFLINE.
Change-Id: I0e8376df7937fd6bd01f9998371b9289c4ad2618
Reviewed-on: http://gerrit.openafs.org/7302
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Mon, 7 May 2012 20:21:26 +0000]
Configure src/external for c-tap-harness
Setup the src/external system so that we can pull in releases of
the C Tap Harness using that mechanism.
Change-Id: I312db7991b037e7bb885c8f93a5c94c793dada30
Reviewed-on: http://gerrit.openafs.org/7372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Mon, 7 May 2012 20:49:34 +0000]
fs: Report default storebehind when errors exist
After
904c9fbe, we no longer print out the default store asynchrony
when any of the supplied paths results in a pioctl error. However, if
just one (or a few) of the paths supplied results in an error (such
as, the path does not exist), this does not prevent us from reporting
the default value.
Instead, keep track of whether or not we have a valid value, and try
to determine the default if we haven't already by the end of
StoreBehindCmd, and print it out.
Change-Id: I16a5faed15141d0bb00ea9b6f991c0a8e404d4d5
Reviewed-on: http://gerrit.openafs.org/7376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Mon, 7 May 2012 15:35:07 +0000]
Windows: cleanup redirector pipes
If pipe creation fails, cleanup the mess.
At shutdown, if there are pipes that have not been closed by
Windows, clean them up.
This is just to ensure that at shutdown the reference counts of
cm_scache_t objects in the cache are reset to zero.
Change-Id: I1d738c31faafce445f05adc4884c7711123589e2
Reviewed-on: http://gerrit.openafs.org/7366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 7 May 2012 04:56:11 +0000]
Windows: Correct refcount leak
The new duplicate avoidance code in cm_QueueBKGRequest() leaked
a cm_scache_t and a cm_user_t reference count.
Change-Id: Iceaf32a8d20cf350024fe40e3185c723f6203676
Reviewed-on: http://gerrit.openafs.org/7365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 7 May 2012 04:54:27 +0000]
Windows: fix build with DEBUG_REFCOUNT
cm_GetSCache added a new parameter. The same parameter is required
for the cm_GetSCache macro when DEBUG_REFCOUNT is defined at build
time.
Change-Id: Id198cdf845b8339259716d4a61c0347c33ffd83d
Reviewed-on: http://gerrit.openafs.org/7364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 6 May 2012 23:31:03 +0000]
Windows: Checksum server lists on Volume Errors
For VMOVED, VNOVOL and VOFFLINE checksum the server lists for
the current volume. If the server list changes as a result of
the forced volume location update, do not set the updated flag
which prevents subsequent volume location updates for the current
cm_req object.
This combined with the previous patchset to filter volume locations
based upon the VLSF_NEWREPSITE flag will avoid outages during
vos release operations.
Change-Id: I39e6981b9fac5ed0dfd900e09474df43cb72feec
Reviewed-on: http://gerrit.openafs.org/7361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 6 May 2012 13:54:55 +0000]
Windows: cm_SetServerBusyState use cm_ServerEqual
When the busy state of a server is set it must apply to all
server references if the server is multi-homed. Use cm_ServerEqual()
to do so.
Change-Id: I76c07746eb396af988a5270804e221e7a641db66
Reviewed-on: http://gerrit.openafs.org/7355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 6 May 2012 01:37:00 +0000]
Windows: Track Mixed RO Volume Release State
If the volume location information indicates that a replica site
is VLSF_NEWREPSITE then it implies that some of the replicas are
out of date. Ignore the out of date replicas when constructing
the list and force a volume location list reset every five minutes
while the replica site info is mixed.
Change-Id: I136e66b1d2da66578970932553d14f59a666721b
Reviewed-on: http://gerrit.openafs.org/7354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 6 May 2012 00:46:08 +0000]
Windows: Make CM resilient to transient VNOVOL
The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which
are no indicative of the volume not being present. For example,
VNOVOL can be sent during a transition to a VBUSY state prior to
salvaging or when cloning a .backup volume instance. As a result
the cache manager must attempt at least one retry when a VNOVOL is
receive but there are no changes to the volume location information.
This patchset records the VNOVOL error in the cm_req_t structure
If the volume is replicated, the volume's server reference into a busy state.
If the volume is not replicated, the thread is paused for two seconds.
In both cases, the request is retried. If the VNOVOL error is received
a second time from the same server, the volume server reference is
deleted as before. This is done to prevent repeated requests to the
VLDB server and the file server that are expected to fail. The server
reference will be restored to the volume on the next volume location
update.
Change-Id: Ica51f853683f80cb17c804cdc216f7a113cca60a
Reviewed-on: http://gerrit.openafs.org/7353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 5 May 2012 23:11:07 +0000]
Windows: cm_GetNewSCache drop lock to permit change
In cm_GetNewSCache the entire LRU queue is searched for a
cm_scache_t object that is safe to recycle. If none are the LRU
queue was immediately searched again without dropping the
cm_scacheLock or taking a pause. As a result it is quite possible
that a thread about to release a cm_scache_t was blocked from
doing so.
This patchset factors some of the logic a bit differently to
improve readability and adds new log messages to help diagnose
the cause of a problem if no cm_scache_t ever becomes available.
Change-Id: Ica6ebee0ce0456e879ae7188d9c8cdc935a92e5b
Reviewed-on: http://gerrit.openafs.org/7352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 5 May 2012 17:50:36 +0000]
Windows: Remove dead code in AFSRead.cpp
Change-Id: I9ebaf0a43b0b14c11fc7d1b0935a8d436e70e900
Reviewed-on: http://gerrit.openafs.org/7351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Fri, 4 May 2012 22:13:32 +0000]
ubik: Initialize ubik_callPortal earlier
As of
7caf4143, we call ubeacon_InitServerList* before ubik_callPortal
is set, causing Rx connections to be created to port 0, causing
various problems with communicating with other sites. Initialize
ubik_callPortal to the correct value before calling any such
functions, so we create connections to the right port.
Change-Id: I37dbf575bcdec10463c7b6006738678096a92573
Reviewed-on: http://gerrit.openafs.org/7349
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Fri, 4 May 2012 00:01:22 +0000]
Windows: FCB cleanup must be done before ObjectInfo
When processing the cleanup and destruction of a File Control Block
the related ObjectInfoCB is required for proper cleanup. Reorganize
the AFSPrimaryVolumeWorkerThread logic to ensure that this is true.
This involves dropping the VolumeCB->ObjectInfoTree.TreeLock around
the AFSCleanupFcb() call. While the lock is released it is possible
for the ObjectInfoCB->OpenReferenceCount to change. Therefore, new
checks must be added after the lock is re-acquired to ensure that
an in-use object is not destroyed.
Change-Id: I6b26fb2fe1ef4077c6edd643ec40715c8e2928ac
Reviewed-on: http://gerrit.openafs.org/7327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 3 May 2012 23:58:31 +0000]
Windows: AFSInitFcb STATUS_REPARSE cleanup
If a race is detected when creating a new File Control Block in
AFSInitFcb() the Fcb Header must be torn down and the ExtentsResource
and DirtyExtentsListLock must be deleted prior to freeing the pool
memory.
Change-Id: I3c3f45aed26ea62b4d20e5c5e80d1237d96c912c
Reviewed-on: http://gerrit.openafs.org/7326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 22:20:45 +0000]
Windows: cm_BkgFetch do not impose arbitrary timeout
The afs redirector will queue extent requests for the entire file
if it is being copied to local disk as long as there is enough
page cache space to store it. If the file is 8GB and the bandwidth
from the file server is 100K/second it may take a while to get to
the end of the request queue. Do not arbitrarily time out the
requests.
Change-Id: I12d9358ee5de37fc78d68c8e07dd14ca5dda1832
Reviewed-on: http://gerrit.openafs.org/7320
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 22:05:26 +0000]
Windows: Treat all cached writes as write-through
Treat all writes that are cached in the windows page cache as
write-through requests so that they are delivered immediately to
the AFS cache.
The upside is that the afsd service can begin to store data to the
file server immediately which can be of significant importance whe
the AFSCache is larger than the file size and the file size is large
and the bandwidth to the file server is slow. In that situation
the entire file can be written into the windows page cache and
will only be flushed to disk at the last handle close on the file.
The downside is that all data will be written to the file server
including that for files that will later have the delete pending
flag applied.
Change-Id: Icff536f9ec768068692c1e024a943448409e7e40
Reviewed-on: http://gerrit.openafs.org/7319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 22:04:23 +0000]
Windows: AFSQueueFlushExtents permit NULL AuthGroup
If the AuthGroup is NULL, search for an AuthGroup to use when
queuing the flush extents request.
Change-Id: Ie77f292dd992c4f8621434cecc70c7633de60320
Reviewed-on: http://gerrit.openafs.org/7318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 22:02:28 +0000]
Windows: refactor AFSCleanupFcb
move the checks for deleted and invalid files earlier in the
function to simplify other conditional tests.
Change-Id: I973f411b65c0327227f07718ae764572d6f37c85
Reviewed-on: http://gerrit.openafs.org/7317
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 22:01:31 +0000]
Windows: correct typos or mistaken comments
Change-Id: Iae278c0121c1b4d3cc9aaab276fab798c1a8065b
Reviewed-on: http://gerrit.openafs.org/7316
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 21:58:39 +0000]
Windows: RDR_RequestFileExtentsAsync set current DV
if the buffer returned from cm_GetBuffer() has an offset that is
beyond the serverLength and it has a "bad" data version, set the
data version to the current value. This is for debugging clarity.
Change-Id: Icb3ee4accd0219a41813c44428070248245f2549
Reviewed-on: http://gerrit.openafs.org/7315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 21:52:44 +0000]
Windows: refactor cm_GetBuffer avoid BIOD construction
Constructing a BIOD is a very expensive operation as it requires
obtaining exclusive locks on each and every buffer that in the
collection. The prior code would construct a BIOD for a chunk
worth of buffers and then check to see if the current buffer is
beyond the serverLength or the truncation position. If so, the
buffer is cleared and the buffer is returned as current after
releasing the BIOD. This is very wasteful. Instead, check every
buffer in the BIOD to see if it should be made current or not.
If yes, do so before releasing the BIOD. This permits the construction
of the BIOD to be avoided for the rest of the buffers in the chunk.
Change-Id: I0a413f8be9686cd0e326a3ea3608ca954cdf4370
Reviewed-on: http://gerrit.openafs.org/7314
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 21:47:46 +0000]
Windows: cm_InitDaemon initialize cm_bkgQueueCountp[]
Change-Id: Ie4abd1c26d54208921a78e421b447a8f4fc5684a
Reviewed-on: http://gerrit.openafs.org/7313
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 21:42:59 +0000]
Windows: cm_QueueBKGRequest improvements
Do not add duplicate requests into the queue. Outstanding extent requests
will be re-issued by the afs redirector on a periodic basis while
waiting for them to be satisfied. If they are pending there is no
need to remember them a second time.
Use separate queues for Fetch and Store operations. Store operations
might be blocked on the file server but a Fetch operation might be served
from the cache.
Change-Id: I8e15c71275921c9a062944d52bf97a0ba68fe430
Reviewed-on: http://gerrit.openafs.org/7312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 21:39:12 +0000]
Windows: buf_GetNewLocked skip redirector owned buffers
If a buffer is owned by the afs redirector, regardless of whether
or not it is dirty, do not use it.
Change-Id: Icc92f3cb8606ac67bcf561d409c76bd5a4a7bc06
Reviewed-on: http://gerrit.openafs.org/7311
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 20:57:11 +0000]
Windows: buf_RemoveFromRedirQueue in buf_Init
use buf_RemoveFromRedirQueue in buf_Init instead of the roughly
duplicated code.
Change-Id: Ibf070d3e44f7a0749d1046c9d1168bdfb9aa6f2b
Reviewed-on: http://gerrit.openafs.org/7310
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 2 May 2012 18:32:01 +0000]
Windows: AFSInitializeProcessCB failure stack exhaustion
If AFSInitializeProcessCB() fails in AFSProcessCreate() it can
lead to a recursive loop of AFSValidateProcessEntry() ->
AFSProcessCreate() calls. Only call AFSValidateProcessEntry()
if AFSInitializeProcessCB() succeeds. On failure, log an error
to the trace log.
Change-Id: I67a65bed9a3193a5ce44eb01d30aed15fe9e469d
Reviewed-on: http://gerrit.openafs.org/7309
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 30 Apr 2012 10:22:41 +0000]
Windows: More useful AFSDumpFile exception info
Modify AFSExceptionFilter to accept the __FUNCTION__ name
where the exception occurred.
Generate the trace dump file after the exception has been
handled so that it is possible to see where it happened
in the trace output.
Change-Id: Icddafc1066dd85b63d8d97c40c0f76c54d181ebe
Reviewed-on: http://gerrit.openafs.org/7308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 30 Apr 2012 10:18:58 +0000]
Windows: VNOSERVICE error translation
Translate VNOSERVICE as CM_ERROR_RETRY and not CM_ERROR_OFFLINE.
Change-Id: I6daf9b9fb607192cedc057c518137772a7eb1bab
Reviewed-on: http://gerrit.openafs.org/7307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 30 Apr 2012 10:18:06 +0000]
Windows: VNOSERVICE message text
correct message text to indicate that an rpc has not been serviced.
Change-Id: Id2d82756253136ae6221aa2227be64bf654ee36e
Reviewed-on: http://gerrit.openafs.org/7306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 29 Apr 2012 14:31:07 +0000]
Windows: reorg RDR_CleanupFile to prevent lock leak
RDR_CleanupFile could fail to drop a file lock if the user does
not have write permission on last handle close even if the file
is readonly or there were no dirty extents to be stored. The
error handling would return the error immediately and skip the
file lock release. This patchset changes the logic so that the
user permissions are not tested if the file is located on a readonly
volume or if there are no dirty extents or metadata changes to store.
In addition, if there is an error, skip to unlock processing and
not to function exit processing.
Change-Id: I03f8cbbae5ead2a66ce261631e7e34dd533de930
Reviewed-on: http://gerrit.openafs.org/7292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 May 2012 19:57:08 +0000]
vos: Default to server confdir for -localauth
For -localauth, we traditionally default to using the server
configuration directory, since that's usually the dir that has the
KeyFile in it. Keep doing that with the new ubik client interface.
Change-Id: I0f7e1ed180874f52c2b91b1ea3f74e763c26cd0c
Reviewed-on: http://gerrit.openafs.org/7324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 3 May 2012 19:55:39 +0000]
vos: Correct comment
This is -localauth, not -serverauth
Change-Id: I8337c231905a5424b5a91b0ed981adade64ca144
Reviewed-on: http://gerrit.openafs.org/7323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 3 May 2012 17:40:40 +0000]
vos setaddrs: notice unexpected errors
Currently 'vos setaddrs' only prints a message and errors out if the
VL_RegisterAddrs call fails with certain error codes (VL_MULTIPADDR
and RXGEN_OPCODE). But if we get something else like an access error,
we should of course print that out, instead of reporting success.
Change-Id: Id90c65604289651d9f20fb1ab2c706446162f324
Reviewed-on: http://gerrit.openafs.org/7322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Wed, 11 Apr 2012 19:34:29 +0000]
volinfo: show header filenames even if error
When invoked with -header option, print the header inode
number, and namei filename, even if the header file cannot
be opened.
Change-Id: Id2a2e63f07e12cd817718a9da63d24250718ae06
Reviewed-on: http://gerrit.openafs.org/7190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Tue, 17 Apr 2012 02:29:24 +0000]
bozo: increase salvage instance poll rate
Increase the bos client poll rate of the salvager temporary bnode
instance status, from every 5 seconds to 1 second. This reduces the
minimum time bos salvage takes, from 5 seconds to 1 second, which
can add up when doing a large number of volume salvages.
Change-Id: Ia0f48bfabae9442ab0f1b4a6f43df34699892f66
Reviewed-on: http://gerrit.openafs.org/7231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Thu, 3 May 2012 02:32:22 +0000]
Revert "viced: avoid crash if missing volume header"
This reverts commit
2b40e6d2abbf842e6823661b94cfa9aa833b9990
Change-Id: I9df0fd4fa6232286babdf64da54d491d2ec1e91a
Reviewed-on: http://gerrit.openafs.org/7321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Tue, 1 May 2012 14:09:44 +0000]
viced: avoid crash if missing volume header
Avoid a fileserver crash if the volume header is
missing in SetVolumeSync.
Change-Id: I509081306402fc7147d0624aa1181330b9fa9fc5
Reviewed-on: http://gerrit.openafs.org/7301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Mon, 23 Apr 2012 18:42:24 +0000]
libafs: log server errors on hard mount retry
Save the last errors seen during a request and log those
errors if a hard-mount retry is done.
Change-Id: I65e41207c5f667c41c7f9cf459243118e5baa074
Reviewed-on: http://gerrit.openafs.org/7275
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Jeffrey Altman [Sun, 29 Apr 2012 14:40:31 +0000]
Windows: Cc FileObject Settings
Modify the assigned CcSetReadAheadGranularity() from 64K to
the afsd_service configured chunk size.
Assign a CcSetDirtyPageThreshold() to be twice the configured chunk size.
Change-Id: I1cfa67612058cf5e08906e369236d0d8a48c54f0
Reviewed-on: http://gerrit.openafs.org/7294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 29 Apr 2012 14:37:35 +0000]
Windows: correct cm_Analyze log message
A VNOSERVICE log message takes three parameters and not one.
Use the correct log macro.
Change-Id: Iedb5e568b7ac39c061c0b70738a5c7ac670d9687
Reviewed-on: http://gerrit.openafs.org/7293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 27 Apr 2012 12:54:56 +0000]
Windows: remove unnecessary libs from aklog/asetkey
Unnecessary lwp libs were linked into the aklog/asetkey binaries
on Windows. lwp and pthread should not be mixed.
Change-Id: I53deed9ab210b8ccb394e754c66e15f35dfe89c2
Reviewed-on: http://gerrit.openafs.org/7289
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 26 Apr 2012 00:16:22 +0000]
Windows: Remove High Security Integrated Logon
High security mode for integrated logon never was high security.
It use was deprecated in the 1.5 series and it has no use at all
in the afs redirector world. Remove it.
FIXES: 21702
Change-Id: I019b4fecc430517d29195e79e39529a782c88073
Reviewed-on: http://gerrit.openafs.org/7285
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 25 Apr 2012 22:05:01 +0000]
Windows: fs getcacheparms
The get cache params output is supposed to include two values:
. the size of the cache
. the size of the cache in use
Windows no longer has a concept of an unused cache buffer. All
buffers are inserted onto the freelist and are available for
recycling when the AFSCache file is created. Instead of reporting
the used cache space as 0K, report it as the full cache in use.
It is likely to disturb users less.
Change-Id: I6c1475f26e561d245bfa2b658c77ba683f735bb5
Reviewed-on: http://gerrit.openafs.org/7284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Michael Meffie [Sun, 29 Apr 2012 03:46:26 +0000]
doxygenize afs_analyze
Change-Id: Idb5d873a0c2727928f80364aa5e99e48c05649ad
Reviewed-on: http://gerrit.openafs.org/7291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Fri, 27 Apr 2012 17:59:25 +0000]
vol: A GOING_OFFLINE volume should yield VOFFLINE
Currently, GetVolume treats a volume in the VOL_STATE_GOING_OFFLINE
state the same as VOL_STATE_SHUTTING_DOWN, and so returns VNOVOL for a
GOING_OFFLINE volume, but these states are very different.
GOING_OFFLINE indicates that a volume should soon be in the UNATTACHED
state, so we should treat GOING_OFFLINE the same as UNATTACHED for
returning errors to the user. For UNATTACHED, we return specialStatus
if it's set, or VOFFLINE otherwise; so, just do the same for
GOING_OFFLINE.
Change-Id: Ia9500d2cfd90b8c15782a06025f39298810d0a99
Reviewed-on: http://gerrit.openafs.org/7290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Thu, 26 Apr 2012 13:24:25 +0000]
libafs: don't crash on no addresses in afs_Conn
we try to avoid a crash on a missing serverHost; do the same
on missing addrs in that host
FIXES 130714
Change-Id: Ic6bab8654cf7bf85351a9482b9ba5d51e5a768d5
Reviewed-on: http://gerrit.openafs.org/7287
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Tue, 24 Apr 2012 19:41:39 +0000]
Windows: AFSValidateEntry CcPurge on DV change
The variable bPurgeExtents was not being set when a DV change
was detected in AFSValidateEntry(). This resulted in the purge
being skipped and old data being left in the cache.
Change-Id: I6f5a35e5c7a51d28267e0ff25318782a766771ac
Reviewed-on: http://gerrit.openafs.org/7280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 24 Apr 2012 00:18:20 +0000]
Windows: Directory validation should purge data changes immediately
During AFSEnumerateDirectory() and AFSVerifyDirectoryContent() calls
use AFSPerformObjectInvalidate() instead of AFSInvalidateObject()
to trigger the data purge. This is necessary to avoid a race as
AFSInvalidateObject() will queue a work request that will be performed
after the metadata is updated.
Change-Id: Iaf09c6448927a037175cb4a83502fd4a1d210ef2
Reviewed-on: http://gerrit.openafs.org/7279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 24 Apr 2012 00:08:47 +0000]
Windows: Flag purge on close if CcPurgeCacheSection fails
CcPurgeCacheSection can fail. If it does, remember that the
purge still needs to be performed by setting the
AFS_FCB_FLAG_PURGE_ON_CLOSE flag on the File Control Block.
Change-Id: I83fab09ed5c506879e219606f8b10fdd7c021204
Reviewed-on: http://gerrit.openafs.org/7278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Derrick Brashear [Mon, 23 Apr 2012 02:45:09 +0000]
macos: remove mistyped vnode warning
newborn vnodes are corrected if needed; don't worry about it.
Change-Id: I3bc4d6e9a467a8e09a3a77e027254f0da1448f80
Reviewed-on: http://gerrit.openafs.org/7270
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 22 Apr 2012 17:19:07 +0000]
tests: More fixes for the vos test
The vos test wasn't running correctly from runtests, as it contained
a relative path which assumed that the CWD was tests/volser, rather
than tests/
Modify this to use the BUILD environment variable when invoked from
runtests, and also add an exit after the exec(), so that if we do
fail to launch the binary we don't have two processes both running
the same code.
Change-Id: I7b2d7e6a517e9e9f74f15803da7507037671226a
Reviewed-on: http://gerrit.openafs.org/7265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Wed, 18 Apr 2012 15:58:52 +0000]
libafs: stop bkg first
because background daemons can have dependence on other subsystems, but
are not needed for other operations, stop them first.
Change-Id: If65cf922b84cfca7b8c5d7b7a2d571bfe1e5ff12
Reviewed-on: http://gerrit.openafs.org/7246
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Wed, 18 Apr 2012 15:58:03 +0000]
macos: lock module against unload during shutdown
during shutdown, once umount finished, it was possible to
unload the module before shutdown completed. fix that.
Change-Id: I7eae5210ec9553fa862d96148f963dcdfee79c4b
Reviewed-on: http://gerrit.openafs.org/7245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Thu, 19 Apr 2012 11:14:16 +0000]
Windows: Add global root to name array if share name
If the share name was resolved by querying the service instead
of finding the entry in the root.afs root directory, construct
a name array in AFSParseName() that includes the AFSGlobalRoot
above the resolved share root directory.
In AFSBackupEntry, check for the case where two volume root entries
appear in sequence without an intervening mount point.
Change-Id: Ied0e0dc8226b0460d85a1f3a8b389294cfdef34b
Reviewed-on: http://gerrit.openafs.org/7252
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 19 Apr 2012 09:14:51 +0000]
Windows: cm_ResetACLCache handle NULL cellp
It is valid for the cellp parameter to be NULL. When invalidating
all ACLs for a user pass 0 to cm_EAccesClearUserEntries().
FIXES 130704
Change-Id: Ic6b6e5f1c2e10aa633390ee3d7c709dc202bbd29
Reviewed-on: http://gerrit.openafs.org/7251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 18 Apr 2012 21:26:00 +0000]
Windows: reverse order of EACCESS and USER locks
The user lock is obtain while holding the eaccess lock.
Reflect it in the hierarchy.
Change-Id: I3aac945287415cd3babbe52f9fdeb93ab4d729bd
Reviewed-on: http://gerrit.openafs.org/7247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 21 Apr 2012 20:08:13 +0000]
ptserver: Complete pr_realmName removal
Commit
9ddf9eca56e02be978ff7d065ee16c85de2cfb06 changed the mechanism
by which the local realm is determined such that pr_realmName is
no longer required.
Tidy things up by removing the unecessary variable.
Change-Id: I9b21340a8ecd38fbb8326dbed276882c9f0e9a62
Reviewed-on: http://gerrit.openafs.org/7266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Michael Meffie [Thu, 19 Apr 2012 19:15:04 +0000]
configure: solariscc check update
Add checks for recent versions of sunstudio for solaris. The
installation paths are documented in the release notes of versions
12.1, 12.2, and 12.3.
Change-Id: Ic28f40a061f288a1c39acb6a5d11e81876631d7f
Reviewed-on: http://gerrit.openafs.org/7253
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sat, 21 Apr 2012 10:25:25 +0000]
rx_identity: Add a super user value
Add an RX identity type that can be used to represent the super user
who is granted access using printed tickets.
Change-Id: I3d6e657a04136746b502efa7698901225410f3c0
Reviewed-on: http://gerrit.openafs.org/7261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sat, 21 Apr 2012 10:24:25 +0000]
rx: Make identity and opaque usable with NULL vals
Make it possible to have NULL values for elements of the rx_identity
and rx_opaque structures.
Change-Id: I3624d490d92da3cf75da5edb91c7d4e5ce1fa937
Reviewed-on: http://gerrit.openafs.org/7260
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Fri, 20 Apr 2012 17:13:30 +0000]
tests: Move token faking code to its own file
Move the token faking code out of superuser-t.c into its own file in
tests/common, so it can be used by other tests.
Change-Id: I7b420250ef974b4b80a8dde692d2666657bb82ca
Reviewed-on: http://gerrit.openafs.org/7259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Fri, 20 Apr 2012 14:36:29 +0000]
tests: Make afstest_StopVLServer generic
The StopVLServer function can be used to stop any server for which
we know the pid. So, rename it as afstest_StopServer to make this
apparent.
Change-Id: Ia5973342e81dc15a698e84e69b314cd6157831f7
Reviewed-on: http://gerrit.openafs.org/7258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Fri, 20 Apr 2012 14:34:26 +0000]
tests: Abstract out code to produce a Ubik client
Abstract out the code which the volser test uses to produce a
ubik client so that it can be used to test other ubik services
Change-Id: I800fda9e53ad45c91f3de8eceea387cc011dda3c
Reviewed-on: http://gerrit.openafs.org/7257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sat, 21 Apr 2012 06:43:59 +0000]
ptserver: Refactor per-call ubik initialisation
The way in which the ubik database is initialised is identical for
all read transactions, and for all write transactions. Rather than
duplicating this code in each call handler, pull it out into two
helper functions - ReadPreamble and WritePreamble.
Change-Id: I40f2d8d609bc4e6e8e3e0fc8851da86978c77818
Reviewed-on: http://gerrit.openafs.org/7256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>