LICENSE MIT
Fix smb_FindFIDByScache() to avoid obtaining the smb_fid_t.mx and
smb_rctLock out of order. Doing so requires obtaining references
on each smb_fid_t belonging to the smb_vc_t in order to prevent them
from being removed from the list while the list is being walked.
Reorder tests for CM_SCACHEFLAG_DELETED and smb_fid_t.scp to make
them more efficient and consistent.
When processing Tran2SetPathInfo do not fail because an smb_fid_t
cannot be found for the path object. The PathInfo function is
being used because we do not have a file descriptor. Most importantly
do not fail by returning success.
LICENSE MIT
Problems with the cm_Rename() functions:
* when a rename occurs across directories, the file server allocates
a new vnode which in turn alters the FID. Since the new FID and
potentially version number is unknown to the client, it is not
possible to update the target directory with the new name and
FID thereby avoiding reading the directory from the file server.
* when the old vnode is removed, the callback is broken but the
client did not discard the cm_scache_t object
In order to optimize the client cache AFS requires a RXAFS_RenameEx
rpc that is equivalent to the current RPC but returns the new FID
and status. This would permit the cache manager to relabel the
data buffers and cm_scache_t that are known to contain valid data.
LICENSE MIT
When processing SMB_SESSION_SETUP_ANDX in smb_ReceiveV3SessionSetupX
it is possible that the smb client might indicate that it requires an
Mpx Count greater than we are configured to support. If so, log it
to the Windows Event Log as a warning.
It is also possible that the client might specify that its maximum
receive buffer is smaller than the SMB_PACKETSIZE. If so, log it
to the Windows Event Log as a warning.
Finally, if the client specifies a virtual circuit number of zero,
the client thinks this is its first time communicating with us.
In which case we should invalidate all prior virtual circuits.
We also log this request to the Windows Event Log as informational.
LICENSE MIT
FIXES 124293
As evident in a crash dump, there is a race surrounding access to the
scp field of the smb_fid_t object. Not all access was protected by
the smb_fid_t mx and the cm_scache_t object was not always being
reference counted within the accessing function.
This patch ensures that all initial references to the scp object
are performed under the smb_fid_t mx mutex and that the cm_scache_t
is prevented from being recycled by obtaining a local reference.
Finally, CM_ERROR_BADFD is returned as an error if a request begins
after the smb_fid_t scp field has already been cleared by a smb_CloseFID()
call as part of a concurrent request.
LICENSE MIT
FIXES 124276
A readonly volume with multiple instances was being marked alldown
when one of the instances resulted in VNOVOL because the vldb and
the indicated file server were out of sync. The cache manager would
then attempt to re-obtain the volume location info from the vldb
for the entire timeout period.
This patch:
adds trace logging to cm_Analyze indicating which server references
are being deleted and which remain in response to a VNOVOL/VMOVED error.
adds trace logging to cm_UpdateVolumeStatusInt showing how the
new volume status value is determined.
corrects cm_Analyze() so that it doesn't corrupt the server reference
list during cm_FreeServerList() calls; doesn't orphan the server reference
list by setting *serverpp to NULL; and only re-obtains the volume info
list once per request.
LICENSE BSD
In rxi_WritevProc the queueScan that sets RX_PKTFLAG_TQ on the packet
really needs to cast the queue objects to rx_packet instead of rx_call.
Trashing random fields is not a good idea.
LICENSE BSD
Fix the -parallel example in the main description text: "5all" should be
"all5". Reword the description a bit to hopefully make it clearer that
there are two separate values set here. Note under the option description
of -parallel that multiple partitions on the same device are normally
processed serially.
LICENSE BSD
change nb_qpathinfo() 'Flag' to a thread local storage variable
'EnforcePathInfoErrors'.
Add new 'Type' values that permit the enforcement to be turned on and off
as needed by the test script.
Populate the IoBuffer with the low byte of the pid value.
====================
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.
====================
LICENSE BSD
Verified the state of every file's existence at every Query Path Info
call in the script. Added 'Type' == 1 (Does not Exist) as needed.
Removed the use of 'Type' == 1111 to disable enforcement part way through.
LICENSE MIT
Do not unload afsrpc.dll as it cannot clean up after itself and
become safe to reload.
Instead of reporting that the AFS client is off-line, report the
path that is unreachable.
LICENSE MIT
rename torture.exe to wintorture.exe to match the name expected by stress.exe
increase length of "Locker" to permit longer paths
do not strip \\afs unc server name. treat all unc paths equal
add GetLastError values to logged error messages
clarify error messages when missing input params
print all errors on a single line. quote paths and command strings
fix the initialization of the IoBuffer for writes. initialize the
whole buffer not just the sizeof(pointer)
remove the static declaration of Flag in nb_qpathinfo()
obtain real HANDLEs for directories. Do not fake them.
LICENSE BSD
A test application that produces verifiable random test files.
====================
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.
====================
LICENSE BSD
make it build in the openafs build tree
LICENSE BSD
adds macros to support accessing some variables as atomics, when atomic
support is available; otherwise falls back to mutex-protected access.