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.
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.
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
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.
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.
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)
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.
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.
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.
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
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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.