On Fri, Sep 07, 2007 at 01:54:18PM -0400, Erez Zadok wrote:
Erez, I agree that there are positives in storing the readdir state
on disk, but ...
lseek problem can also be solved by defining the seek on the cached (in
memory) readdir state. (similar to aufs)
I guess, same performance benefits can be obtained if we leave the
readdir state in memory for sometime. In the Approach 2 which I
described in my original post, the readdir state was stored as part of
the file structure and it remained there until the last close of the
directory.
Yes, keeping the state in memory indefinitely is problematic.
But we can always purge it under memory pressure. If it comes
to that then it is a tradeoff between recreating the state after purging
and having the state stored in a separate physical file system.
Not related directly to readdir, but I had concerns about ODF:
- Creating/Replicating the entire directory tree of the union. So you
can potentially have a very large tree duplicated (ofcouse with zero
length files, but still) in ODF.
- Storing whiteouts in ODF might be a feasible solution for unionfs, but for
union mount it looks like an overhead. You can afford to have an
extra (whiteout) lookup into ODF from your unionfs lookup code, since
you do all this from unionfs filesystems code. But doing anything similar
with union mounts from VFS layer is going to look ugly.
Regards,
Bharata.
-