Commit Graph

9592 Commits

Author SHA1 Message Date
Derrick Brashear
a9007cf81c afsd.fuse: link libopr
needed for rbtrees. linktest does so; we also need to

Change-Id: Ic5c8aaa0727a979212ed4f089d915b106c00fac8
Reviewed-on: http://gerrit.openafs.org/6163
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-12-01 09:57:03 -08:00
Derrick Brashear
25672ad8cd remove CopyOnWrite2 and unused vars
unused static functions make grumpy compilers grumpy.

Change-Id: I2a48e2993193a615bffe331f19948bfc46fba16b
Reviewed-on: http://gerrit.openafs.org/6157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-12-01 06:31:15 -08:00
Derrick Brashear
cdc26d92ed viced: disable accelerated copyonwrite
don't do multistage CoW

FIXES 130295
Change-Id: Iec35619b970d87a72ed497d4bbec0b9415c9ddf7
Reviewed-on: http://gerrit.openafs.org/6135
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-11-30 13:14:52 -08:00
Jeffrey Altman
0c01c36245 Windows: AFSRDFSProvider log to file
For when logging via OutputDebugString() is insufficient, add
a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log.
Set AFSRedirector\NetworkProvider "Debug" to 0x2.

Change-Id: I419bfbe251b8ef58d7c1b7921badde19d72c34e6
Reviewed-on: http://gerrit.openafs.org/6142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:36:21 -08:00
Jeffrey Altman
7ba9129141 Windows: NPEnumResources no Printer support
The AFS Redirector does not support printer shares.  If the
query is for printers only (or any other query that does not
permit disk shares as a response) return no more entries.

Change-Id: Ide9fc58489bed7f4a9cf50da24a98a9b2477b72d
Reviewed-on: http://gerrit.openafs.org/6141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:36:07 -08:00
Jeffrey Altman
31d80e6468 Windows: NPGetConnectionCommon buffer too small
If the specified buffer size is too small, say so.  Do not
attempt to copy data in that won't fit.  Do not walk beyond
the end of the allocated memory.

Change-Id: Id4a75273d8ec9e9cc8471a963bc32f6cad59163e
Reviewed-on: http://gerrit.openafs.org/6140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:35:54 -08:00
Jeffrey Altman
9fa28d7df3 Windows: no drive subst for NPCancelConnection
NPCancelConnection() must use the results of a Get Connection
ioctl to the afs redirector and not the result of Drive Letter
Substitution queries via DosQueryDevice().  Rename NPGetConnection()
to NPGetConnectionCommon() and add a new parameter to indicate
whether drive substitution is ok.

Change-Id: I42cd4488038f128ae90356a41bc538966d9cebed
Reviewed-on: http://gerrit.openafs.org/6139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:35:39 -08:00
Jeffrey Altman
abfa8f0029 Windows: refactor NPCancelConnection
refactor NPCancelConnection to consolidate some conditional
blocks to improve readability.

Change-Id: Ic3aaaac10809caeaab10fdb6c759be8d55d1f75c
Reviewed-on: http://gerrit.openafs.org/6138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:35:25 -08:00
Chris Orsi
d6900a7cd1 Windows: Mount Point and Symlink Overlay Icons
Change-Id: I34b8166664f54878eb58a0dcc3e1241cb977aa5f
Reviewed-on: http://gerrit.openafs.org/6137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:35:12 -08:00
Jeffrey Altman
bd7cecb327 Windows: Wix disable integrated logon by default
One of the significant differences between the NSIS and Wix
installer packages is that NSIS does not activate integrated
logon by default whereas the Wix installer does.  Enabling
integrated logon without configuring the cell, CellServDB,
installing Kerberos v5 and configuring krb5.conf can result
in a very long wait at logon.  Now that NSIS is no longer
being supported and cannot be supported as a native 64-bit
installer mechanism we must disable integrated logon by
default to prevent more bad end user experiences like
@Lotterleben described on Twitter.

Change-Id: I10be4185177f94e53295a7641dd387feb295eaa5
Reviewed-on: http://gerrit.openafs.org/6132
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 15:34:59 -08:00
Simon Wilkinson
043c31bf8d rx: Use a red black tree for the event stack
Instead of the current event stack, which uses a sorted linked
list, use a red/black tree to maintain the timer stack. This
dramatically improves event insertion times, at the expense of
some additional implementation complexity.

This change also adds reference counting to the rxevent
structure. We've always had a race between an event being
fired, and that event being simultaneously cancelled by
the user thread. Reference counting avoids that race resulting
in the structure appearing twice in the free list.

Change-Id: Icbef6e04e01f3eef5b888bc3cb77b7a3d1be26ae
Reviewed-on: http://gerrit.openafs.org/5841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 12:29:41 -08:00
Simon Wilkinson
a9682775fc Unix CM: Build rbtrees in kernel
Build the new opr rbtree code in the Unix kernel module

Change-Id: I8271b209c8c17c4c651f2499cd8f60e44818a828
Reviewed-on: http://gerrit.openafs.org/5842
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 12:28:49 -08:00
Andrew Deason
073edd3fbd udebug: Fix endianness when fudging lastYesHost
hostAddr is in NBO, lastYesHost is in HBO.

Change-Id: Id11046426512c79b8e760841e1e13cf91deb0b4c
Reviewed-on: http://gerrit.openafs.org/6136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-29 11:01:55 -08:00
Jeffrey Altman
82809787d5 Windows: FSync not CleanVnode during Cleanup
cm_FSync() is buf_CleanVnode() plus a sync of metadata which
is required during last handle close.

FIXES 130351

Change-Id: I25635e3c9768dbf7d9501178b99cdd64a5be7789
Reviewed-on: http://gerrit.openafs.org/6134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-28 18:33:10 -08:00
Jeffrey Altman
bf4f9f33dc Windows: Wix cell names can be greater than 120 chars
Increase the permitted length in the UI to 255 characters.

Change-Id: I33d3f546da8b38f89bb88352abcb908879728771
Reviewed-on: http://gerrit.openafs.org/6133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-28 18:32:38 -08:00
Jeffrey Altman
006815ca2f Windows: cache format version change
With the change to the size of the osi_mutex_t and osi_rwlock_t
structures the CM_CONFIG_DATA_VERSION must change to force a
reconstruction of the cache file.

Change-Id: I0aadd2f7c699a5daaa87acf749957ff65d51fe6e
Reviewed-on: http://gerrit.openafs.org/6131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-28 18:32:06 -08:00
Jeffrey Altman
a07338f4cc Windows: osi_mutex / osi_rwlock changes
Reorganize the osi_mutex and osi_rwlock structure so
that all counters are 32-bit and pointers are
aligned.  This requires adding padding fields.

Move lock validation checks within the critical section.

Include additional assertions checking the ownership
state and protecting against under/overflows.

Increase the size of the rwlock tid array to support
a larger number of simultaneous readers.

Change-Id: Ia46684c601a1a589a210a36862ae6ad6448a435e
Reviewed-on: http://gerrit.openafs.org/6130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-28 18:31:51 -08:00
Jeffrey Altman
5d7adc6b67 Windows: convert daemons threads to pthreads
The daemon threads make calls to Rx and therefore need to
be created with the pthread package to prevent the threads
from being tracked as 'native' threads by the pthread_thread_shutdown
thread which can only track up to 63 native threads.

Change-Id: I8d096be9398a0a541bb59eb245cd7b3fe6f3843c
Reviewed-on: http://gerrit.openafs.org/6119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-28 07:51:14 -08:00
Ben Kaduk
8e14168c9c FBSD: cleanup dvp locking for ISDOTDOT
This is a more correct version of
c2ed2577f9, which was reverted since
it caused build issues on some versions and kernel panics on others.

We do want to always unlock dvp before calling over the network
in the ISDOTDOT case, but be sure to use the proper spelling
for this operation (as the syntax has changed between FreeBSD versions).
This requires not unlocking dvp right after the afs_lookup() call if
it succeeds, letting us just lock the "child" vp (which is actually
the parent starting from '/') first, and then re-lock dvp.

The error case of afs_lookup() was already handled correctly in
this logic, which is to say that it was incorrect before this change,
attempting to recursively lock dvp which causes a panic.

Change-Id: Ide29e47991413dadc3a2b5948f0f6c5bfa2911c4
Reviewed-on: http://gerrit.openafs.org/6127
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-27 17:01:55 -08:00
Derrick Brashear
730832073a namei: force-close fd on read or write error
if we errored, just reallyclose so we'll get a new fd

Change-Id: I55de45a96dc7fab481a49c10c68f2ebc0d4ea27c
Reviewed-on: http://gerrit.openafs.org/6126
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-27 17:01:19 -08:00
Edward Z. Yang
0f9214164a Linux: 3: Update specfile to know about 3.* kernels.
Update spec file to be consistent with acinclude.m4 with regards to
sysnames.  We don't bother updating the code inside the legacy kernel
build section, as it doesn't get triggered for 3.* kernels (it should
probably get cleaned up at some point.)

Also, fix a bug in error message printing of unrecognized kernel.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

Change-Id: Ife6046db0bec981be59aa053f63ae71458da7167
Reviewed-on: http://gerrit.openafs.org/6120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-27 07:13:45 -08:00
Simon Wilkinson
2373547a86 Unix CM: Fix PutVolume in afs_BlackListOnce
It isn't safe to keep accessing a structure once we have Put our
reference to it.

Change-Id: I6f23a054c3ccde21aa17e07d06dd3c6e7761c098
Reviewed-on: http://gerrit.openafs.org/6117
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-24 17:36:37 -08:00
Jeffrey Altman
53d55cf353 Windows: add trace logging to Pioctl File Info Query
Change-Id: I357518a341dd97aa94c30ae9c0defa56a97eb920
Reviewed-on: http://gerrit.openafs.org/6110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-23 06:03:50 -08:00
Jeffrey Altman
0301571667 Windows: _._AFS_IOCTL_._ size is zero
When replying to a FileStandardInformation query on the pioctl
special file, the size of the file is 0.  Failure to return 0
can result in an anti-virus program attempting to read the file
via a paging request which will fail.

Change-Id: I83f2f40cca99c04a5fe06546f19bdf96dfbb4951
Reviewed-on: http://gerrit.openafs.org/6109
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-23 06:03:38 -08:00
Jeffrey Altman
039ffe2a03 Windows: RDR_InvalidateObject do not hold locks
Do not hold any locks when calling the afs redirector.  Holding
a lock can cause a deadlock.

Change-Id: I5fb493d68e3cf3a8e58024b3b9f54349928f84c3
Reviewed-on: http://gerrit.openafs.org/6105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-22 13:48:59 -08:00
Jeffrey Altman
d42db13152 Windows: cm_GetSCache do not release unheld lock
if cm_GetNewSCache() fails, an attempt would be made to
release cm_scacheLock which is not held.  However, it should
be noted that cm_GetNewSCache() cannot fail without itself
triggering a panic.

Change-Id: I316e33712440c2bd816294ad788ad125ab7b4a73
Reviewed-on: http://gerrit.openafs.org/6103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-22 13:48:51 -08:00
Jeffrey Altman
887791bacf Windows: Use Jenkins' Hash
Replace the non-string hash functions with Jenkins' Hash
derived hash values.

Bump the cache version value because the hash function has
changed.

Change-Id: I9de789a48abab38ceb16e928bfc0c10e2a88747e
Reviewed-on: http://gerrit.openafs.org/6102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-22 13:48:37 -08:00
Simon Wilkinson
20448059f0 opr: Add Bob Jenkins's hash functions
This imports a small subset of Bob Jenkins lookup3.c hash functions
into the opr library. At present we only import the subset of this
that deals with aligned arrays of integers, as this addresses our
immediate need.

It seems likely that if we're interested in a hash function for string
arrays (or other arbitrary data), that more recent functions such like
SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be
a better solution.

The immediate use case for this is removing the use of the '%' operator
when indexing speed critical hash tables, as well as ensuring fairer
distribution of entries across these tables.

A short set of test cases is also provided

Change-Id: I0ae26382e77da02204a30a95747f7d6de8c4f24a
Reviewed-on: http://gerrit.openafs.org/6095
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-21 07:45:14 -08:00
Anders Kaseorg
f1dd2d696f Linux: 3.2: Use set_nlink to update i_nlink
As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
direct modification.

Change-Id: If0a38ffb7f9964e23f5e64c900ae92f56fb77def
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-20 18:02:11 -08:00
Andrew Deason
e14dec55e6 afs: Leave cellnum alone for explicit mtpt cell
When a mountpoint is given an explicit cell, don't alter cellnum.
Cellnum represents the cell for the parent, and is used for
determining whether or not we're crossing a cell boundary.

Previously, this code forced the mount point to always be treated as
foreign (for a mountpoint prefixed with a cell name), or to always be
treated as local (for a mountpoint prefixed with a cell number).

Change-Id: I7b98ccc94bf61dc3d7be0b7d6b54019cd797e884
Reviewed-on: http://gerrit.openafs.org/6051
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-19 08:11:11 -08:00
Jeffrey Altman
51f71e533b namei: tweak getlinkbyte error handling
in the event of a pread error, add the same error exit path
trigger that we have elsewhere

Change-Id: Id7a371f3fd710f3c6dad21bccb0662cf8562d99f
Reviewed-on: http://gerrit.openafs.org/5843
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-18 08:39:39 -08:00
Michael Meffie
0e3bfa033e auth: avoid excessive stat of cellservdb
The modified time resolution is one second, so only
stat the cellservdb file at most only once per second.

Change-Id: I7d9a58f9af72b8c36b50374e49c07b4db85285e0
Reviewed-on: http://gerrit.openafs.org/5743
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-18 08:35:14 -08:00
Michael Meffie
639ca379e4 vol: rate-limit volume usage updates
Add threshold and time rate-limit parameters for volume usage
updates to disk.  This reduces the amount of i/o needed for
volume usage statistics on very busy fileservers.  Set the
default to limit updates to one every 5 seconds per volume.

Change-Id: I6b4274476ef6b8f9e4288b109d5a3edbdea6e91c
Reviewed-on: http://gerrit.openafs.org/5803
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-11-18 08:34:54 -08:00
Jeffrey Altman
8ce811e343 Windows: RDR_RequestFileExtentsAsync unheld lock
commit 55f5f356af forgot to remove
a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync().

Change-Id: I787ceddcada3659c7b2fae9bb90aa005a71d2ceb
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>
2011-11-18 07:44:48 -08:00
Jeffrey Altman
ac1251ead1 Windows: must obtain and release an actual lock
Change-Id: I2bb490ba3c1db05c4dc7660ca7319d7d96d16c0f
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>
2011-11-18 04:56:28 -08:00
Jeffrey Altman
1379fb6de4 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.

Change-Id: I05e86f62c08e322cf7aa9bdd2fd325919bcbfe8f
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>
2011-11-17 22:06:52 -08:00
Jeffrey Altman
833d076e04 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.

Change-Id: I5b2487056a24d0c4ad78921d85df755758c7679e
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>
2011-11-16 09:12:22 -08:00
Jeffrey Altman
1c97c04add 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.

Change-Id: I3443a5c4ca65472a16cbf7ae1d52da39e917136a
Reviewed-on: http://gerrit.openafs.org/6065
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-16 08:22:01 -08:00
Jeffrey Altman
fd42e08bf1 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.

Change-Id: Ie140d405147d700196532b72f04885a301a2550f
Reviewed-on: http://gerrit.openafs.org/6054
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-16 07:04:41 -08:00
Jeffrey Altman
55f5f356af 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.

Change-Id: Id2ded86c1f3757a2f1071c8cf39f2fbc6bcfcfaa
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>
2011-11-16 07:04:04 -08:00
Jeffrey Altman
042f6c08e3 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.

Change-Id: I319182e4c539c14d06fe62dde2b41a159e4edea6
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>
2011-11-16 06:06:26 -08:00
Jeffrey Altman
320c7292e6 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.

Change-Id: I468e896b046192461d6fe0dc3669e5feeb7886ba
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>
2011-11-16 06:06:08 -08:00
Jeffrey Altman
c904d9a388 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.

Change-Id: I95d9d1f14dbe0c7d717e6a7253ccfb10a9fac851
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>
2011-11-16 06:05:51 -08:00
Andrew Deason
d113c0eb8a vlserver: Avoid atoi for vol ids
Change-Id: I27c30f9320ea6d2093846148ad455eda71b0b713
Reviewed-on: http://gerrit.openafs.org/6050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-15 16:34:27 -08:00
Jeffrey Altman
a1871449ee 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

Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e
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>
2011-11-15 07:30:48 -08:00
Jeffrey Altman
c4d19e5d42 Windows: interlocked refCount increment in cm_GetSCache
Failure to use interlocked operations in cm_GetSCache can
result in an under count

Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c
Reviewed-on: http://gerrit.openafs.org/6046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-15 06:10:09 -08:00
Jeffrey Altman
e55d1774b1 Windows: netidmgr krb5_cc_get_principal can fail
Do not dereference a NULL pointer if krb5_cc_get_principal fails.

Change-Id: Ic213f0c41249931441bcedaf551acaa160ff7f0f
Reviewed-on: http://gerrit.openafs.org/6016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-14 06:49:17 -08:00
Jeffrey Altman
38fbf93fcc 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.

Change-Id: Iee0e39cdf393bfd245829bdfb42ddfba63908451
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>
2011-11-12 17:55:22 -08:00
Jeffrey Altman
5c59d1b500 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.

Change-Id: Idb94275d23c160ee0a2dc8fdcfd0f09506ecb2d3
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>
2011-11-12 17:54:45 -08:00
Jeffrey Altman
eb3c9f783b 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.

Change-Id: Ia8aaa33ca4ab410dc1b0100ea5668d5660d90b75
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>
2011-11-12 17:54:15 -08:00