From: Jeffrey Altman Date: Wed, 28 Jun 2006 16:00:33 +0000 (+0000) Subject: windows-bulkstat-eaccess-20060628 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1229 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a8dc93bf9f93a1ab74972c41d09af01da93ff230;p=packages%2Fo%2Fopenafs.git windows-bulkstat-eaccess-20060628 New CM_SCACHEFLAG_EACCESS flag is used to track whether the status information was the result of an EACCESS error during an inline bulk status call. If so, we have a callback but did not get any status info. When this flag is set we include the entry in future bulk status calls but otherwise treat the cm_scache entry as if it has a valid callback. The callback will be revoked if the ACLs on the object changes. --- diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index c411d14fe..b7910991a 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -1169,8 +1169,11 @@ void cm_MergeStatus(cm_scache_t *scp, AFSFetchStatus *statusp, AFSVolSync *volp, #endif /* AFS_FREELANCE_CLIENT */ if (statusp->errorCode != 0) { + scp->flags |= CM_SCACHEFLAG_EACCESS; osi_Log2(afsd_logp, "Merge, Failure scp %x code 0x%x", scp, statusp->errorCode); return; + } else { + scp->flags &= ~CM_SCACHEFLAG_EACCESS; } if (!(flags & CM_MERGEFLAG_FORCE) diff --git a/src/WINNT/afsd/cm_scache.h b/src/WINNT/afsd/cm_scache.h index 78c942eb4..0384c1997 100644 --- a/src/WINNT/afsd/cm_scache.h +++ b/src/WINNT/afsd/cm_scache.h @@ -245,9 +245,7 @@ typedef struct cm_scache { #define CM_SCACHEFLAG_ANYWATCH \ (CM_SCACHEFLAG_WATCHED | CM_SCACHEFLAG_WATCHEDSUBTREE) -#define CM_SCACHEFLAG_NO64BITOPS 0x200000 /* only supports - 32-bit fetch/store - operations */ +#define CM_SCACHEFLAG_EACCESS 0x200000 /* Bulk Stat returned EACCES */ /* sync flags for calls to the server. The CM_SCACHEFLAG_FETCHING, * CM_SCACHEFLAG_STORING and CM_SCACHEFLAG_SIZESTORING flags correspond to the diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 4af4907c9..7ee026d8a 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -1840,7 +1840,7 @@ long cm_TryBulkProc(cm_scache_t *scp, cm_dirEntry_t *dep, void *rockp, if (tscp) { if (lock_TryMutex(&tscp->mx)) { /* we have an entry that we can look at */ - if (cm_HaveCallback(tscp)) { + if (!(tscp->flags & CM_SCACHEFLAG_EACCESS) && cm_HaveCallback(tscp)) { /* we have a callback on it. Don't bother * fetching this stat entry, since we're happy * with the info we have. @@ -1999,7 +1999,7 @@ cm_TryBulkStat(cm_scache_t *dscp, osi_hyper_t *offsetp, cm_user_t *userp, * Right now, be pretty conservative: if there's a * callback or a pending call, skip it. */ - if (scp->cbServerp == NULL + if ((scp->cbServerp == NULL || (scp->flags & CM_SCACHEFLAG_EACCESS)) && !(scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING