Jeffrey Altman [Fri, 18 Nov 2011 17:12:22 +0000]
Windows: Version 1.7.2a (1.7.0201)
Change-Id: I851e400e18907db5a3fc490838c0b275ced5e2af
Reviewed-on: http://gerrit.openafs.org/6077
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 18 Nov 2011 14:54:43 +0000]
Windows: RDR_RequestFileExtentsAsync unheld lock
commit
55f5f356af2ef884413bd656f100055741ae871b forgot to remove
a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync().
Reviewed-on: http://gerrit.openafs.org/6075
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
8ce811e34379615f942e9ca73d1ba78bfe742042)
Change-Id: Iae6202820f80637909b053b89a7f3ea79fb4ebdf
Reviewed-on: http://gerrit.openafs.org/6076
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 18 Nov 2011 05:39:24 +0000]
Windows: must obtain and release an actual lock
Reviewed-on: http://gerrit.openafs.org/6072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
ac1251ead12434a12fb8e7d6787845f534565039)
Change-Id: Ie5b3823e7a1fbb4d384d40d42eae78e79fa84a88
Reviewed-on: http://gerrit.openafs.org/6074
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 17 Nov 2011 05:30:24 +0000]
Windows: non-release only worker threads can release
There are two classes of worker threads created by the service
and donated to the afsredir as part of the reverse ioctl processing
model. Normal workers can process any kind of ioctl and Release
Only workers that can only process release extent events.
Use a KeWaitForMultipleEvents in the normal worker case to permit
processing any type of event. The previous implementation excluded
release extent ioctls from the normal workers.
Reviewed-on: http://gerrit.openafs.org/6071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
1379fb6de4d2134160fcc95cbbee4bd6048eaeaa)
Change-Id: Ifc04af699cdea776e56f5f8a64b5372e79c969a1
Reviewed-on: http://gerrit.openafs.org/6073
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 19:06:36 +0000]
Windows: Version 1.7.2 (1.7.0200)
Change-Id: I0172a96f0c68bd4b5e069c333942eb79c7fa38f1
Reviewed-on: http://gerrit.openafs.org/6070
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 19:01:11 +0000]
Windows: 1.7.2 Change Log
Change-Id: I976c821e80343f85c5f41a033adb7ee41f285dd5
Reviewed-on: http://gerrit.openafs.org/6069
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 05:29:34 +0000]
auth: initKeys before first error exit path
In afsconf_OpenInternal() _afsconf_InitKeys() must be called
before the first opportunity to call afsconf_CloseInternal()
or a crash can occur if the CellServDB file cannot be parsed.
Reviewed-on: http://gerrit.openafs.org/6059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
833d076e04ac09270a203a9ff449ae2af8bdad7e)
Change-Id: Id9a734e896c663f3159de6f38744df98343bf77a
Reviewed-on: http://gerrit.openafs.org/6068
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 15:33:41 +0000]
Windows: Do not install IBM AFS HLP files
The IBM AFS HLP files are so out of date at this point
that they are simply confusing. They reference tools and screens
that no longer exist and claim the product is "IBM AFS". Incorrect
documentation is worse than no documentation.
The HLP files cannot be updated since we do not have the sources.
HLP file format is no longer supported on Windows Vista or 7.
The afs-nt.hlp file will continue to be installed conditionally
when afscreds.exe is installed but the shortcut to it in the
Start menu is being removed. afscreds.exe is not installed by
default.
Reviewed-on: http://gerrit.openafs.org/6065
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
1c97c04add6639a11e88d412e369771bf6f0f281)
Change-Id: Ia3dcda194d8ec7b2253d3c7023c766d61ce567bb
Reviewed-on: http://gerrit.openafs.org/6066
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 15 Nov 2011 23:35:26 +0000]
Windows: buf_CleanAsyncLocked dirty range only
buf_CleanAsyncLocked() should not instruct cm_BufWrite() to
write a full chunk if the current buffer is the only one that
is dirty. cm_BufWrite() will determine if it is appropriate
to fill a full chunk when storing. Instructing it to check
a full chunk forces it to do more work than necessary.
Reviewed-on: http://gerrit.openafs.org/6054
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
fd42e08bf1882a02c3200e1c33a101e644aa046a)
Change-Id: I4fadbf00ac2adb3dd1ce78118d4fe5170156d501
Reviewed-on: http://gerrit.openafs.org/6064
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 15 Nov 2011 23:23:46 +0000]
Windows: create scache->redirMx to reduce contention
Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue*
results in a large amount of contention between processing extent
requests and releases from the afs redirector and the threads attempting
to read from or write data to the file server. There is no reason why
the same lock must be used. Allocate a dedicated mutex to protect the
queue.
By placing the new mutex after the buf_globalLock in the locking
hierarchy it permits the lock acquisition logic for extent processing
to be simplified further reducing cm_scache_t.rw lock transitions.
Reviewed-on: http://gerrit.openafs.org/6053
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
55f5f356af2ef884413bd656f100055741ae871b)
Change-Id: Ic52bb0063e764c67f22783b4de2fdfaad90d374a
Reviewed-on: http://gerrit.openafs.org/6063
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 00:03:14 +0000]
Windows: Increase default number of daemon threads
With the SMB interface there was little benefit to having
a large background daemon worker pool since it was so rarely
used. Now that the redirector does everything in the background
daemon workers, increase the default from 4 to 16 threads.
Reviewed-on: http://gerrit.openafs.org/6058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0)
Change-Id: I32705d0787719f0196eac5a5ff1e87bde26e1768
Reviewed-on: http://gerrit.openafs.org/6062
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Wed, 16 Nov 2011 00:00:05 +0000]
Windows: cm_SetupStoreBIOD use firstModOffset chunk
When cm_SetupStoreBIOD attempts to store a chunk to the file
server it should not use *inOffsetp as the start of the range.
There is no guarantee that the buffer at *inOffsetp is dirty.
Instead use firstModOffset which refers to the first known
dirty buffer in the range specified by the caller. Attempt
to fill a chunk of consecutive dirty buffers from that point.
Reviewed-on: http://gerrit.openafs.org/6057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
320c7292e6ae014e44e89b0da736bcc04ef42b2b)
Change-Id: I790e06790702b19c74e27e92a11112be669286c1
Reviewed-on: http://gerrit.openafs.org/6061
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 15 Nov 2011 23:40:21 +0000]
Windows: Fairness for background operations
The background daemon worker pool is responsible for processing
background Store and Fetch operations. With the SMB interface
primary store and fetch operations are performed in the SMB worker
thread which makes sense since those operations must be synchronous
to the incoming request.
With the AFS redirector interface almost all of the work is performed
by the background daemon worker pool. It is therefore critical that
the workers not get stuck in a state that starves applications.
For example, copy of a file that is larger than the cache to \\AFS
will result in a background store request for each chunk size of
the file. If each worker thread grabs one to process, only one will
make progress and the rest will block. If a cleanup operation
(aka handle close) occurs the entire file will be flushed to the
server synchronously in the redirector worker thread. That thread
will cause of the background daemon threads to block.
Any subsequent fetch data requests that get queued behind the list
of stores will in turn block until they clear. This behavior is not
fair.
This patchset adds a new test to the cm_BkgDaemon() request
selection loop, cm_RequestWillBlock(). If a request will block it
is skipped. If there are no requests to process that would not have
blocked, the worker will sleep for 25ms instead of the usual 1s.
For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is
used to indicating a blocking state.
For BkgFetch and PreFetch operations, the CM_BUF_WRITING and
CM_BUF_READING flags on the first cm_buf_t of the range is used
to indicate a blocking state.
Reviewed-on: http://gerrit.openafs.org/6056
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
c904d9a3889b7dd8c8795feaa9e5e4979f681f53)
Change-Id: I2490f2c45b86a17cdd5bf4a86529f87509bc83ad
Reviewed-on: http://gerrit.openafs.org/6060
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 15 Nov 2011 14:03:59 +0000]
Windows: Create default Security Descriptor
A misplaced #endif prevented the allocation of a default
security descriptor. This results in STATUS_INSUFFICIENT_RESOURCES
errors.
FIXES 130284
Reviewed-on: http://gerrit.openafs.org/6048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
a1871449eec8d9fc1152319bc63e29db7f9ae231)
Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e
Reviewed-on: http://gerrit.openafs.org/6049
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 14 Nov 2011 22:49:45 +0000]
Windows: interlocked refCount increment in cm_GetSCache
Failure to use interlocked operations in cm_GetSCache can
result in an under count
Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c
(cherry picked from commit
c4d19e5d4271a31fd29c111fb27d145dc83b83b7)
Reviewed-on: http://gerrit.openafs.org/6047
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 14 Nov 2011 15:23:53 +0000]
Windows: netidmgr krb5_cc_get_principal can fail
Do not dereference a NULL pointer if krb5_cc_get_principal fails.
On master this bug is fixed by
e55d1774b1b5b27a3617467b5e2a24ee2be3a38c
but that change is after the conversion to the Kerberos Compatibility
SDK and cannot be applied to openafs-devel-1_7_x at this time.
Change-Id: Iffb31330ea022a4f75728ff2da657029c56d61d8
Reviewed-on: http://gerrit.openafs.org/6018
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sun, 13 Nov 2011 05:40:54 +0000]
Windows: missing braces in AFSFSControl
Change-Id: I008b03f26bf52a38296e6a009535ea5267fc8f3b
Reviewed-on: http://gerrit.openafs.org/6017
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 12 Nov 2011 23:33:18 +0000]
Windows: smb_ReceiveNTCreateX create smb_fid earlier
smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now
requires the smb_fid_t allocated fid value for use in share
mode locking. Move the allocation of the smb_fid earlier
in the function and apply necessary cleanup in error paths.
Reviewed-on: http://gerrit.openafs.org/6004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
38fbf93fcc21aaecbf9a7e27d19131b9de4c3839)
Change-Id: Ife9d93672681d92da7ca7f89536d4a12bd177084
Reviewed-on: http://gerrit.openafs.org/6015
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 12 Nov 2011 22:32:06 +0000]
Windows: cm_GetSCache avoid holding cm_scacheLock
cm_GetSCache used to hold cm_scacheLock write-locked from
start to finish except that it didn't. There were several
places where cm_scacheLock was dropped and reacquired due
to lock ordering requirements. Unfortunately, this has
two problems. First, the function isn't very fast in the
most common case since cm_scacheLock is write-locked for
the search for an existing FID. Second, there is a race
that results when cm_GetNewSCache() drops the cm_scacheLock.
To make things faster, use a read-lock for the common case.
To avoid the race, if the FID cannot be located, call
cm_GetNewSCache() first and then obtain the cell and volume
information. Then perform a second lookup for the FID while
holding cm_scacheLock write-locked. If we lost the race or
there was an error obtaining the cell and volume info, put
the new cm_scache_t back onto the end of the LRU queue.
Reviewed-on: http://gerrit.openafs.org/6003
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
5c59d1b500ae4ba5223184fbfe18837891ea30c3)
Change-Id: Ifcaf015b4105487fa3de123636f1d9aacbbb482a
Reviewed-on: http://gerrit.openafs.org/6014
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 12 Nov 2011 22:24:12 +0000]
Windows: avoid null ptr in RDR_RequestFileExtentsAsync
If the cm_scache_t cannot be obtained, do not dereference it
while returning an error to the redirector.
Reviewed-on: http://gerrit.openafs.org/6002
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
eb3c9f783b9488181c57ef949e3feddcb02d381a)
Change-Id: Ide78420779869ed31c3909983f16ead546a333d8
Reviewed-on: http://gerrit.openafs.org/6013
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 12 Nov 2011 18:45:08 +0000]
Windows: Track active RPCs per scache_t
It has been noticed that multiple RPCs can be active on
a cm_scache_t object at the same time. This is especially
true of directory objects with the redirector. Track the
number of active RPCs and use that number in cm_MergeStatus
when deciding whether or not to discard the cached data for
the object.
Reviewed-on: http://gerrit.openafs.org/6001
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
090f6279c5496f648893606d298c698f376c7ae0)
Change-Id: Idc2d97998c274a130bee7666180f35016d575b0b
Reviewed-on: http://gerrit.openafs.org/6012
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 12 Nov 2011 18:41:30 +0000]
Windows: fix locking hierarchy in service
The smb username lock and the daemon global lock can be requested
while the scache dirlock is held if there are no free buffers
and the service is forced to claw back extents from the redirector.
Adjust the locking hierarchy accordingly.
Reviewed-on: http://gerrit.openafs.org/6000
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
2fc9edc6e34ebef60413fad9a2af2aa73ea1681f)
Change-Id: Ib6ca9a44e626613c44f79fc3a59dcd2adaeb1dc8
Reviewed-on: http://gerrit.openafs.org/6011
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Wed, 2 Nov 2011 21:55:49 +0000]
afs: Do not use separate array for srvAddrs
The array of srvAddr structs we use in afs_LoopServers have indices
unrelated to the indices of conns, rxconns, etc. Several places were
assuming that addr[i] corresponded to conn[i], which is not
necessarily true. So instead, do not use the separate addr array
(except when populating the conn and rxconn arrays), and just get the
srvAddr structure by going through the relevant conn[i].
Reviewed-on: http://gerrit.openafs.org/5790
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
f199ac666195771a02e3ebb040c6e5fe47c58c58)
Change-Id: Ib6605ee02964fc8215774d9b45846ac4c07fa636
Reviewed-on: http://gerrit.openafs.org/6010
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 22 Oct 2011 15:37:04 +0000]
rx: Turn the rxevent_Cancel macro into a function
Turn rxevent_Cancel into a function rather than a macro which modifies
its argument as a side effect. rxevent_Cancel now checks whether the
event being cancelled is already NULL, as well as NULLifying the event
when it is actually cancelled.
Update all of the callers to reflect this new API, and so they no
longer do unecessary work.
Reviewed-on: http://gerrit.openafs.org/5840
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
a7d569c857234626191514e2780368e1b85a6dae)
Change-Id: I0bd60d47eea41d9181e136c3a3cd42b0ade3955c
Reviewed-on: http://gerrit.openafs.org/6009
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 22 Oct 2011 15:22:36 +0000]
rx: New signature for rx event functions
For a while now, we've had both new and old-style rx event callback
functions. Modify all of our event handlers, and the functions that
install them, to use only new style functions, and get rid of the
old-style function prototypes.
Reviewed-on: http://gerrit.openafs.org/5839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
be8db58f5a44ce2ee4208de09a5ca1faf6f0f91f)
Change-Id: I904c1a49ea3bf18244ea2eb908ca3a7d7394e7ff
Reviewed-on: http://gerrit.openafs.org/6008
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 22 Oct 2011 10:22:51 +0000]
opr: Add a red/black tree implementation
Add an implementation of red/black trees to our runtime library.
This is originally derived from the FreeBSD macro-based rbtree
implementation, but is heavily reworked to not use macros, to improve
legibility, and to favour speed over structure compactness.
A test suite is provided in tests/opr/
Reviewed-on: http://gerrit.openafs.org/5838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
5574ff814f02078b709cbc0a6c94201ca6fe2eca)
Change-Id: I1b70886c40db41fbbdc56b2374fb554c772e1b96
Reviewed-on: http://gerrit.openafs.org/6007
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 22 Oct 2011 10:10:53 +0000]
rx: Add a helper function for delayed acks
The code to schedule a new delayed ack event is distributed throughout
the RX code. Consolidate this into a single helper function.
Change-Id: Id24d5891e6c378aeed375454bf9016572dc8bb8a
Reviewed-on: http://gerrit.openafs.org/5837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-on: http://gerrit.openafs.org/6006
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Sat, 22 Oct 2011 08:45:10 +0000]
opr: Add opr_containerof
Add the opr_containerof macro, which can be used to find the base
address of a structure which contains a member whose location is known.
This formulation is heavily used throughout OpenAFS to determine the
base address of structures containing queue pointers - this provides
a central definition, rather than coding it from scratch each time.
Reviewed-on: http://gerrit.openafs.org/5836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
1a056d24a79242db09963dd0b0c2193c5034b61b)
Change-Id: I3e3a7d0b83603edf6d62520cb2245cf0944f930b
Reviewed-on: http://gerrit.openafs.org/6005
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Mon, 31 Oct 2011 21:59:51 +0000]
Windows: add braces to case statements
A number of case statements did not have braces protecting
the block. Add them.
Reviewed-on: http://gerrit.openafs.org/5772
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
22f4e2945d3fa5b7802b7321ddaa35ef34b04a45)
Change-Id: I1f5527250285886f2c5253e9cae27ebd45e2266f
Reviewed-on: http://gerrit.openafs.org/5999
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Sat, 5 Nov 2011 08:10:42 +0000]
Windows: Add Vista/Win7 Firewall Configuration
Make use of the INetFwPolicy2 COM interface to configure
the Vista/Win7 firewall for all network profile types.
Change-Id: I68fd5f89436304e9be1fe7c4279eade7d5f7692e
Reviewed-on: http://gerrit.openafs.org/5812
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
b15b4b15822bee87720bb0d78c2ce54051180339)
Reviewed-on: http://gerrit.openafs.org/5998
Jeffrey Altman [Wed, 5 Oct 2011 07:36:48 +0000]
Windows: Enforce Share Access
Use file server locks to enforce file share access modes
via the afs redirector interface. The approach taken
integrates share mode enforcement with the file server
lock tracking code in the service. The share mode
enforcement mimics that of the SMB Server interface.
This patchset includes two functional changes to
the previous locking and share mode processing:
1. The cm_scache_t fsLockCount field is used to
determine if the desired lock can be granted
by the file server. If not, the RXAFS_SetLock()
request is skipped and the request is failed
locally.
2. cm_CheckNTOpen() now accepts the desired and
and share access modes. The share access mode
is used to determine if a test lock should be
obtained at all. If the share mode is FILE_SHARE_WRITE
then no lock is requested. This change permits
Microsoft Office applications to offer the user
the ability to open the file in read-only mode
and notify the user when the document can be
opened in read-write mode.
Developed with Peter Scott <pscott@kerneldrivers.com>
FIXES 130239
Change-Id: Iaa2beda3182f93575574bbe8f505e5008cd0d37f
Reviewed-on: http://gerrit.openafs.org/5823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
b78b8f64a69481e59e957ebe09315fc5b8b60c17)
Reviewed-on: http://gerrit.openafs.org/5997
Andrew Deason [Thu, 10 Nov 2011 17:58:12 +0000]
namei: Remove extraneous rmdir
We just unlinked the file, so we know we won't be able to rmdir() the
same thing. Give a path one level higher to
namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir.
Change-Id: I37da76e360fd3967048297789ed8cf4748c14845
Reviewed-on: http://gerrit.openafs.org/5833
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
b41e30a55c8aeb6d7f42d74f9eb090232032057f)
Reviewed-on: http://gerrit.openafs.org/5996
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 10 Nov 2011 17:05:28 +0000]
vol: Remove O_EXCL|O_TRUNC combinations
A few places were specifying both O_EXCL and O_TRUNC to open().
O_TRUNC does not make any sense with O_EXCL, and doesn't do anything,
so remove O_TRUNC from these instances to make the code more clear.
Change-Id: I06e2f68eb589da0baee32e523103c2c868c33cc8
Reviewed-on: http://gerrit.openafs.org/5832
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
4c679e380f697760de777d35fe057229bf2bf762)
Reviewed-on: http://gerrit.openafs.org/5995
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 10 Nov 2011 03:52:37 +0000]
Windows: FSCTL_SET_REPARSE_POINT not yet implemented
Since FSCTL_SET_REPARSE_POINT is not yet implemented
return STATUS_INVALID_PARAMETER to all requests that
do not fail validity tests.
Change-Id: I0a6b5e58fe660bc9e71411ec63e32cf81790ec51
Reviewed-on: http://gerrit.openafs.org/5829
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
f27480aa2f8a26da3bd7634ff7072c1faac0f448)
Reviewed-on: http://gerrit.openafs.org/5994
Jeffrey Altman [Thu, 10 Nov 2011 03:47:55 +0000]
Windows: FSCTL_SET_REPARSE_POINT error
According to MS_FSCC 2.3.54 if the input buffer length is less than the size
of a REPARSE_DATA_BUFFER structure, or the input buffer length is greater
than 16,384, or a REPARSE_DATA_BUFFER structure has been specified for a
third party reparse tag, or the GUID specified for a third party reparse tag
does not match the GUID known by the operating system for this reparse
point, or the reparse tag is 0 or 1, then the return status shall be
STATUS_IO_REPARSE_DATA_INVALID.
Change-Id: Ied458e193ebf10144c954a1b29e38454a5323ec4
Reviewed-on: http://gerrit.openafs.org/5828
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
72e5bd1434a6a2238f28f11a149192f44d0b82d1)
Reviewed-on: http://gerrit.openafs.org/5993
Jeffrey Altman [Thu, 10 Nov 2011 03:45:07 +0000]
Windows: FSCTL_IS_PATHNAME_VALID return success
Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista,
Windows Server 2008, Windows 7, and Windows Server 2008 R2 support the
FSCTL_IS_PATHNAME_VALID Request (section 2.3.21) and return STATUS_SUCCESS
whenever this request is invoked. We will do the same.
Change-Id: I65be2d5fac5a04f93efb835a827b49e9f1ddec06
Reviewed-on: http://gerrit.openafs.org/5827
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
733aa6a63d8f15dcfe31f24ce31b67b746a2934a)
Reviewed-on: http://gerrit.openafs.org/5992
Jeffrey Altman [Thu, 10 Nov 2011 03:42:54 +0000]
Windows: these fsctl cmds are not implemented
Return STATUS_NOT_IMPLEMENTED since the following
FSCTL_ operations are not:
FSCTL_LOCK_VOLUME
FSCTL_UNLOCK_VOLUME
FSCTL_DISMOUNT_VOLUME
FSCTL_MARK_VOLUME_DIRTY
FSCTL_IS_VOLUME_DIRTY
FSCTL_IS_VOLUME_MOUNTED
Change-Id: Ie8fab08f5b005b26192e9bb74a4f09ff29b9c64f
Reviewed-on: http://gerrit.openafs.org/5826
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
3c6e5681245ad4ee267d7e5ca260b38655633a96)
Reviewed-on: http://gerrit.openafs.org/5991
Jeffrey Altman [Thu, 10 Nov 2011 03:33:11 +0000]
Windows: Additional trace logging
Add additional trace logging to the redirector to assist
with debugging reparse point processing.
Change-Id: I2dac6a6ed3a178c59581f3862678d2fed5f10bc7
Reviewed-on: http://gerrit.openafs.org/5825
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
ff7d3a19f032c5d4917cc04eeff9cf92733f1fae)
Reviewed-on: http://gerrit.openafs.org/5990
Jeffrey Altman [Thu, 10 Nov 2011 01:05:05 +0000]
Windows: service must set reparse point attribute
When populating the directory entry information for the
redirector the service must set the reparse point attribute.
Change-Id: Ibeaca04d19c59783c04721cad2b5716a3c8c1e2c
Reviewed-on: http://gerrit.openafs.org/5824
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
b947adbacb5db4ce5e380ea28e1d734fdadd5cdf)
Reviewed-on: http://gerrit.openafs.org/5989
Peter Scott [Thu, 10 Nov 2011 20:34:53 +0000]
Windows: Correctly increment PIOCtl DE
When performing a directory enumeraiton, correctly increment ref count on
the PIOCtl DE structures
Change-Id: I95833d45ccaf4a4da1eeb64c92e15400b7b7840e
Reviewed-on: http://gerrit.openafs.org/5834
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
d810870ec1a2ad1cb438d776236db3340081fe74)
Reviewed-on: http://gerrit.openafs.org/5988
Peter Scott [Thu, 10 Nov 2011 16:06:53 +0000]
Windows: FileNetworkPhysicalNameInfo implementation
Handle this File information query
Change-Id: I04b0d9a97987b526fb1ff2606aff855f4811a232
Reviewed-on: http://gerrit.openafs.org/5830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
2c0f857bc8d17d8e02f515d510f9530bc47866d4)
Reviewed-on: http://gerrit.openafs.org/5987
Jeffrey Altman [Mon, 31 Oct 2011 03:52:00 +0000]
Windows: improve store data parallelism
The file server will set the rx call status bit (0x1)
when the rpc is in process and all of the locks are held.
At this point it is not possible for another store data rpc
to begin on the vnode prior to the completion of the current
rpc. Once this status bit is detected as set, the exclusive
store data synchronization on the cm_scache_t can be dropped.
This permits the next store data rpc to perform its biod
construction.
Change-Id: Ibd62a3c289ed11b4f67d5ff1ffff326bcc400044
Reviewed-on: http://gerrit.openafs.org/5741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
deedf97416e4eaaea79479711ad3c84020fdd1e0)
Reviewed-on: http://gerrit.openafs.org/5986
Andrew Deason [Wed, 9 Nov 2011 23:04:09 +0000]
volser: Preserve needsSalvaged during restore
Some of the routines during a volume restore may set needsSalvaged, if
an inconsistency is detected while writing the given volume data.
However, after the data is read, we set the volume header information
to what was found in the dump stream, ignoring any needsSalvaged that
may have been set.
To ensure that inconsistent volumes in this situation actually get
demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of
needsSalvaged in the header, if it was set.
Change-Id: Ie4895a8386642a762a523f2a0ac0e2d1b4ac3de7
Reviewed-on: http://gerrit.openafs.org/5822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
9ba891676a15512fa58915662cf599ea73eac430)
Reviewed-on: http://gerrit.openafs.org/5985
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Derrick Brashear [Wed, 9 Nov 2011 15:34:10 +0000]
viced: avoid bogus handle in rename
because fileptr's handle can be reset during CopyOnWrite
we need to SetDirHandle after that call
FIXES 130215
Change-Id: I61d21c6026b294e3c7f442786f6ee7f97ab6f5e4
Reviewed-on: http://gerrit.openafs.org/5818
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
a1669f3e37299c11bf29a458212e03d1bdb22334)
Reviewed-on: http://gerrit.openafs.org/5984
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Tue, 8 Nov 2011 18:52:50 +0000]
regen: Fail on failures
If something fails, don't ignore the error.
Change-Id: Ia679cf8541adce573fa3ee16ae8fafec0cfae790
Reviewed-on: http://gerrit.openafs.org/5817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
6d519cf1234d54630dcfe48f6ecd393e2dfe71dd)
Reviewed-on: http://gerrit.openafs.org/5983
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Wed, 13 Apr 2011 18:15:57 +0000]
Add "pretty" build option
Add the capability to do a "pretty" build, where we output something
like " CC /path/to/foo.o" to build foo.o, instead of the entire
compiler invocation, similarly to how the Linux kernel build appears.
Add the "pretty" building for CC and LD rules.
This also prints out some helpful information when a command fails,
which can sometimes otherwise be annoying to figure out post-mortem.
To enable the pretty building, make with V=0. To output everything
that is actually run with V=0, make with 'V=0 Q=' .
Note that this does not work with all makes, since not all makes will
propagate command-line-specified variables to sub-makes without -e.
Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris.
However, GNU make will work, as will /usr/xpg4/bin/make on Solaris.
Change-Id: Ifb6cf8840c2b99c4d384e195434071ae427c4032
Reviewed-on: http://gerrit.openafs.org/4486
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
49cb0d00909693b85f52d87a26d5df69a829d9d5)
Reviewed-on: http://gerrit.openafs.org/5982
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Tue, 8 Nov 2011 18:29:39 +0000]
Specify pattern rules in addition to suffix rules
A few makefiles specify an old-style suffix rule, such as:
.c.o:
$(AFS_CCRULE) $<
Not all makes seem to interpret these rules correctly (such as Solaris
/usr/xpg4/bin/make). Since it is easy to do so, specify pattern-based
rules along with these, like so:
%.o: %.c
$(AFS_CCRULE) $<
Change-Id: I268c0a81b263c89d079976a01b2759ef6b4f2770
Reviewed-on: http://gerrit.openafs.org/5819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
5c64df8628e60f2e4c55aaf3e53fb01c140b42ed)
Reviewed-on: http://gerrit.openafs.org/5981
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 Nov 2011 18:40:37 +0000]
Add setenv/unsetenv to roken
Add the replacement setenv and unsetenv functions to roken, for use on
(at least) HP-UX and older Solaris.
Change-Id: I032e744649300b1fcb89b30f4f36f9117d2b7b99
Reviewed-on: http://gerrit.openafs.org/5801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
70e8451acd0426024c152073e53bc6606e0189e1)
Reviewed-on: http://gerrit.openafs.org/5980
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Derrick Brashear [Sun, 6 Nov 2011 21:28:27 +0000]
dafs: avoid null deref getting volume header
we don't assign hd before dereferencing. stop dereferencing
and just use the queue cursor.
Change-Id: Id70be9e9ff59d68219698f11460effafbdd7a587
Reviewed-on: http://gerrit.openafs.org/5814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
00beae8c4e3b390637f20584e676cf86c817dadd)
Reviewed-on: http://gerrit.openafs.org/5979
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 Nov 2011 18:17:33 +0000]
salvager: Implement AskDAFS via SYNC flags
Instead of probing the DAFS-ness of the fileserver by probing which
FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC
response header flags, which explicitly state whether or not the
endpoint is DAFS. This avoids unnecessary "protocol mismatch" log
messages when the endpoint is not DAFS.
Change-Id: Ia228fffd75e23130fe37a74cf79b8433c234609a
Reviewed-on: http://gerrit.openafs.org/5800
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
7fee28bae30c5a65898a2e3fd7149f07e8ca0df6)
Reviewed-on: http://gerrit.openafs.org/5978
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Derrick Brashear [Fri, 4 Nov 2011 15:43:01 +0000]
ukernel: handle pioctl errors properly in ktc
the straight return from call_syscall isn't what we want. munge so
e.g. EDOM handling for ktc_GetToken does the right thing.
Change-Id: I5b4d1fe503f64e95544b66a3cf3e9c5c43a2cb5e
Reviewed-on: http://gerrit.openafs.org/5807
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry-picked from
b06c700ee40ca70ef08259af819e2a6084137457)
Reviewed-on: http://gerrit.openafs.org/5977
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Fri, 4 Nov 2011 21:12:03 +0000]
libafsauthent: Remove obsolete HP-UX workaround
This workaround is no longer relevant. It is also error-prone and
there are far better ways to achieve a similar result, so get rid of
it.
Change-Id: I24b1edca87d0b0d7e4f2214292b6af2d61218c5c
Reviewed-on: http://gerrit.openafs.org/5811
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
c96d3429f2d4ad2ec7ac45a83c1111dc60a0d5c1)
Reviewed-on: http://gerrit.openafs.org/5976
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Fri, 4 Nov 2011 22:19:28 +0000]
volser: Remove debugging log messages
While the -log option to volserver is supposed to print additional log
information, it shouldn't spam the log with useless data. Remove some
of the log lines that are really more "debug" information, so we log
the same amount of information as in the 1.4 series.
Change-Id: I99273975bfbf484ae395f96a5d13c97e2aeb5c54
Reviewed-on: http://gerrit.openafs.org/5810
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry-picked from
2a1251c5d0c1b0fd4024d7b3282187a838b551fd)
Reviewed-on: http://gerrit.openafs.org/5975
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Thu, 3 Nov 2011 10:10:23 +0000]
Unix CM: Fix dir buffer leak in afs_readdir
Resolve a buffer leak in afs_readdir that was visible on all non-Linux
platforms (Linux has an independent readdir implementation)
Change-Id: I9324c9cc979c51b06f90ad10eae01c36dae40840
Reviewed-on: http://gerrit.openafs.org/5794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
025a7aee0b86c7d8a7299c85c88615eb8cd6b07f)
Reviewed-on: http://gerrit.openafs.org/5974
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Fri, 4 Nov 2011 17:42:33 +0000]
DAFS: Deal with exclusive-state volume headers
GetVolumeHeader assumes that headers on the LRU are not associated
with a volume in an exclusive state. This is known to not be true for
some cases when salvage requests are received over FSSYNC, and may be
true in other scenarios. It's easy to just skip such headers, so skip
them.
Change-Id: Ie605f04e6c1a9e9e9ae3e8791179b3a85eab2fca
Reviewed-on: http://gerrit.openafs.org/5808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e)
Reviewed-on: http://gerrit.openafs.org/5973
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 4 Nov 2011 13:34:53 +0000]
Windows: NPCancelConnection set correct length
The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call
must not include the trailing NUL. NPGetConnection() returns the
size of the buffer used which does include the trailing NUL.
Change-Id: I02940d35b2cc3cdfbff91e169c4d8cba60f4e724
Reviewed-on: http://gerrit.openafs.org/5806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
da00d719a77607d8873067902f5db5bff02d0e99)
Reviewed-on: http://gerrit.openafs.org/5972
Jeffrey Altman [Fri, 4 Nov 2011 12:40:03 +0000]
Windows: do not leak resource in AFSQueryDirectory
Track whether or not the pFcb->NPFcb->Resource is held so
it can be released in all error paths.
Change-Id: I2bfa9d3bb5a608ad861f60e1dee81df845080533
Reviewed-on: http://gerrit.openafs.org/5804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
3acd9b854e05748578f8291200fad8c6650e9b14)
Reviewed-on: http://gerrit.openafs.org/5971
Peter Scott [Fri, 4 Nov 2011 13:31:57 +0000]
Windows: Failed to release correct lock
For cross-directory renames, the correct parent lock was not being tracked
Change-Id: I5337eb8b617d633e7f20e8fe706df8285e472ffa
Reviewed-on: http://gerrit.openafs.org/5805
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
f7adbd3d3977a328612c0f527d764566846593da)
Reviewed-on: http://gerrit.openafs.org/5970
Ken Dreyer [Mon, 31 Oct 2011 14:27:16 +0000]
doc: limitations of addsite on different partitions
A user on the openafs-info mailing list noted that the Admin Guide is
unclear about creating read-only replicas on different partitions on
the same fileserver. Clarify the rules here.
Change-Id: Idcb944d46fc9f3994b79d8e930cd050830872f6c
Reviewed-on: http://gerrit.openafs.org/5745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
c59c07132ef17589ad3466ded418c1370539b7af)
Reviewed-on: http://gerrit.openafs.org/5969
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Heimdal Developers [Thu, 3 Nov 2011 17:37:36 +0000]
Import of code from heimdal
This commit updates the code imported from heimdal to
ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408)
Upstream changes are:
Jeffrey Altman (2):
Windows: fallback to PROV_RNG if no PROV_RSA_FULL
roken: posix errnos for windows
Love Hornquist Astrand (3):
drop __restrict to please old compilers
add krb5_is_enctype_weak
Don't export tests from library, reported in bug from Tom Payeire
New files are:
roken/setenv.c
roken/unsetenv.c
Change-Id: Ib644b61ee61e2528629a2b4d75f2bd329e1eb6c1
Reviewed-on: http://gerrit.openafs.org/5798
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
c0961b8d4103fab37c360461bcde30c56d24f483)
Reviewed-on: http://gerrit.openafs.org/5968
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Wed, 2 Nov 2011 16:35:42 +0000]
Solaris: Specify ARCHFLAGS in CFLAGS
Various autoconf tests which use the C compiler may yield different
results depending on whether or not we are compiling for x86 or amd64
on Solaris (different libraries are available, structures may be
different, et al). So, set CFLAGS depending on which arch we are
targeting, so the autoconf results are more consistent with the actual
compilation during the build.
Change-Id: Iaec57276a803a9804e441787195f05f38c2963f2
Reviewed-on: http://gerrit.openafs.org/5786
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
5eba97a8960c49aeea957dc94408368e1324eff0)
Reviewed-on: http://gerrit.openafs.org/5967
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Wed, 2 Nov 2011 16:32:56 +0000]
Do OPENAFS_OSCONF before compiler autoconf tests
OPENAFS_OSCONF can set the C compiler we use, as well as changing
various compiler flags. These changes can alter autoconf tests, so
allow OPENAFS_OSCONF to change these before various autoconf tests are
performed which require the C compiler.
Change-Id: I5a4145e71159fab1c4873ebb50c930391e5f0391
Reviewed-on: http://gerrit.openafs.org/5785
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
353aa7ef2c172f574998480d6d051b3f4e95ae7b)
Reviewed-on: http://gerrit.openafs.org/5966
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Wed, 2 Nov 2011 15:43:54 +0000]
Remove -settime/RXAFS_GetTime client support
Remove the -settime option from afsd, and any code for making
RXAFS_GetTime calls in libafs. Server probes have been replaced by
calls to RXAFS_GetCapabilities, and the actual functionality of
synchronizing the system clock has been superseded by other systems
like NTP. Issue a warning for all code paths that try to enable
-settime support.
Historical note: the code that this commit is removing contains bugs.
Do not simply revert this commit to turn on -settime support again.
Change-Id: Iafb2ced1f411888f43b57b0141a9420f8738c349
Reviewed-on: http://gerrit.openafs.org/5787
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
1d9888be486198868983048eeffabdfef5afa94b)
Reviewed-on: http://gerrit.openafs.org/5965
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Michael Meffie [Thu, 18 Aug 2011 21:04:14 +0000]
opr: queue swap
Add inline function to pivot two queues.
Implementation by Simon Wilkinson.
Change-Id: Idea3b8740c32992e91fc0b454c7c30140cc611c5
Reviewed-on: http://gerrit.openafs.org/5742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
9c130285d8f17a5e09bbe0b3c3b886ec3145bae9)
Reviewed-on: http://gerrit.openafs.org/5964
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 Nov 2011 17:33:55 +0000]
external: trigger git commit-msg hooks on import
When we import commits, the new commit does not have a Change-Id in
the commit message. Usually a git commit-msg hook will be installed to
automatically insert a Change-Id into the commit message if one does
not already exist, so trigger the hook by performing a no-op 'git
commit --amend'.
Change-Id: Ia43b5b16ee00c9aee8950039b035d27ed6782781
Reviewed-on: http://gerrit.openafs.org/5797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
fbf68f12592419a315f56585f9b8bb3a822bbc9b)
Reviewed-on: http://gerrit.openafs.org/5963
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 Nov 2011 17:27:22 +0000]
external: commit imports with --no-verify
Currently, importing external commits with import-external-git.pl may
fail if the current repository checks for whitespace errors, and the
external commits contain whitespace errors. So run the commit with
--no-verify, so we can make the commit before fixing up the whitespace
errors immediately afterwards.
Change-Id: I0acbf1ca7a9a2fae528e71e81b23d8fd6f496570
Reviewed-on: http://gerrit.openafs.org/5796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
7ef5aeb608a390b6ac88d7e6748c5a1b4a65e0c5)
Reviewed-on: http://gerrit.openafs.org/5962
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Andrew Deason [Thu, 3 Nov 2011 17:17:07 +0000]
Import setenv.c and unsetenv.c from roken
Import the roken implementation of setenv and unsetenv, which are
required on HP-UX.
Change-Id: I0e56dd7368e61235013f6c94b8775170724f1d10
Reviewed-on: http://gerrit.openafs.org/5795
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
95038fde9a23b4550cbba38460f4668ca25b4f85)
Reviewed-on: http://gerrit.openafs.org/5961
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Wed, 2 Nov 2011 23:29:00 +0000]
Windows: fix deadlock in symlink Attrib retrieval
Commit
df22620f66f5ce92776177d4d800fc7f4ae4ae99 introduced a
deadlock when retrieving file attributes for symlink objects.
To correct the deadlock, do not hold the Fcb locks during the
AFSRetrieveFileAttributes() call.
Change-Id: If6b789781cc3bc14a2f8fdd5ee808fda4f7e8f99
Reviewed-on: http://gerrit.openafs.org/5792
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
ed9bf9b55976c78cf24b43580d1752e81fe697b1)
Reviewed-on: http://gerrit.openafs.org/5960
Jeffrey Altman [Wed, 2 Nov 2011 23:27:42 +0000]
Windows: always set reparse point attrib for symlink
Make sure that we always set the reparse point attribute
for symlinks in directory enumerations and attribute queries.
Change-Id: Ice4405ce5f47a807680d857831a3bca07b95e697
Reviewed-on: http://gerrit.openafs.org/5793
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
d8f357b9838509c5a5cfa22a85dffcd962804025)
Reviewed-on: http://gerrit.openafs.org/5959
Peter Scott [Wed, 2 Nov 2011 23:25:36 +0000]
Windows: remember when a reparse point is opened
If the mount point or symlink is opened as a reparse point
we must remember that in the Ccb so that later reparse point
processing can be implemented properly. For now remember
with the CCB_FLAG_MASK_OPENED_REPARSE_POINT flag.
Change-Id: I19e6358c47513a3c9283273893b306c2fd854579
Reviewed-on: http://gerrit.openafs.org/5791
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
e39e8bb5b2f08281bc1d91c9209a1a3f1b463af2)
Reviewed-on: http://gerrit.openafs.org/5958
Jeffrey Altman [Wed, 2 Nov 2011 14:35:14 +0000]
Windows: Mount points are always directories
Set the directory file attribute for all mount points
since a mount point target is always represented as
a directory.
Change-Id: I88cf8cefbd01f70dada749779a74d9e636cc0619
Reviewed-on: http://gerrit.openafs.org/5784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Tested-by: Peter Scott <pscott.kd@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
c7e2d8450117a947cb858bfdb4aedd668bd56bfd)
Reviewed-on: http://gerrit.openafs.org/5957
Peter Scott [Wed, 2 Nov 2011 14:23:48 +0000]
Windows: Retrieve file attributes on symlinks
When a component is a symlink, correctly retrieve file
attributes during a query file information request.
FIXES 130283
Change-Id: Ia6962510ee4027684290d840ef10ade64c024890
Reviewed-on: http://gerrit.openafs.org/5782
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
df22620f66f5ce92776177d4d800fc7f4ae4ae99)
Reviewed-on: http://gerrit.openafs.org/5956
Peter Scott [Wed, 2 Nov 2011 14:18:09 +0000]
Windows: add AFSRetrieveParentPath()
Change-Id: I6f18abebc99713a89a374a06d22deeb1588ef949
Reviewed-on: http://gerrit.openafs.org/5783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
cddb3baa13b1c941533bee5cdf0873ca4563c9c1)
Reviewed-on: http://gerrit.openafs.org/5955
Jonathan A. Kollasch [Tue, 11 Oct 2011 17:56:08 +0000]
kdump-build: don't install when it hasn't been built for *bsd*
Change-Id: I0d80a0464f64eb376fef976d500647fcc7fb774f
Reviewed-on: http://gerrit.openafs.org/5596
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
6fe9a1ea0f22ef31ede5a9a8bb052b4ee71e7be0)
Reviewed-on: http://gerrit.openafs.org/5954
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 14 Oct 2011 13:10:19 +0000]
klog.krb5: enforce DES for rxkad
0. Always request a TGT regardless of the state of
writeTicketFile.
1. request des-cbc-crc when requesting a ticket for an
rxkad service principal
2. check the returned key length to ensure that it matches
the permitted length of an rxkad key. If not, generate
an error instead of overwriting memory and continuing.
FIXES 130278
Change-Id: I219774be6cadc41c2f3e3ff2fd4c882f69808052
Reviewed-on: http://gerrit.openafs.org/5619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
3a9a5783cd1fd73902655f0876e2069b42688c94)
Reviewed-on: http://gerrit.openafs.org/5953
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Tue, 1 Nov 2011 14:55:37 +0000]
Windows: DE Reference count added during create
A reference count is added under lock to a newly created DE to
ensure it is not removed through deletion while in flight.
Change-Id: I4057a0301752dc30c6b79c4d3af31a74f42cb2ba
Reviewed-on: http://gerrit.openafs.org/5775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
4f4b805ae9107482aa39f2c3c0c4327e8466e2ac)
Reviewed-on: http://gerrit.openafs.org/5952
Peter Scott [Mon, 31 Oct 2011 22:10:07 +0000]
Windows: change AFSProcessUserFsRequest default
Default the return code for AFSProcessUserFsRequest() to
STATUS_INVALID_DEVICE_REQUEST instead of STATUS_INVALID_PARAMETER.
Change-Id: Id80996aa0f4ceb3e4fe5c1bc1905a3ce6ad39f7f
Reviewed-on: http://gerrit.openafs.org/5774
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
96e313de3e040efffbb9b933b0b2ae15c9fd540c)
Reviewed-on: http://gerrit.openafs.org/5951
Peter Scott [Mon, 31 Oct 2011 22:07:23 +0000]
Windows: correct ordering of reparse point tests
Test for whether an object is a reparse point before testing
whether the provided buffer is large enough to hold the result
if it is.
FSCTL_GET_REPARSE_POINT
FSCTL_SET_REPARSE_POINT
FSCTL_DELETE_REPARSE_POINT
Change-Id: Ifb637f90dee41b1d8db8674a3b6436f11b754576
Reviewed-on: http://gerrit.openafs.org/5748
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
ee8b6d34fa7d562f94469e2b8098ccc0507d5876)
Reviewed-on: http://gerrit.openafs.org/5950
Peter Scott [Mon, 31 Oct 2011 22:05:31 +0000]
Windows: log FSCTL_CSC_INTERNAL requests
FSCTL_CSC_INTERNAL requests are not supported and will
return STATUS_INVALID_DEVICE_REQUEST. However, log them
for easier debugging.
FSCTL_CSC_INTERNAL is defined in ntifs.h only for
Vista and above. Since afsredir is built for XP
and above its value must be conditionally defined
by us.
Change-Id: I8b89e5fb66ea48567fb617a81dc41f1c5c4617c5
Reviewed-on: http://gerrit.openafs.org/5773
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
94e9fceaa7ec343717b3fdc8610381832f532ebf)
Reviewed-on: http://gerrit.openafs.org/5949
Peter Scott [Sat, 29 Oct 2011 17:55:46 +0000]
Windows: Directory Entry Processing
Memory corruption was detected due to improper handling
of directory entries and the short name b-tree during
directory revalidation and tear down. The problem
resulted in a BSOD most frequently when roaming profiles
were written back to the file server or when multiple
clients were actively modifying the contents of a directory
simultaneously.
This patchset makes a number of changes:
. rename processing no longer handles collisions locally.
the file server replaces a target atomicly when there
is a collision.
. directory validation is no longer delayed until
a handle is closed
. data version numbers are checked for implied
invalidation
Change-Id: I119511118e7f1492428da81f4dabc936e7a10f64
Reviewed-on: http://gerrit.openafs.org/5736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
af3dbb34a1ff226ac693c143f8e9d94ced4114c9)
Reviewed-on: http://gerrit.openafs.org/5948
Peter Scott [Sat, 29 Oct 2011 17:29:55 +0000]
Windows: additional trace logging for afsredirlib
A large number of addition trace log entries were added
to assist in diagnosing problems in the dir entry processing.
Change-Id: I8087cb8b72316ef367faa107d02cccf92b7b1ff3
Reviewed-on: http://gerrit.openafs.org/5739
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
dac012a84b1fec9f2a5003e8cf45a7bdb8cb004a)
Reviewed-on: http://gerrit.openafs.org/5947
Peter Scott [Sat, 29 Oct 2011 15:34:07 +0000]
Windows: Reimplement AFSGenerateCRC()
Replace the home grown CRC generation with a call to
RtlHashUnicodeString() which is present on Windows XP
and above.
Change-Id: I5769fc99fb2485714fdb12d5f8a62dca47791c0c
Reviewed-on: http://gerrit.openafs.org/5738
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
15d9654d7242e56a6bab9f8d61afa87b58c1c55f)
Reviewed-on: http://gerrit.openafs.org/5946
Marc Dionne [Sat, 29 Oct 2011 23:23:07 +0000]
Linux: 3.1: update RCU path walking detection in permission i_op
The permission() inode operation changed again with kernel 3.1,
back to the form it had before 2.6.38. This compiles fine,
but is missing the new way of detecting when we get called in
RCU path walking mode, resulting in system hangs.
Change-Id: If86c2cca9c16aef7731f04832ec524ac30c22b3b
Reviewed-on: http://gerrit.openafs.org/5740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from
4952df3f0359531e4a660c99c94c51eb0b169f59)
Reviewed-on: http://gerrit.openafs.org/5945
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Simon Wilkinson [Tue, 21 Jun 2011 17:32:02 +0000]
rx: Remove the ADAPT_WINDOW code
RX still has the remnants of an old mechanism for doing RTT and
congestion window detection. This code is #ifdef'd out using
the ADAPT_WINDOW define, but is pretty much unservicable these days,
as it collides with the TCP style implementation (with ADAPT_WINDOW
enabled, both will attempt to manipulate a connections RTT and
window size)
As the current TCP-style RTT and window calculation seem to work
much better in deployment, and there isn't much hope for us being
able to maintain two different congestion mechanisms, just remove
ADAPT_WINDOW. It is in git, if we ever want it back (not that I
think we ever would).
Change-Id: I956aa991eb14617de1cebf36b9ce9e780211aa22
Reviewed-on: http://gerrit.openafs.org/5737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
d603e2a95252200f02ad8465815c5bac0b23b1e1)
Reviewed-on: http://gerrit.openafs.org/5944
Jeffrey Altman [Fri, 28 Oct 2011 21:43:24 +0000]
Windows: cm_Rename break in
9cf7a628c2ff178b2fa236d2c0a41ca9be315036
9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of
a file to a name that does not exist. Put back the code that
makes that possible with a comment.
Change-Id: I19dddded27a32b6ffa86d1458b7a1e2253705e97
Reviewed-on: http://gerrit.openafs.org/5735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
7a426424b7fb45659f6000a564e8c71a9108a33c)
Reviewed-on: http://gerrit.openafs.org/5943
Jeffrey Altman [Fri, 28 Oct 2011 15:36:10 +0000]
Windows: out of date version not in current chunk
In buf_GetNewLocked(), the comparision to decide whether a
cm_buf_t is a member of the current chunk must take the data
version into account. If the data version is out of date, it
is not part of the current chunk and is an object that can be
safely recycled.
Change-Id: I2d1699163925c881990b0f647bba1e8dd05d3f4d
Reviewed-on: http://gerrit.openafs.org/5734
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
1dad690fc34fdd8d9df8a3be6d580441b7cae8bb)
Reviewed-on: http://gerrit.openafs.org/5942
Jeffrey Altman [Thu, 27 Oct 2011 21:57:25 +0000]
Windows: only flush buffers on shutdown if running
If a service shutdown message is received prior to the
service entering the running state, do not attempt to
buf_CleanAndReset() because the required data structures
and locks are not initialized.
Change-Id: I4257cfcd1179a6d118975b6b813213c8aae232ed
Reviewed-on: http://gerrit.openafs.org/5733
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
9743f5729d1a55513e861bb1334599a8e597de6b)
Reviewed-on: http://gerrit.openafs.org/5941
Jeffrey Altman [Tue, 25 Oct 2011 19:32:11 +0000]
Windows: Do not EEXIST exact match during rename
AFS Rename operations on the file server will delete a
target file if it exists. Do not prevent renames because
an exact match of the target name exists in the target
directory.
Change-Id: I2d7c3283dc6433d1d1276e1406eb383b0f2853ac
Reviewed-on: http://gerrit.openafs.org/5731
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
9cf7a628c2ff178b2fa236d2c0a41ca9be315036)
Reviewed-on: http://gerrit.openafs.org/5940
Jeffrey Altman [Tue, 25 Oct 2011 19:42:44 +0000]
opr: build on Windows after queue.h move
55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows.
update the NTMakefile in src/util and src/opr to correspond
to the move of queue.h.
Change-Id: Ie74289712a442d01fdb15315a974f7430c3e8f48
Reviewed-on: http://gerrit.openafs.org/5732
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
8fce3848d94f9717323bbd5dc51a9d18956fa2b5)
Reviewed-on: http://gerrit.openafs.org/5939
Rod Widdowson [Sat, 22 Oct 2011 15:46:26 +0000]
Windows: Look for 8.3 name when doing a rename
If we are doing a destructive rename we need to find whether the
target file exists. This is done in the usual way (case sensitive
case insensitive), but the short name is not looked for.
This means that the rename of a file to a short name will not
supersede correctly; rather the service refuses the rename since
the target existed already.
This patch looks the target name up in the shortname tree if the
target name is short and all else has failed.
Change-Id: Ib03a87e58a9f015000fc2bf3a4067b8683032a49
Reviewed-on: http://gerrit.openafs.org/5652
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
241d3d54cebfc661cfaec6d21de091d906df3d08)
Reviewed-on: http://gerrit.openafs.org/5938
Peter Scott [Thu, 20 Oct 2011 18:39:31 +0000]
Windows: New Trace for DirEntry tracking problem
Incuded in this patch is additional trace for logging how
directory entries are added, modified and deleted throughout
the redirector
Change-Id: If66c2790d8c8ec65733c20f52da4e98ec964ac82
Reviewed-on: http://gerrit.openafs.org/5640
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
159003395a6183266ad9672f12482b1cba6ba0ff)
Reviewed-on: http://gerrit.openafs.org/5937
Jeffrey Altman [Mon, 17 Oct 2011 13:29:37 +0000]
Windows: Free work item memory with tag value
For consistency throughout the source module, free all work
item memory allocations with ExFreePoolWithTag.
Change-Id: I96eb3fc9f4cad11133b20354b88c5c71f340bc32
Reviewed-on: http://gerrit.openafs.org/5627
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
f0cc4c5dd0c03e4074fc70583215e590623e2414)
Reviewed-on: http://gerrit.openafs.org/5936
Jeffrey Altman [Mon, 17 Oct 2011 13:28:11 +0000]
Windows: free pointer after last reference
This is a superficial change but is being done for readability.
If given the choice of freeing memory and then testing the pointer
value or vice-versa, test the pointer value first.
Change-Id: I84666e0bc2e06641c3d0d4ae16f42db996470f32
Reviewed-on: http://gerrit.openafs.org/5626
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
d5a6a895e3b004666b0d6aaa9fe4313b0a831dbd)
Reviewed-on: http://gerrit.openafs.org/5935
Jeffrey Altman [Mon, 17 Oct 2011 13:26:13 +0000]
Windows: AFSInitPIOCtlDirectoryCB free in try_exit
Process all conditional release of allocated memory on
failure within the try_exit on failure.
Change-Id: I818b75d3a1efae2b1ee8ce77f3606d29862a2446
Reviewed-on: http://gerrit.openafs.org/5625
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
ada5908ca1ed8cfa7bfc42890ac5edc73769ae4c)
Reviewed-on: http://gerrit.openafs.org/5934
Jeffrey Altman [Tue, 25 Oct 2011 17:30:19 +0000]
Windows: close leak in AFSPrimaryVolumeWorkerThread
Prevent a leak of the non-paged pool and a Resource by freeing all
allocations within the Specific.Directory.PIOCtlDirectoryCB object.
Use AFSExFreePool() instead of ExFreePool() because the objects
are allocated from the AFSRedir.sys driver allocator.
FIXES 130280
Change-Id: I4385c6ac60dce0949aa32e95e358d81e1434bb4a
Reviewed-on: http://gerrit.openafs.org/5730
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
782fba58db1210e998ef9c6a50803262ac256812)
Reviewed-on: http://gerrit.openafs.org/5933
Jeffrey Altman [Tue, 25 Oct 2011 01:14:59 +0000]
Windows: afsredir only wants shortName if not 8.3
When performing a directory enumeration for the afs redirector
only specify a shortname if the name is not valid 8.3.
Change-Id: I14d30aabafc10d09363fd6101e339b4a9e7407b3
Reviewed-on: http://gerrit.openafs.org/5727
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
61b04b19ad4bf2c62ec4309efeba4f442a54d8f2)
Reviewed-on: http://gerrit.openafs.org/5932
Jeffrey Altman [Thu, 20 Oct 2011 18:06:47 +0000]
Windows: Use SetFlag macro when setting flag
Change-Id: I3e4a643e1f3cd257324d4fe58cb779cd0894a25f
Reviewed-on: http://gerrit.openafs.org/5642
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
219624206ddee454e6bcbac7da7fe2fe632e39a7)
Reviewed-on: http://gerrit.openafs.org/5931
Jeffrey Altman [Thu, 20 Oct 2011 18:05:59 +0000]
Windows: minor typo in trace output
Change-Id: I5dba1a39a68d1de880e2f72ae5377ca1ddc239f5
Reviewed-on: http://gerrit.openafs.org/5641
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
e21a063217f99ac441bb65c7e1f628de2a0fbb68)
Reviewed-on: http://gerrit.openafs.org/5930
Peter Scott [Tue, 18 Oct 2011 14:04:48 +0000]
Windows: AFSRemoveCaseInsensitiveDirEntry corrections
If there is a fLink but no parentLink for the DirEntry being
removed, return the fLink as the new value for *RootNode.
This patch set also includes two changes that improve readability
but do not alter the behavior.
Change-Id: Id44d0d4897b002551039fe2016b529a838d61913
Reviewed-on: http://gerrit.openafs.org/5638
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
81bfacca545e7394a13baa569a6b7c894fc36bde)
Reviewed-on: http://gerrit.openafs.org/5929
Jeffrey Altman [Mon, 17 Oct 2011 13:22:53 +0000]
Windows: AFSEvaluateTargetByName free buffer if no return
For consistency with other functions in AFSCommSupport
modify AFSEvaluateTargetByName to free the DirEntry on
completion if the caller has not provided an out parameter
to accept it.
Change-Id: I7c59d215ffc37b160b60989a716ac61f609a5b2d
Reviewed-on: http://gerrit.openafs.org/5624
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry-picked from
46a96ee06582178eb88e8ca1c7fbb33fae79b403)
Reviewed-on: http://gerrit.openafs.org/5928