FS-Cache: Generic filesystem caching facility
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | FS-Cache: Handle -Wsign-compare in i386 bitopsinclude/ | +2 | 0 replies | |
| 2/12 | FS-Cache: Permit multiple inclusion of linux/pagevec.hinclude/ | +5 | 0 replies | |
| 3/12 | FS-Cache: Add list_for_each_entry_safe_reverse()include/ | +14 | 0 replies | |
| 4/12 | FS-Cache: Permit pre-allocation of radix-tree nodesinclude/ include/ kernel/ +2 more | +122 | 0 replies | |
| 5/12 | FS-Cache: Release page->private in failed readaheadmm/ | +16 | 0 replies | |
| 6/12 | FS-Cache: Add a function to replace a page in the pagecacheinclude/ mm/ | +36 | 0 replies | |
| 7/12 | FS-Cache: Export a couple of VM functionsmm/ mm/ | +3 | 0 replies | |
| 8/12 | FS-Cache: Add generic filesystem cache core modulefs/ fs/ fs/ +7 more | +2574 | 0 replies | |
| 9/12 | FS-Cache: Add documentation for FS-Cache and its interfacesDocumentation/ Documentation/ Documentation/ | +1210 | 0 replies | |
| 10/12 | FS-Cache: Make kAFS use FS-Cachefs/ fs/ fs/ +16 more | +655 | 0 replies | |
| 11/12 | FS-Cache: CacheFS: Add cache on blockdevice cache backendfs/ fs/ fs/ +32 more | +17521 | 0 replies | |
| 12/12 | FS-Cache: CacheFS: Add DocumentationDocumentation/ | +375 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/12] FS-Cache: Generic filesystem caching facility
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