]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-inlinebulkstat-20060628
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 28 Jun 2006 06:34:50 +0000 (06:34 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 28 Jun 2006 06:34:50 +0000 (06:34 +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.

(cherry picked from commit cb395ac70a2387723b0eceb33afe293d2cbfbf71)

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 e3097f9be1f21933a917d43fc8c4305d7754a25f..a40e17e873c27accea25cd1ba05c4a253aec5a0a 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 9d65a69c8776d654d69ab3d245989b7572bb3931..fb4548444eaf01b44c086370a59a0197dda87ca0 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 fd34ccd5f299589419c6b35bf20c0732b0f14183..c411d14fe9bbdc7de8454744fdee83f5fdea1486 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 6ede5129ca065aa9371d328792449335437559b6..4af4907c976010b96f1617c660742639788a78d9 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 0f76c5643549d10bd4c4b69f2002d4db6d749f5e..d62ef71129acbe2390fce1d77c1038144c48945d 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 d6ab708b0df5c06e20b038b7bc031340de11e405..667dad51efb301af17e656d61d07e6bd1c2effc0 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;