On Thu, 2009-01-15 at 10:04 -0500, Jeff Moyer wrote: > Ian Kent <ra...@themaw.net> writes: > > > But onto the problem. > > > > It should be fairly straight forward to start using the map mtime again. > > The time stamp on cache entries that have been added will be later than > > the mtime if the file map hasn't changed so we can use that. But we also > > need to prevent re-reading the map from the beginning as we populate the > > cache. I was thinking that I could add each entry read during a lookup > > to the cache so that they would be found on subsequent lookups (as long > > as the mtime is earlier than the time stamp). Additionally, I could keep > > track of the file position so I don't read entries already read. It > > likely won't be quite as simple in the end but we really need to do > > something to for really large maps. > > > > Any other thoughts? > > Sure, just read the whole map. Even large maps aren't that big. What > are we talking, 10k? 50k? You're better off reading the whole thing in > at once.
Yeah, that would be best. I'll have a think about how to detect when to do that. Maybe we can rip out that convoluted change detection logic for file maps, after all they should be fairly simple to deal with. Ian _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs