From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miklos Szeredi Subject: Re: [PATCH 00/32] VFS based Union Mount (V3) Date: Wed, 20 May 2009 11:05:27 +0200 Message-ID: References: <1242662968-11684-1-git-send-email-jblunck@suse.de> <20090519172327.GB722@shell> 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]:42357 "EHLO pomaz-ex.szeredi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbZETJFk (ORCPT ); Wed, 20 May 2009 05:05:40 -0400 In-reply-to: <20090519172327.GB722@shell> (message from Valerie Aurora on Tue, 19 May 2009 13:23:27 -0400) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 19 May 2009, Valerie Aurora wrote: > As Jan said, readdir() of read-only unioned file systems works with a > tmpfs top layer. If you think about it, this is the exact equivalent > of the version of union mounts which used the in-kernel caching > approach - except that it's better, because it reuses existing code > and caches between readdir() calls. Cool, huh? Yeah... OTOH tmpfs is probably a way too heavyweight solution for cases where memory is short, and union mounts would typically be used on such systems. 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. So where's the advantage over implementing a thin deduplicating and caching layer for union mounts? Thanks, Miklos