From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miklos Szeredi Subject: Re: [PATCH 00/32] VFS based Union Mount (V3) Date: Tue, 16 Jun 2009 17:19:06 +0200 Message-ID: References: <1242662968-11684-1-git-send-email-jblunck@suse.de> <20090519172327.GB722@shell> <20090608194404.GC4363@fsbox> Cc: miklos@szeredi.hu, jblunck@suse.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, bharata@in.ibm.com, dwmw2@infradead.org, mszeredi@suse.cz To: vaurora@redhat.com Return-path: Received: from fxip-0047f.externet.hu ([88.209.222.127]:55212 "EHLO pomaz-ex.szeredi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752997AbZFPPTW (ORCPT ); Tue, 16 Jun 2009 11:19:22 -0400 In-reply-to: <20090608194404.GC4363@fsbox> (message from Valerie Aurora on Mon, 8 Jun 2009 12:44:04 -0700) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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