From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268977AbUJEKP1 (ORCPT ); Tue, 5 Oct 2004 06:15:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268980AbUJEKP0 (ORCPT ); Tue, 5 Oct 2004 06:15:26 -0400 Received: from mx1.redhat.com ([66.187.233.31]:63167 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S268977AbUJEKOv (ORCPT ); Tue, 5 Oct 2004 06:14:51 -0400 From: David Howells In-Reply-To: <24616.1096914276@redhat.com> References: <24616.1096914276@redhat.com> To: Linux filesystem caching discussion list Cc: linux-kernel@vger.kernel.org Subject: [RFC] Splitting CacheFS into general manager and cache backend bits User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Tue, 05 Oct 2004 11:14:45 +0100 Message-ID: <6260.1096971285@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I've whipped up a patch to split CacheFS into two: (1) FS-Cache This is a general cache manager that the interested netfs's talk to. It is supplied with a number of cache backends over which it distributes the operations from the netfs's. (2) CacheFS This is then made into a cache backend. The act of mounting a block device as cachefs causes the space contained therein to be made available through FS-Cache. To give you a clearer idea of what I'm thinking, this diagram might help: +---------+ | | +-----------+ | NFS |--+ | | | | | +-->| CacheFS | +---------+ | +----------+ | | /dev/hda5 | | | | | +-----------+ +---------+ +-->| | | | | | |--+ +-------------+ | AFS |----->| FS-Cache | | | | | | |----->| Cache Files | +---------+ +-->| | | /var/cache | | | |--+ +-------------+ +---------+ | +----------+ | | | | | +-------------+ | ISOFS |--+ | | | | | +-->| ReiserCache | +---------+ | / | +-------------+ So, for example, you might have a block device mounted with CacheFS as one of your backends, the traditional bunch of cache files as another backend and some sort of Reiser4 plug-in as a third backend. A netfs only has to be modified to take account of FS-Cache. It then shouldn't need to be modified further to support each different type of cache. David