Re: [PATCH 00/32] VFS based Union Mount (V3)

From: Miklos Szeredi
Date: Tue Jun 16 2009 - 11:19:37 EST


On Mon, 8 Jun 2009, Valerie Aurora wrote:
> On Wed, May 20, 2009 at 11:05:27AM +0200, Miklos Szeredi wrote:

> > The big reason why kernel impementation of readdir is hard is that
> > unswappable kernel memory needs to be used for caching directory
> > contents while the directory is open. Well, tmpfs does the same,
> > dentries and inodes are _not_ swappable, and they gobble up memory.
>
> That's a good point. It seemed to me that it wouldn't be too
> difficult to make those entries evictable - drop a reference count and
> set the ->d_release to mark the directory as needing rebuilding. What
> do you think?

AFAICS, there are nontrivial problems to deal with:

If directory is still open, child dentries must not go away.

If directory is closed, and at least one child is evicted, then the
whole directory is unusable and needs to be rebuilt on next readdir.

If we can solve those in a non-racy way than it might work. I suspect
however, that some additional code in union-mounts that adds all this
functionality without reusing tmpfs would actually be simpler to
implement.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/