3 ms·
You could solve item #2 by simply having the kernel lie about the recursive parents of each mount point. Basically, when you mount a filesystem, anyone asking f
by apenwarr 6y ago
You could solve item #2 by simply having the kernel lie about the recursive parents of each mount point. Basically, when you mount a filesystem, anyone asking for the mtime of a parent (even across filesystems) will return max(real_mtime, root_of_mountpoint_mtime). When you unmount it, the parent mtimes might jump backwards, but that's fine, since we've established that mtime sometimes goes backwards anyway. Any change in mtime is sufficient to trigger a change detection according to the rules in the post.