Speed up the performance of the cache manager by not holding the
smb_fid_t mutex across calls to cm_SyncOp and AFS RPCs.
Ensure that all smb_fid_t flag references are protected.
(cherry picked from commit 87313c96b1271b4730a27dcee1b6c062b0a37425)
It is possible to have a valid callback but not to have the
required ACL info for the current user. Force acquisition of
a FetchStatus but do so without making multiple calls.
(cherry picked from commit 83732fdb158e79b64774667ee09fc1b81062707e)
Do not call cm_GetCallback() directly. Always
use cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK)
(cherry picked from commit 40415fe265d8e660f3698d8ab7f93004d589f902)
Dynamically adjust the priority of server threads based upon the age
of the cifs request that is being processed. Bump the priority one
level for each 15 seconds of age.
(cherry picked from commit 7ca1a339cb488fd97015e959e2a17e91e9b56409)
while investigating the cause of the delayed write errors it was observed
that all of the sleep queues are LIFO. This has the side effect of
encouraging starvation. Changing the queues to FIFOs revealed a serious
problem affecting the use of all queues which use both head and tail
pointers. The removal function osi_QRemove does not take a tail pointer
and therefore the pointer is always left hanging. If the number of elements
ever drops to zero the queue becomes corrupted.
Added osi_QRemoveHT to be used whenever head and tail pointers are used.
Updated all callers in afsd.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
fix typo caused by pullup failure
(cherry picked from commit c1e79275079cfa68d73cc3a008c3fb3b201f1068)
Prevent smb_FindVCP from returning dead virtual circuits
Treat "*." as an alias for "all"
(cherry picked from commit b753ef7265b1970d1e38f3c65532af929102e1d6)
FIXES 31966
allocate memory for struct rxkad_cprivate based upon the actual
ticket size not the max ticket size
(cherry picked from commit 1344a69c57f6c2b8e0588e4b18b1178bc596f190)
Do not delete an old host entry because the UUID because the UUIDs
of the clients at the old addresses are wrong. Remove the addresses.
Do not allow the same host,addr,port combination to be added into
the hash table multiple times.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
Add some more logging
Do not allow 'code' to be re-used for probing the uuid of the old host
primary address because we are relying on the value of 'code' to indicate
whether or not RCallBackConnectBack failed. If it did, we mark the
client as VENUSDOWN, if not we marked it as RESETDONE.
====================
log the old addr, not the new one
(cherry picked from commit 69c7d8ae707fd1a145b8eec756526603ddd370b7)
When the client changes IP addresses, in order to obtain optimal
performance it must:
(1) force the replacement of all existing rx connections
(2) ping all up and down servers
(cherry picked from commit 66596cc677e8cbf7fa40ad2962ccc4547692afb5)
another place where dotted notation and port numbers were not being used
in log output.
(cherry picked from commit ada9819fd630f6cbe6fb8d442e79326df1fcdcad)
log whenever a client host does not have an hcps value.
log the host by dotted ip-addr and port number
(cherry picked from commit ea3ed375e8f706456afddd23bff5ebf906565d92)
The old StoreData RPC is only supposed to be valid for files
smaller than 2GB. When StoreData64 was added, StoreData and StoreData64
were implemented as calls to common_StoreData64. This removed the bounds
checking on the old StoreData RPC making it possible for operations
beyond two 2GB to be requested even if the file server cannot support
them. This patch adds a validity check to ensure that the requested
file operations remain below 2GB. Failures return E2BIG.
(cherry picked from commit 9817af2a81eded29eeefcf8ef4445301a7d348ea)
A number of crash reports have been filed with Microsoft in afspthread.dll.
The crashes are occuring as the processes are terminating. In order to
attempt to address this problem this patch adds support for a DllMain()
entry point that is used to cleanup Thread Local Storage and the various
RX queues. One theory is that processes are loading and unloading DLLs
that are linked to afspthread.dll leaving the pthread data in a very
inconsistent state after each unload. By cleaning up the static data
during the unload, if afspthread is loading again it will be forced to
initialize the data once again.
(cherry picked from commit edff1e8788a2cadfd6bb9e08f9cfdbfb491924a6)
FIXES 31202
Remember to perform an OemToChar() conversion of the file name being
queried in Trans2QueryFileInfo
(cherry picked from commit 97a9d1964347e2b4b0f75e749b4d8f36d09fc876)
This patch fixes:
* race conditions around cm_Lock() calls that were not protected
by cm_SyncOp(LOCK) [asanka@secure-endpoints.com]
* deadlocks caused by obtaining smb_fid_t->mx after cm_scache_t->mx
* removes an extra Release smb_fid_t->mx that could result in
releasing a mutex that is not currently held
* changes the log representation of several return codes and fids to
be consistent with other output
(cherry picked from commit bf7404c3510d63b90c2cb15766f8455f79da90fe)
This patch adds code to perform return code error checking for all calls
to the ReadXyz() routines. If the rx connection was lost or if the dump
format being parsed was incorrect there was an opportunity for data to
the processed after an error had already been detected. In the best case
this would have simply resulted in additional work being performed when
it was not necessary but there was also the potential for modifying return
values which would later be used as input to later operations. Better
to simply catch the error when it initially occurs and be done with it.
The ReadString() function had the potential to write into one byte prior
to the start of the input array.
ProcessIndex() would not properly close Fdhandle nor the StreamHandle
if an error was detected.
RestoreVolume() had a problem with the processing of incremental dumps.
Originally AFS supported a concept of incrementals dumps which when
restored would simply add their contents to the existing volume. One
of the distinctions between the incremental and full dumps is that full
dump processing is responsible for removing any vnode entries from the
volume that are not present in the dump file headers. When the incremental
dump support was removed, the RestoreVolume() function was broken. If
a dump file contains multiple Dump Headers, then only the vnode entries
in the first Dump Header would be marked as being restored. Any vnode
entries restored from subsequent Dump Headers would be deleted when the
RestoreVolume() function reached the end. By removing the assignment
of 'tdelo = -1' within the loop that processes the Dump Headers, this
bug is resolved. Although RestoreVolume is only called with the
'incremental' parameter == 0 at the current time, the check for non-zero
values is restored and the "remove unrestored vnodes" functionality is
disabled when a non-zero value is provided.
The ReadVnodes() function did not perform error checking.
(cherry picked from commit 8074632d6938e965d3f02cc07359d85276c25dbc)