Messages in this thread | | | Date | Tue, 25 Aug 2009 14:13:56 +0200 | From | Pavel Machek <> | Subject | Re: Starting a grad project that may change kernel VFS. Early research |
| |
> 2) Second Question. The two part idea. > I was thinking that a good way to handle this is that it starts with > a file change in a directory. The directory entry contains a sum already > for itself and all the subdirs and an adjustment is made immediately to > that, it should be in the cache. Then we queue up the change to be sent > to the parent(s?). These queued up events should be a low priority at a > more human time like 1 second. If a large number of changes come to a > directory, multiple adjustments hit the queue with the same (directory > name, inode #?) and early ones are thrown out. So levels above would see > at most a 1 per second low priority update. > > So when you issue a 'du -sh' or use anything that uses stat like > filelight, it can get the size of all the subdirs without actually > recursing through them, they have been built up over time.
I'd suggest you look at jack's recursive mtime idea, and then implement your features on top of that, in userland.
-- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |