[PATCH 00/22] cache cursors: an introduction
- From
- Chuck Lever <cel@citi.umich.edu>
- Date
- Sep 12, 2005, 14:55 UTC
- Message-ID
- <20050912145543.28120.7086.stgit@dexter.citi.umich.edu>
[ This series is posted for review and comments. ]
The following patch series introduces an abstraction called a "cache cursor" that will eventually allow us to replace the current active_cache array with something else.
A cache cursor represents a position inside the cache. This position has a cache_entry associated with it, of course, but since the cache is ordered, a cache cursor also has the concept of next, previous, and end-of-cache.
With a cache cursor we can build a simple iterator mechanism that calls a particular function for every entry in the cache, in order. This allows us to hide further the specifics of the active cache implementation -- the function gets to see the cache cursor and an element, but does not have direct access to the cache and cannot assume it has a particular structure.
Currently the cache cursor type is just a structure with an integer in it, so it largely mimics the existing implementation.
This patch series is against the "proposed updates" branch, as of a couple of days ago. It has been tested via "make test" and I'm currently using it for my own work without issue.
Signed-off-by: Chuck Lever <cel@netapp.com> --