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.
LICENSE MIT
An implementation of Asanka's idea.
Avoid the need to update the data version number on each buffer associated
with a scache when MergeStatus is called after a StoreData by maintaining
a range of valid data versions as part of the cm_scache_t object.
LICENSE MIT
Improve parallelism by using InterlockedIncrement and InterlockedDecrement
to adjust the refCount fields of cm_buf_t and cm_scache_t objects. This
permits read locks to be used for increments and decrements but requires
a write-lock to perform any actions based upon the refCount hitting zero.
Inline cm_FidCmp to further improve performance.
Remove unused variables.
LICENSE MIT
1. Change RxEnableHotThread default to 'on'
2. Add a 'hash' value to the cm_fid_t structure in order to speed up cm_FidCmp().
Add cm_SetFid() for use in constructing a fid complete with the hash.
3. Redefine the BUF_HASH and BUF_FILEHASH in terms of the cm_fid_t hash which
has a better distribution
4. Modify cm_ConsiderPrefetch to evaluate the amount of data in the most recent
read request instead of the next chunkSize. cm_chunkSize can be dozens or
hundreds of buffers. As a result too much time is spent performing the
evaluation.
5. Fix the usage of cm_scache_t bufCreateLock. The purpose of this lock is
to prevent the creation of new buffers while a truncation is being performed.
All references to bufCreateLock have been removed except in two places:
i. a write-lock surrounding the function that calls buf_Truncate()
ii. a read-lock within buf_GetNewLocked() that actually allocates new
buffers
6. Modify the CM_CONFIG_DATA_MAGIC value to include a CM_CONFIG_DATA_VERSION
number which value be used to force the replacement of the cache file
contents when incompatible changes are made between releases.
7. CM_SCACHESYNC_ASYNCSTORE should not be ordered by cm_SyncOpCheckContinue
8. Avoid calls to multi_Rx if nconns == 0
9. Modify smb_WriteData to perform background writes based upon the crossing
of buf_blockSize boundaries instead of cm_chunkSize boundaries. This will
slow down writes from the SMB interface but will avoid the risk of
the CIFS client disconnecting from the AFS client SMB server.
LICENSE MIT
Add RxEnableHotThread registry option to permit rx_enable_hot_thread
to be set. The default is off for the moment but turning it on does
provide significant performance benefits.