Skip to content

Commit 60e78d2

Browse files
Abhishek KulkarniEric Van Hensbergen
authored andcommitted
9p: Add fscache support to 9p
This patch adds a persistent, read-only caching facility for 9p clients using the FS-Cache caching backend. When the fscache facility is enabled, each inode is associated with a corresponding vcookie which is an index into the FS-Cache indexing tree. The FS-Cache indexing tree is indexed at 3 levels: - session object associated with each mount. - inode/vcookie - actual data (pages) A cache tag is chosen randomly for each session. These tags can be read off /sys/fs/9p/caches and can be passed as a mount-time parameter to re-attach to the specified caching session. Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
1 parent 637d020 commit 60e78d2

12 files changed

Lines changed: 1009 additions & 42 deletions

File tree

‎fs/9p/Kconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ config 9P_FS
88
See <http://v9fs.sf.net> for more information.
99

1010
If unsure, say N.
11+
12+
config 9P_FSCACHE
13+
bool "Enable 9P client caching support (EXPERIMENTAL)"
14+
depends on EXPERIMENTAL
15+
depends on 9P_FS=m && FSCACHE || 9P_FS=y && FSCACHE=y
16+
help
17+
Choose Y here to enable persistent, read-only local
18+
caching support for 9p clients using FS-Cache
19+

‎fs/9p/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ obj-$(CONFIG_9P_FS) := 9p.o
88
vfs_dir.o \
99
vfs_dentry.o \
1010
v9fs.o \
11-
fid.o \
11+
fid.o
1212

13+
9p-$(CONFIG_9P_FSCACHE) += cache.o

0 commit comments

Comments
 (0)