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>
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;
#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[];
(*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;