Commit Graph

10248 Commits

Author SHA1 Message Date
Jeffrey Altman
345d643729 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>
2012-05-06 08:52:42 -07:00
Jeffrey Altman
193a56aa66 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>
2012-05-06 08:42:37 -07:00
Jeffrey Altman
1af906799b 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>
2012-05-06 08:42:18 -07:00
Jeffrey Altman
46c1f1391b 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>
2012-05-06 08:42:00 -07:00
Jeffrey Altman
dbab42ca72 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>
2012-05-06 08:41:06 -07:00
Andrew Deason
4cdb94dbc4 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>
2012-05-04 17:30:32 -07:00
Jeffrey Altman
f76cf9a3fb 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>
2012-05-04 10:27:53 -07:00
Jeffrey Altman
e691a757d6 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>
2012-05-04 10:27:41 -07:00
Jeffrey Altman
f12a20e227 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>
2012-05-04 10:27:22 -07:00
Jeffrey Altman
b12a038b48 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>
2012-05-04 10:27:07 -07:00
Jeffrey Altman
0fb70aab0e 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>
2012-05-04 10:26:50 -07:00
Jeffrey Altman
ba8e60d70a 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>
2012-05-04 10:26:35 -07:00
Jeffrey Altman
23bec3fe9f 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>
2012-05-04 10:26:21 -07:00
Jeffrey Altman
f86b17ab2b 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>
2012-05-04 10:26:04 -07:00
Jeffrey Altman
a7fec07348 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>
2012-05-04 10:25:53 -07:00
Jeffrey Altman
6b602e59af 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>
2012-05-04 10:25:06 -07:00
Jeffrey Altman
b750d82a84 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>
2012-05-04 10:24:54 -07:00
Jeffrey Altman
ce7fe9ccfb 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>
2012-05-04 10:24:42 -07:00
Jeffrey Altman
fcf1079f58 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>
2012-05-04 10:24:29 -07:00
Jeffrey Altman
2246e7887c 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>
2012-05-04 10:24:15 -07:00
Jeffrey Altman
ad5916d19f 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>
2012-05-04 10:24:00 -07:00
Jeffrey Altman
f70a12adef 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>
2012-05-04 10:23:40 -07:00
Jeffrey Altman
c87fe04a61 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>
2012-05-04 10:23:26 -07:00
Jeffrey Altman
50752e2f60 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>
2012-05-04 10:22:59 -07:00
Andrew Deason
f19e9d7246 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>
2012-05-04 08:36:29 -07:00
Andrew Deason
d206783e0d 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>
2012-05-04 08:34:03 -07:00
Andrew Deason
663185d62d 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>
2012-05-04 08:33:46 -07:00
Michael Meffie
b71f4ffa7c 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>
2012-05-04 08:33:10 -07:00
Michael Meffie
2460e132a9 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>
2012-05-04 08:32:48 -07:00
Jeffrey Altman
200a02f69a Revert "viced: avoid crash if missing volume header"
This reverts commit 2b40e6d2ab

Change-Id: I9df0fd4fa6232286babdf64da54d491d2ec1e91a
Reviewed-on: http://gerrit.openafs.org/7321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-05-03 03:46:55 -07:00
Michael Meffie
ae5ad93799 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>
2012-05-01 08:04:01 -07:00
Michael Meffie
94a8ce970d 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>
2012-05-01 00:14:33 -07:00
Jeffrey Altman
07ff10c7fc 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>
2012-04-29 12:38:09 -07:00
Jeffrey Altman
cf0d53b06a 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>
2012-04-29 12:37:54 -07:00
Jeffrey Altman
a400f2a8a0 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>
2012-04-29 12:32:03 -07:00
Jeffrey Altman
2a83f03100 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>
2012-04-29 12:31:46 -07:00
Jeffrey Altman
7d0a0b66cc 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>
2012-04-29 12:31:25 -07:00
Michael Meffie
8095503bc1 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>
2012-04-29 08:04:48 -07:00
Andrew Deason
d10f71d44f 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>
2012-04-27 21:46:34 -07:00
Derrick Brashear
868378cc00 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>
2012-04-26 08:37:16 -07:00
Jeffrey Altman
229131ab12 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>
2012-04-24 18:37:32 -07:00
Jeffrey Altman
d4c9cbc75e 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>
2012-04-24 18:37:11 -07:00
Jeffrey Altman
76f2e07fd0 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>
2012-04-24 18:36:35 -07:00
Derrick Brashear
be1f110f3e 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>
2012-04-23 05:23:53 -07:00
Simon Wilkinson
7e7a4ff328 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>
2012-04-22 18:49:58 -07:00
Derrick Brashear
e3c93b87b7 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>
2012-04-22 18:49:30 -07:00
Derrick Brashear
a08f9baa76 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>
2012-04-22 18:49:11 -07:00
Jeffrey Altman
749cb03e3c 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>
2012-04-22 16:26:04 -07:00
Jeffrey Altman
9dce9e2461 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>
2012-04-22 16:24:17 -07:00
Jeffrey Altman
d55a767287 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>
2012-04-22 16:23:44 -07:00