Windows: Apply MAX_FID_COUNT to AFS Redirector

Provide consistency between the SMB path parser and the AFS
redirector path processing by using the same constant, MAX_FID_COUNT,
for both.  MAX_FID_COUNT is the maximum number of unique file ids
that can exist in a path after all mount points and symlinks have
been expanded.  The current value is 512.

Change-Id: Ife1a29ce7c064c986589bc9e2836899864da2f76
Reviewed-on: http://gerrit.openafs.org/7412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-05-16 09:52:00 -04:00 committed by Jeffrey Altman
parent 94f96c6aae
commit e04f324b5d
3 changed files with 5 additions and 3 deletions

View File

@ -1969,7 +1969,6 @@ long cm_NameI(cm_scache_t *rootSCachep, clientchar_t *pathp, long flags,
int symlinkCount; /* count of # of symlinks traversed */
int extraFlag; /* avoid chasing mt pts for dir cmd */
int phase = 1; /* 1 = tidPathp, 2 = pathp */
#define MAX_FID_COUNT 512
cm_fid_t fids[MAX_FID_COUNT]; /* array of fids processed in this path walk */
int fid_count = 0; /* number of fids processed in this path walk */
int i;

View File

@ -59,6 +59,9 @@ typedef int (*cm_DirFuncp_t)(struct cm_scache *, struct cm_dirEntry *, void *,
#define CM_PREFIX_VOL "@vol:"
#define CM_PREFIX_VOL_CCH 5
/* Maximum number of expanded components in a path */
#define MAX_FID_COUNT 512
/* arrays */
extern fschar_t cm_foldUpper[];

View File

@ -148,8 +148,8 @@ RDR_SetInitParams( OUT AFSRedirectorInitInfo **ppRedirInitInfo, OUT DWORD * pRed
(*ppRedirInitInfo)->GlobalFileId.Hash = cm_data.rootFid.hash;
(*ppRedirInitInfo)->ExtentCount.QuadPart = cm_data.buf_nbuffers;
(*ppRedirInitInfo)->CacheBlockSize = cm_data.blockSize;
(*ppRedirInitInfo)->MaxPathLinkCount = 512; /* this needs to become a registry value */
(*ppRedirInitInfo)->NameArrayLength = 32; /* this needs to become a registry value */
(*ppRedirInitInfo)->MaxPathLinkCount = MAX_FID_COUNT;
(*ppRedirInitInfo)->NameArrayLength = MAX_FID_COUNT;
if (cm_virtualCache || cm_data.bufferSize <= maxMemoryCacheSize) {
osi_Log0(afsd_logp, "RDR_SetInitParams Initializing Memory Extent Interface");
(*ppRedirInitInfo)->MemoryCacheOffset.QuadPart = (LONGLONG)cm_data.bufDataBaseAddress;