mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 08:20:16 +00:00
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:
parent
94f96c6aae
commit
e04f324b5d
@ -1969,7 +1969,6 @@ long cm_NameI(cm_scache_t *rootSCachep, clientchar_t *pathp, long flags,
|
|||||||
int symlinkCount; /* count of # of symlinks traversed */
|
int symlinkCount; /* count of # of symlinks traversed */
|
||||||
int extraFlag; /* avoid chasing mt pts for dir cmd */
|
int extraFlag; /* avoid chasing mt pts for dir cmd */
|
||||||
int phase = 1; /* 1 = tidPathp, 2 = pathp */
|
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 */
|
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 fid_count = 0; /* number of fids processed in this path walk */
|
||||||
int i;
|
int i;
|
||||||
|
@ -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 "@vol:"
|
||||||
#define CM_PREFIX_VOL_CCH 5
|
#define CM_PREFIX_VOL_CCH 5
|
||||||
|
|
||||||
|
/* Maximum number of expanded components in a path */
|
||||||
|
#define MAX_FID_COUNT 512
|
||||||
|
|
||||||
/* arrays */
|
/* arrays */
|
||||||
|
|
||||||
extern fschar_t cm_foldUpper[];
|
extern fschar_t cm_foldUpper[];
|
||||||
|
@ -148,8 +148,8 @@ RDR_SetInitParams( OUT AFSRedirectorInitInfo **ppRedirInitInfo, OUT DWORD * pRed
|
|||||||
(*ppRedirInitInfo)->GlobalFileId.Hash = cm_data.rootFid.hash;
|
(*ppRedirInitInfo)->GlobalFileId.Hash = cm_data.rootFid.hash;
|
||||||
(*ppRedirInitInfo)->ExtentCount.QuadPart = cm_data.buf_nbuffers;
|
(*ppRedirInitInfo)->ExtentCount.QuadPart = cm_data.buf_nbuffers;
|
||||||
(*ppRedirInitInfo)->CacheBlockSize = cm_data.blockSize;
|
(*ppRedirInitInfo)->CacheBlockSize = cm_data.blockSize;
|
||||||
(*ppRedirInitInfo)->MaxPathLinkCount = 512; /* this needs to become a registry value */
|
(*ppRedirInitInfo)->MaxPathLinkCount = MAX_FID_COUNT;
|
||||||
(*ppRedirInitInfo)->NameArrayLength = 32; /* this needs to become a registry value */
|
(*ppRedirInitInfo)->NameArrayLength = MAX_FID_COUNT;
|
||||||
if (cm_virtualCache || cm_data.bufferSize <= maxMemoryCacheSize) {
|
if (cm_virtualCache || cm_data.bufferSize <= maxMemoryCacheSize) {
|
||||||
osi_Log0(afsd_logp, "RDR_SetInitParams Initializing Memory Extent Interface");
|
osi_Log0(afsd_logp, "RDR_SetInitParams Initializing Memory Extent Interface");
|
||||||
(*ppRedirInitInfo)->MemoryCacheOffset.QuadPart = (LONGLONG)cm_data.bufDataBaseAddress;
|
(*ppRedirInitInfo)->MemoryCacheOffset.QuadPart = (LONGLONG)cm_data.bufDataBaseAddress;
|
||||||
|
Loading…
Reference in New Issue
Block a user