Ignore:
Timestamp:
Sep 4, 2016, 3:28:12 AM (9 years ago)
Author:
bird
Message:

Only invalidate the PATH_OUT and TEMP in kWorker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/kFsCache.h

    r2863 r2868  
    8080/** @name KFSOBJ_F_XXX - KFSOBJ::fFlags
    8181 * @{ */
     82 /** Use custom generation.
     83  * @remarks This is given the value 1, as we use it as an index into
     84  *          KFSCACHE::auGenerations, 0 being the default. */
     85#define KFSOBJ_F_USE_CUSTOM_GEN         KU32_C(0x00000001)
     86
    8287/** Whether the file system update the modified timestamp of directories
    8388 * when something is removed from it or added to it.
    8489 * @remarks They say NTFS is the only windows filesystem doing this.  */
    85 #define KFSOBJ_F_WORKING_DIR_MTIME      KU32_C(0x00000001)
     90#define KFSOBJ_F_WORKING_DIR_MTIME      KU32_C(0x00000002)
    8691/** NTFS file system volume. */
    8792#define KFSOBJ_F_NTFS                   KU32_C(0x80000000)
     93/** Flags that are automatically inherited. */
     94#define KFSOBJ_F_INHERITED_MASK         KU32_C(0xffffffff)
    8895/** @} */
    8996
     
    304311    /** Set if aboslute path.   */
    305312    KBOOL               fAbsolute;
     313    /** Index into KFSCACHE:auGenerationsMissing when pFsObj is NULL. */
     314    KU8                 idxMissingGen;
    306315    /** The cache generation ID. */
    307316    KU32                uCacheGen;
     
    333342    /** Set if aboslute path.   */
    334343    KBOOL               fAbsolute;
     344    /** Index into KFSCACHE:auGenerationsMissing when pFsObj is NULL. */
     345    KU8                 idxMissingGen;
    335346    /** The cache generation ID. */
    336347    KU32                uCacheGen;
     
    365376    KU32                fFlags;
    366377
    367     /** The current cache generation for objects that already exists. */
    368     KU32                uGeneration;
    369     /** The current cache generation for missing objects, negative results, ++. */
    370     KU32                uGenerationMissing;
     378    /** The default and custom cache generations for stuff that exists, indexed by
     379     *  KFSOBJ_F_USE_CUSTOM_GEN.
     380     *
     381     * The custom generation can be used to invalidate parts of the file system that
     382     * are known to be volatile without triggering refreshing of the more static
     383     * parts.  Like the 'out' directory in a kBuild setup or a 'TEMP' directory are
     384     * expected to change and you need to invalidate the caching of these frequently
     385     * to stay on top of things.  Whereas the sources, headers, compilers, sdk,
     386     * ddks, windows directory and such generally doesn't change all that often.
     387     */
     388    KU32                auGenerations[2];
     389    /** The current cache generation for missing objects, negative results, ++.
     390     * This comes with a custom variant too.  Indexed by KFSOBJ_F_USE_CUSTOM_GEN. */
     391    KU32                auGenerationsMissing[2];
    371392
    372393    /** Number of cache objects. */
     
    437458PKFSOBJ     kFsCacheLookupW(PKFSCACHE pCache, const wchar_t *pwszPath, KFSLOOKUPERROR *penmError);
    438459PKFSOBJ     kFsCacheLookupRelativeToDirA(PKFSCACHE pCache, PKFSDIR pParent, const char *pszPath, KU32 cchPath,
    439                                          KFSLOOKUPERROR *penmError);
     460                                         KFSLOOKUPERROR *penmError, PKFSOBJ *ppLastAncestor);
    440461PKFSOBJ     kFsCacheLookupRelativeToDirW(PKFSCACHE pCache, PKFSDIR pParent, const wchar_t *pwszPath, KU32 cwcPath,
    441                                          KFSLOOKUPERROR *penmError);
     462                                         KFSLOOKUPERROR *penmError, PKFSOBJ *ppLastAncestor);
    442463PKFSOBJ     kFsCacheLookupWithLengthA(PKFSCACHE pCache, const char *pchPath, KSIZE cchPath, KFSLOOKUPERROR *penmError);
    443464PKFSOBJ     kFsCacheLookupWithLengthW(PKFSCACHE pCache, const wchar_t *pwcPath, KSIZE cwcPath, KFSLOOKUPERROR *penmError);
     
    459480PKFSCACHE   kFsCacheCreate(KU32 fFlags);
    460481void        kFsCacheDestroy(PKFSCACHE);
    461 void        kFsCacheInvalidateMissing(PKFSCACHE pFsCache);
    462 void        kFsCacheInvalidateAll(PKFSCACHE pFsCache);
    463 
    464 #endif
     482void        kFsCacheInvalidateMissing(PKFSCACHE pCache);
     483void        kFsCacheInvalidateAll(PKFSCACHE pCache);
     484void        kFsCacheInvalidateCustomMissing(PKFSCACHE pCache);
     485void        kFsCacheInvalidateCustomBoth(PKFSCACHE pCache);
     486KBOOL       kFsCacheSetupCustomRevisionForTree(PKFSCACHE pCache, PKFSOBJ pRoot);
     487
     488#endif
Note: See TracChangeset for help on using the changeset viewer.