[K42-discussion] Volatile directories and revalidation patch
Dilma DaSilva
dilma at watson.ibm.com
Thu Oct 19 12:58:24 EST 2006
This patch has been applied.
Patrick Bozeman writes:
> This patch probably could have been split into a few pieces, but they
> are somewhat intertwined. Let me know if you want it broken up. The
> patch provides 3 things:
>
> 1) Provides a FileInfoVirtFSDirVolatile class. This class is actually a
> combo of static and dynamic directory functionality. It has
> FileInfoVirtFSDirStatic as its base class, so it is possible to add
> static files and perform lookups on them using the static dir methods.
> However, it overrides key methods such as directory enumeration and
> object lookup. For such methods, it first calls the static dir method
> and then a dynamic method implemented by derived classes. This is of
> course useful for directories such as /proc that has a mix of static and
> dynamic content, and for directories like /proc/<pid>/fd that have only
> dynamic content.
>
> 2) getRecLen was moved from a static function in FileInfoVirtFS.C to a
> static member function of FileInfoVirtFSDirBase. This enables derived
> classes outside of this compilation unit to call it (e.g. the derived
> classes used in the procfs server.)
>
> 3) Provides isStale() and shouldRevalidate() methods to the
> FileInfoVirtFSDir class hierarchy and calls them from
> ServerFileDirVirtFS to check and potentially trigger revalidation.
> This causes revalidation to occur before a stale object gets used rather
> than after as was the case before this change. (And it largely avoids
> the bug from my previous email.)
>
> People may have stylistic issues with part number 1 of the patch. Let me
> know what you think.
More information about the K42-discussion
mailing list