Commit Graph

5086 Commits

Author SHA1 Message Date
Simon Wilkinson
b7fb842b1c keyring-updated-20080310
LICENSE IPL10

revise keyring patch to avoid detection problems with keyring_type_key
2008-03-10 16:44:16 +00:00
Derrick Brashear
9959232682 hpux-param-updates-20080310
LICENSE IPL10

based on suggestion from cg2v@andrew.cmu.edu
2008-03-10 16:22:12 +00:00
Jeffrey Altman
5f6546ecbb windows-afs-execute-only-20080309
LICENSE MIT

If we want to enforce the open for read flag in smb_ReadData we must
also check for execute access.  We map execute access to read access
because AFS doesn't have a separate permission for that.
2008-03-09 15:21:39 +00:00
Jason Edgecombe
6e18cd4108 man-page-afsd-afsdb-20080308
LICENSE BSD
FIXES 89288 89289

Reference RFC 1183 in the AFSDB documentation.
2008-03-09 05:57:29 +00:00
Simon Wilkinson
84a928ddd4 pt-util-com-err-20080308
LICENSE IPL10

prototype afs_error_message() to ensure correct behavior on 64-bit
systems with 32-bit int.
2008-03-09 01:40:14 +00:00
Jeffrey Altman
cdd1e8b878 windows-installer-rxmaxmtu-setting-20080308
LICENSE MIT

change the RxMaxMtu setting to 0 to restore default
behavior (aka performance).  The Cisco VPN 5.0.01.0600
client no longer requires a reduced mtu size for compatibility
with AFS.
2008-03-08 23:38:08 +00:00
Jeffrey Altman
f94e0d5688 windows-config-20080308
LICENSE MIT

raise the daemon count to 4 now that we have a means of avoiding
contention

raise the tracebufsize to 10000 entries
2008-03-08 23:31:52 +00:00
Jeffrey Altman
801b670734 windows-syscfg-getifinfo-20080308
LICENSE MIT

syscfg_GetIFInfo() obtains the current list of IP addresses.
Its a really expensive operation.  Call the function once
and cache the data until the next IP address change instead
of calling it everytime we receive a WhoAreYou or construct a
new server object.  Adds a new global rw lock, cm_syscfgLock
2008-03-08 23:23:48 +00:00
Jeffrey Altman
27008912ec windows-scache-20080308
LICENSE MIT

do not discard data buffers we wish to keep
2008-03-08 23:17:45 +00:00
Jeffrey Altman
c32f5466f0 windows-performance-deadlock-20080308
LICENSE MIT

correct a deadlock when calling HaveCallback
2008-03-08 23:15:54 +00:00
Jeffrey Altman
694202f29e windows-cm-callback-remove-call-mutex-hold-20080308
LICENSE MIT

Remove all of the code in #ifdef HOLD_CALL_MUTEX as we no longer
use it.
2008-03-08 15:43:45 +00:00
Jeffrey Altman
526babc882 windows-eventlog-20080308
LICENSE MIT

we need set privilege not query privilege
2008-03-08 14:15:43 +00:00
Jeffrey Altman
fdcf6bba55 windows-cm-performance-tuning-200803007
LICENSE MIT

This is a first cut at a cache manager statistics monitor
that can be used to determine the necessary cache parameters
to support the working set.

Off by default the performance package can be activated
by setting "daemonPerformanceTuningInterval" in the service
Parameters key.  As with the other daemon interval values
the unit is in seconds.

At service start and each succeeding interval the cache
manager will write statistics to %TEMP%\afsd_performance.txt
showing the relative usage of cm_scache_t, cm_volume_t and
cm_buf_t objects.  The FID statistics keep track of all FIDs
seen by the cache manager during the service session whether
or not they are backed by any live object in the cache.

These statistics are not stored in the cache file.
2008-03-07 22:22:21 +00:00
Jeffrey Altman
1f4ca0f488 windows-cm-conn-20080307
LICENSE MIT

Convert cm_conn_t reference counts to use Interlocked operations.
This permits several cm_serverLock holds to be converted to read
locks.

Add string translation for VL errors to cm_Analyze().

Permit RXKAD errors other than RXKADEXPIRED to be treated as
non-fatal.  Instead immediately retry an alternate server if
there is one.  This will permit the client to continue to
access replicated data from an alternate site if one of the
file servers is misconfigured.
2008-03-07 22:14:41 +00:00
Jeffrey Altman
0479c650c1 windows-cm-server-interlocked-20080307
LICENSE MIT

Convert cm_server_t reference counts to use Interlocked
operations.  This permits almost all of the cm_serverLock
holds to be converted to read locks.

Add missing cm_PutServerNoLock() calls in the multi_Rx
version of cm_CheckServers().  (Thanks to Asanka)
2008-03-07 22:07:40 +00:00
Jeffrey Altman
757ee6da75 windows-vl-noent-response-20080308
LICENSE MIT

Prior to looking up a volume in the vldb the cm_volume_t
object is constructed.  If the response is VL_NOENT the
cm_volume_t object should be removed and place at the
head of the recycling list so that we do not recycle
something we might actually care about.

Convert more cm_volumeLock holds to read locks now
that we are using Interlocked operations to manipulate
the reference counts.
2008-03-07 22:02:22 +00:00
Jeffrey Altman
45200a2698 windows-scache-verification-20080307
LICENSE MIT

Add a hash value verification check for stat cache entries
2008-03-07 17:44:40 +00:00
Jeffrey Altman
73c2fa385a windows-rxstats-default-20080307
LICENSE MIT

set the defaults for RxEnablePeerStats and RxEnableProcessStats back
to 1 (on) so admins are not surprised.
2008-03-07 17:37:35 +00:00
Simon Wilkinson
f637b6292d fakestat-access-for-nautilus-20080307
LICENSE IPL10

in order that nautilus' .directory checks can work without stat()ing every damn
thing, do what we do for the mac, basically.
2008-03-07 17:30:19 +00:00
Jeffrey Altman
5589875561 windows-smb-writedata-crash-20080307
LICENSE MIT
FIXES 88731

If an application opens a file for read only and then attempts to
write to it, we would attempt to release an scp mutex without having
obtained either the scp or the mutex within smb_WriteData

There was no check in smb_ReadData to ensure that the file was opened
for reading.  Add one.
2008-03-07 15:35:38 +00:00
Jeffrey Altman
fb154e60e3 windows-interlocked-volume-refcount-20080306
LICENSE MIT

Switch cm_volume_t objects to InterlockedIncrement/InterlockedDecrement
for reference counting.

Remove protections against null pointers being passed into cm_GetVolume()
Instead, do not call cm_GetVolume() if the pointer is NULL.

Fix a buffer data version comparison that should be bad version number
instead of <= 0.
2008-03-07 01:03:45 +00:00
Derrick Brashear
2137631fb4 dafs-restarting-error-change-20080306
LICENSE IPL10

on VSALVAGE the client will correctly resort its list and fail over to
other replicas, but only for RO where there is more than one replica,
obviously; since in dafs we expect to only delay on salvage this is the most
useful course of action
2008-03-06 16:54:33 +00:00
Derrick Brashear
f58e08baae pioctl-settoken-malloc-fail-check-20080206
LICENSE IPL10

avoid malloc failure panic (oops)
2008-03-06 16:41:14 +00:00
Jeffrey Altman
6a631075c4 windows-afsd-misc-20080306
LICENSE MIT

(1) an attempt to make better use of bandwidth from the BkgDaemon threads
    by preventing the thread from blocking on a vnode that is already
    storing data in another thread

(2) prevents CM_SCACHEFLAG_ASYNCSTORE from being reset on a write failure.

(3) fixes cm_EvaluateSysName to avoid accessing uninitialized memory

(4) prevents a lock leak if the symlink's mountpointstring is too long.
    (This could never actually happen but better to correct the code.)
2008-03-06 14:33:09 +00:00
Derrick Brashear
b651ece9bd large-partition-support-20080305
LICENSE IPL10
FIXES 88811

support partitions over 2tb
2008-03-05 21:51:19 +00:00
Jeffrey Altman
69f9b46e69 windows-scache-mx-to-rw-20080302
LICENSE MIT

Replace the cm_scache_t mutex with a rwlock permitting a small amount
of additional parallelization in places where it is safe to use read
locks instead of write locks.  All functions that eventually call
cm_SyncOp must use write locks.
2008-03-03 04:24:17 +00:00
Jeffrey Altman
ba94313f40 windows-cm_buf-20080302
LICENSE MIT

remove unused constants, data structures and fields
2008-03-02 21:53:42 +00:00
Jeffrey Altman
af2318cfde windows-asyncstore-again-20080301
LICENSE MIT

must write the entire asyncstoresize otherwise dirty buffers are left
for writing by buf_IncrSync thread.
2008-03-01 18:58:54 +00:00
Jeffrey Altman
b47407ae72 windows-buf-more-clean-vnode-speedups-20080301
LICENSE MIT

do not call buf_CleanAsync if you know the buffer isn't dirty
2008-03-01 18:56:23 +00:00
Jeffrey Altman
7083ceec5c windows-freelance-20080301
LICENSE MIT

when support for multiple valid buffer data versions was added
forget to remove the force dv change from the freelance code.
this broken automatic additions of new mount points.
2008-03-01 17:43:16 +00:00
Jeffrey Altman
fb3f10f329 windows-buf-mx-20080301
LICENSE MIT

further reductions in buffer mutex acquisition churn
2008-03-01 16:28:53 +00:00
Jeffrey Altman
3b5a1acef0 windows-eventlog2-20080301
LICENSE MIT

set the registry values on each start.  otherwise, we will never update
the incorrect entries left over from previous installs.
2008-03-01 15:59:07 +00:00
Jeffrey Altman
e4df679d1b windows-eventlog-20080301
LICENSE MIT

somewhere along the way Microsoft stopped opening Event Message files
explicitly.  Instead they search the PATH environment variable for
the specified file.  I think this is broken but simply registering
"afsd_service.exe" instead of the fully qualified path works.
2008-03-01 15:37:09 +00:00
Jeffrey Altman
b8cacec969 windows-smb-asyncstore-20080229
LICENSE MIT

fix it
2008-03-01 04:29:17 +00:00
Jeffrey Altman
114de458ca windows-cm-buf-misc-20080229
LICENSE MIT

(1) Add an undocumented store behind mode for use in testing.  Set
    EnableSMBAsyncStore to 2.  When set all smb_WriteData calls are
    background writes, all calls to cm_FSync are skipped and file close
    operations do not block for dirty buffers to be written.  This
    permits all writes to be performed in the buf_IncrSyncer thread.

(2) Do not use I64 in osi_Log() format strings as all parameters are
    converted to size_t which is 32-bit on 32-bit Windows.

(3) Reduce the number of times the cm_buf_t mutex is obtained, dropped,
    obtained, dropped in buf_IncrSyncer

(4) In buf_CleanAsyncLocked, request that a full chunk be written instead
    of just the current buffer.  cm_SetupStoreBIOD will stop at the
    first clean buffer.  This reduces the overall number of RPCs that
    must be performed.

(5) Define CM_BUF_VERSION_BAD and use it instead of -1.
2008-02-29 22:50:54 +00:00
Jeffrey Altman
fccf05a96d windows-dnlc-20080229
LICENSE MIT

even if dnlc is not going to be used, the data structures must
still be initialized as they are in the cache file.
2008-02-29 15:45:21 +00:00
Simon Wilkinson
737c03a75c configure-enable-warnings-20080228
LICENSE IPL10

add a switch to turn on warnings when using gcc
2008-02-29 15:07:08 +00:00
Kevin McBride
8ffc274282 checkauth-unlock-before-return-20080228
LICENSE IPL10

only matters once you have pthreads, but...
2008-02-29 04:41:50 +00:00
Jeffrey Altman
502aca9e8c windows-libadmin-closesocket-20080228
LICENSE MIT

On Windows close() does not apply to sockets, use closesocket()
instead.
2008-02-29 01:26:45 +00:00
Jeffrey Altman
0546641c0d windows-buf-deadlock-20080228
LICENSE MIT

avoid deadlock in buf_FlushCleanPages().
cannot obtain buffer mutex after a successful
Stabilize call because the scp will be be locked
and obtaining buffer mutex after scache mutex
is a lock order violation.
2008-02-28 18:21:53 +00:00
Jeffrey Altman
e9f7894e35 windows-smb-lock-timeouts-20080228
LICENSE MIT

Attempts to open files which are already write-locked by another
client took forever to return a lock not granted error.  This
was because cm_Analyze() would retry the lock request for up to
the RDRtimeout in response to the EAGAIN error.  The problem
was that cm_IntSetLock() was not setting the CM_REQ_NORETRY flag.

While examining this issue, discovered two other things:

(1) the infinite wait logic on lock request processing was broken
(2) the cancel outstanding lock request logic wasn't implemented
(3) cm_Analyze() would put the thread to sleep even when retries
    were not permitted.

Also removed a number of compile time warnings.
2008-02-28 17:16:28 +00:00
Derrick Brashear
023d3f3bae arm-lwp-adm-20080227
LICENSE IPL10

don't use ucontext lwp on arm linux
2008-02-27 22:26:31 +00:00
Jeffrey Altman
72687c02b6 windows-osi-convertRToW-and-logging-optimizations-20080227
LICENSE MIT

Add lock_convertRToW which permits a read-lock to be upgraded to a
write lock.  If the caller is the only reader it permits a fast
transition otherwise it adds the caller to the waiters queue.

In the osi_Log macros, check to see if the log is enabled before making
the function call.  This avoids significant function call overhead.

In the cache manager, make use of the above.
2008-02-27 17:03:30 +00:00
Jeffrey Altman
107899cefa windows-dnlc-20080226
LICENSE MIT

Remove race conditions in the statistics code by switching to
Interlocked functions.

Speed up cm_dnlcEnter() by searching first with a read lock and
then switching to a write lock if not found.

Add HKLM\SOFTWARE\OpenAFS\Client registry values "UseDNLC" and "Debug"DNLC".
I suspect with the B+tree code that the DNLC is unnecessary overhead but
leave it on by default for now.
2008-02-27 04:53:45 +00:00
Jeffrey Altman
428cac5d6d viced-cleanup-old-addresses-as-they-become-invalid-20080225
LICENSE IPL10

otherwise we can end up with stale addresses when a client uses then leaves an
address never to return
2008-02-26 04:13:16 +00:00
Jeffrey Altman
dd72e06bf1 windows-force-anon-vldb-20080225
LICENSE MIT

For organizations with krb5 aware file servers but transarc or old openafs
vldb servers, add force anonymous vldb lookup option

  HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
	DWORD	"ForceAnonVLDB"  (default is 0)
2008-02-25 22:19:49 +00:00
Jeffrey Hutzelman
f4f7ac048c threadquota-enforcement-fixes-20080225
LICENSE IPL10
FIXES 87416

correctly set and unset HWHO_INPROGRESS as we pass through host probing package.

also, do not block on lock checking for HOSTDELETED. instead, return a null host
and VBUSY; restructure code to allow returning a null host with prejudice.
2008-02-25 20:38:09 +00:00
Jeffrey Altman
d8c932ed73 windows-volume-logsavestring-20080225
LICENSE MIT

remember to save the volume name when logging
2008-02-25 19:34:44 +00:00
Jeffrey Altman
704fddccd0 windows-smb-asyncstoresize-20080225
LICENSE MIT

Further testing on the 115KB AT&T Edge connection shows that 128KB
provides reasonably robust performance with six simultaneous copies of
multi-MB files to AFS.
2008-02-25 15:31:21 +00:00
Jeffrey Altman
f95915a55a windows-smb-async-store-20080224
LICENSE MIT

Add two new configuration knobs to control the behavior of smb_WriteData.

HKLM\SOFTWARE\OpenAFS\Client
  DWORD EnableSMBAsyncStore  (default: 1)
  DWORD SMBAsyncStoreSize    (default: 32K)

Instead of tying the async store size to either the chunksize (too large)
or the buffer block size (too small) provide an intermediate value that
can be independently controlled.

In the future it would be desireable for the async store size to be
dynamically determined based upon measurable characteristics of the
network.  In the meantime, 32KB is an acceptable performance compromise
that should work well on 1Gbit networks and low-speed cellular networks.
2008-02-25 05:33:54 +00:00