windows-inlinebulkstat-20060628
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 28 Jun 2006 06:33:28 +0000 (06:33 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 28 Jun 2006 06:33:28 +0000 (06:33 +0000)
fix the timeout conditional and error handling so that all directory
entries will be processed.

now there is a problem in which transitioning from no tokens to tokens
does not result in refreshed data.  something to look into.

src/WINNT/afsd/cm_access.c
src/WINNT/afsd/cm_conn.h
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c

index e3097f9..a40e17e 100644 (file)
@@ -150,7 +150,7 @@ long cm_GetAccessRights(struct cm_scache *scp, struct cm_user *userp,
             return code;
         }       
                 
-        osi_Log1(afsd_logp, "GetAccess parent scp %x user %x", aclScp, userp);
+        osi_Log2(afsd_logp, "GetAccess parent scp %x user %x", aclScp, userp);
         lock_ObtainMutex(&aclScp->mx);
 
        code = cm_GetCallback(aclScp, userp, reqp, 1);
index 9d65a69..fb45484 100644 (file)
@@ -16,6 +16,7 @@
 
 extern unsigned short ConnDeadtimeout;
 extern unsigned short HardDeadtimeout;
+extern long           RDRtimeout; 
 
 typedef struct cm_conn {
        struct cm_conn *nextp;          /* locked by cm_connLock */
index fd34ccd..c411d14 100644 (file)
@@ -1164,9 +1164,15 @@ void cm_MergeStatus(cm_scache_t *scp, AFSFetchStatus *statusp, AFSVolSync *volp,
         statusp->Group = 0;
         statusp->SyncCounter = 0;
         statusp->dataVersionHigh = 0;
+       statusp->errorCode = 0;
     }
 #endif /* AFS_FREELANCE_CLIENT */
 
+    if (statusp->errorCode != 0) {     
+       osi_Log2(afsd_logp, "Merge, Failure scp %x code 0x%x", scp, statusp->errorCode);
+       return;
+    }
+
     if (!(flags & CM_MERGEFLAG_FORCE)
          && statusp->DataVersion < (unsigned long) scp->dataVersion) {
         struct cm_cell *cellp;
index 6ede512..4af4907 100644 (file)
@@ -2020,6 +2020,7 @@ cm_TryBulkStat(cm_scache_t *dscp, osi_hyper_t *offsetp, cm_user_t *userp,
     }  /* while there are still more files to process */
     lock_ObtainMutex(&dscp->mx);
 
+#if 0
     /* If we did the InlineBulk RPC pull out the return code */
     if (inlinebulk) {
        if ((&bb.stats[0])->errorCode) {
@@ -2027,7 +2028,9 @@ cm_TryBulkStat(cm_scache_t *dscp, osi_hyper_t *offsetp, cm_user_t *userp,
                        userp, reqp, &dscp->fid, &volSync, NULL, NULL, (&bb.stats[0])->errorCode);
            code = cm_MapRPCError((&bb.stats[0])->errorCode, reqp);
        }
-    } else { 
+    } else
+#endif 
+    { 
        code = 0;
     }
 
index 0f76c56..d62ef71 100644 (file)
@@ -4230,7 +4230,7 @@ long smb_ReceiveCoreSearchDir(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
                                                       scp->bulkStatProgress)) {
                     /* Don't bulk stat if risking timeout */
                     int now = GetTickCount();
-                    if (now - req.startTime < 5000) {
+                    if (now - req.startTime > RDRtimeout) {
                         scp->bulkStatProgress = thyper;
                         scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
                         dsp->flags &= ~SMB_DIRSEARCH_BULKST;
index d6ab708..667dad5 100644 (file)
@@ -4146,7 +4146,7 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                     LargeIntegerGreaterThanOrEqualTo(thyper, scp->bulkStatProgress)) {
                     /* Don't bulk stat if risking timeout */
                     int now = GetTickCount();
-                    if (now - req.startTime < 5000) {
+                    if (now - req.startTime > RDRtimeout) {
                         scp->bulkStatProgress = thyper;
                         scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
                         dsp->flags &= ~SMB_DIRSEARCH_BULKST;