If cm_SyncOp is called with the buffer locked, it must be returned
locked even on error.
(cherry picked from commit ae9a07a8e0a5d0e83e138ef9bbd71b3e7e0072ea)
When Freelance mode is not in use the cache manager must load the root.afs
volume of the default cell in order to be able to start. Unfortunately,
if the first vlserver fails the request to obtain the volume information
will timeout and no retries will be performed. This patch performs up
to 10 retries in the initialization code in order to enable the vlservers
to be marked down so that failover can occur.
(cherry picked from commit 4859232df55c94232a70d602cafe6a8bcc72d9dd)
In h_FindClient_r it was possible for the wrong client to be returned
and worse for it to be returned without the reference count being
incremented.
(cherry picked from commit 06fa1f9c40432747724e6e55154bf54e1e3e94c5)
FIXES 34073
* checks for client == oldClient
* drops the H_LOCK prior to obtaining the WriteLock on oldClient
in order to prevent a deadlock
(cherry picked from commit efd74baa950133de6ed92b7395be6d14ef63a58e)
"the non AFS_GLOBAL_RXLOCK_KERNEL version of
rxi_ReceiveAckPacket() wasnt counting 'hard' acks and not opening the
congestion window. using rx_Readv() directs the incoming packets into
the target iov, and sends a hard ack (skipping soft acks). "
(cherry picked from commit b365b06d34a9450dc53ad22e8ecb3f6d922af5f4)
The "is a directory" value was being set one field beyond the end of
the Standard Info reply structure.
(cherry picked from commit 2c20a3d603fcc654759b8c90924f36468f8aae81)
Include the same set of xdr objects in the shared libafsrpc as are included
in the static libafsrpc.
(cherry picked from commit b8b1438716a14b596a68c2e77d54ca66009c01c2)
Be consistent about reporting mountpoints and invalid links as directories
to the CIFS client.
(cherry picked from commit 422f2d4523ae9be2ff3f1395db1dd62b0b3a3b4b)
A deadlock was detected when performing "fs flushall" if the file
server reports VNOVNODE. The scp->createBufferLock is already
held by the current thread and there is no mechanism to propagate
the knowledge. Therefore, an alternate mechanism for clearing the
cache must be developed. A new function cm_RecycleSCache(scp,flags)
has been extracted from cm_GetNewSCache(). This function performs
the task of recycling an cm_scache_t object. When called from
cm_GetNewSCache() with no flags the expectation is that there are
no associated buffers that are queued to be read or written. When
called from cm_Analyze() with the CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS
flag, any queued buffers will be de-queued and marked as if the operations
were performed so the data can be discarded.
This patch also addresses the following issues:
* CM_ERROR codes were logged as "unknown" by cm_Analyze.
* In response to VNOVNODE, the parent is only discarded if the current
cm_scache_t is not a directory.
* In the Ioctl FlushFile and FlushVolume functions, there were no
checks to protect against flushing the Freelance SCache entries.
* In FlushFile, the wrong cm_scache_t object was being released.
* In cm_GetNewSCache, do not allow Freelance SCache entries to be
recycled. Choose a new entry if cm_RecycleSCache fails.
(cherry picked from commit f4f09d1c03cf738de6f73fc9d56502babd6743b4)
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.
(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)
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)