linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/12] FS-Cache: Generic filesystem caching facility
@ 2005-11-14 21:54 David Howells
  2005-11-14 21:54 ` [PATCH 1/12] FS-Cache: Handle -Wsign-compare in i386 bitops David Howells
                   ` (16 more replies)
  0 siblings, 17 replies; 37+ messages in thread
From: David Howells @ 2005-11-14 21:54 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-fsdevel, linux-cachefs, nfsv4, linux-kernel

This series of patches does four things:

 (1) Adds a generic intermediary (FS-Cache) by which filesystems may call on
     local caching capabilities, and by which local caching backends may make
     caches available:

	+---------+
	|         |                        +-----------+
	|   NFS   |--+                     |           |
	|         |  |                 +-->|  CacheFS  |
	+---------+  |   +----------+  |   | /dev/hda5 |
	             |   |          |  |   +-----------+
	+---------+  +-->|          |  |
	|         |      |          |--+   +-------------+
	|   AFS   |----->| FS-Cache |      |             |
	|         |      |          |----->| Cache Files |
	+---------+  +-->|          |      | /var/cache  |
	             |   |          |--+   +-------------+
	+---------+  |   +----------+  |
	|         |  |                 |   +-------------+
	|  ISOFS  |--+                 |   |             |
	|         |                    +-->| ReiserCache |
	+---------+                        | /           |
	                                   +-------------+

 (2) Adds a quasi-filesystem (CacheFS) that can turn block devices into a
     local caches.

 (3) Modifies the kAFS network filesystem to be able to read through this
     cache.

 (4) Documents the netfs interface and the cache backend interface.

Other backends may be added to the system, and other netfs's may be modified
to use caching.

There are a number of reasons why I'm not using i_mapping to do this. These
have been discussed a lot on the LKML and CacheFS mailing lists, but to
summarise the basics:

 (1) Most filesystems don't do hole reportage. Holes in files are treated as
     blocks of zeros and can't be distinguished otherwise, making it difficult
     to distinguish blocks that have been read from the network and cached from
     those that haven't.

 (2) The backing inode must be fully populated before being exposed
     to userspace through the main inode because the VM/VFS goes directly to
     the backing inode and does not interrogate the front inode on VM ops.

     Therefore:

     (a) The backing inode must fit entirely within the cache.

     (b) All backed files currently open must fit entirely within the cache at
     	 the same time.

     (c) A working set of files in total larger than the cache may not be
     	 cached.

     (d) A file may not grow larger than the available space in the cache.

     (e) A file that's open and cached, and remotely grows larger than the
     	 cache is potentially stuffed.

 (3) Writes go to the backing filesystem, and can only be transferred to the
     network when the file is closed.

 (4) There's no record of what changes have been made, so the whole file must
     be written back.

 (5) The pages belong to the backing filesystem, and all metadata associated
     with that page are relevant only to the backing filesystem, and not
     anything stacked atop it.

David

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2005-11-18 22:07 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 21:54 [PATCH 0/12] FS-Cache: Generic filesystem caching facility David Howells
2005-11-14 21:54 ` [PATCH 1/12] FS-Cache: Handle -Wsign-compare in i386 bitops David Howells
2005-11-14 21:54 ` [PATCH 2/12] FS-Cache: Permit multiple inclusion of linux/pagevec.h David Howells
2005-11-14 21:54 ` [PATCH 8/12] FS-Cache: Add generic filesystem cache core module David Howells
2005-11-14 21:54 ` [PATCH 4/12] FS-Cache: Permit pre-allocation of radix-tree nodes David Howells
2005-11-14 21:54 ` [PATCH 6/12] FS-Cache: Add a function to replace a page in the pagecache David Howells
2005-11-14 21:54 ` [PATCH 5/12] FS-Cache: Release page->private in failed readahead David Howells
2005-11-14 21:54 ` [PATCH 3/12] FS-Cache: Add list_for_each_entry_safe_reverse() David Howells
2005-11-14 21:54 ` [PATCH 7/12] FS-Cache: Export a couple of VM functions David Howells
2005-11-14 21:54 ` [PATCH 11/12] FS-Cache: CacheFS: Add cache on blockdevice cache backend David Howells
2005-11-14 21:54 ` [PATCH 10/12] FS-Cache: Make kAFS use FS-Cache David Howells
2005-11-14 21:54 ` [PATCH 12/12] FS-Cache: CacheFS: Add Documentation David Howells
2005-11-14 21:54 ` [PATCH 9/12] FS-Cache: Add documentation for FS-Cache and its interfaces David Howells
2005-11-14 22:45 ` [PATCH 0/12] FS-Cache: Generic filesystem caching facility Linus Torvalds
2005-11-14 23:03   ` Andrew Morton
2005-11-14 23:17     ` Trond Myklebust
2005-11-15  8:57       ` [Linux-cachefs] " Jeff Garzik
2005-11-18 22:07       ` Troy Benjegerdes
2005-11-15 16:32   ` Jamie Lokier
2005-11-15 16:54     ` Linus Torvalds
2005-11-15 17:59   ` David Howells
2005-11-15 19:25     ` Andrew Morton
2005-11-15 23:45       ` Kyle Moffett
2005-11-16 11:26     ` David Howells
2005-11-16 11:56       ` Andrew Morton
2005-11-17 19:28       ` David Howells
2005-11-17 21:29         ` Andrew Morton
2005-11-18  8:43         ` Paul Jackson
2005-11-14 23:47 ` [PATCH] FS-Cache: Make NFS use FS-Cache Steve Dickson
2005-11-15  0:07   ` Andrew Morton
2005-11-15  2:31     ` Steve Dickson
2005-11-15 12:28 ` [PATCH 0/12] FS-Cache: Generic filesystem caching facility Nick Piggin
2005-11-15 13:20 ` [PATCHES 0-12/12] " David Howells
2005-11-15 14:06   ` [Linux-cachefs] " J. Bruce Fields
2005-11-15 16:24   ` David Howells
2005-11-15 13:51 ` [PATCH 0/12] " David Howells
2005-11-15 17:05   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).