Skip to content

Commit

Permalink
fscache: Remove the contents of the fscache driver, pending rewrite
Browse files Browse the repository at this point in the history
Remove the code that comprises the fscache driver as it's going to be
substantially rewritten, with the majority of the code being erased in the
rewrite.

A small piece of linux/fscache.h is left as that is #included by a bunch of
network filesystems.

Signed-off-by: David Howells <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
cc: [email protected]
Link: https://lore.kernel.org/r/163819578724.215744.18210619052245724238.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906884814.143852.6727245089843862889.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967077097.1823006.1377665951499979089.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021485548.640689.13876080567388696162.stgit@warthog.procyon.org.uk/ # v4
  • Loading branch information
dhowells committed Jan 7, 2022
1 parent 850cba0 commit 2cee6fb
Show file tree
Hide file tree
Showing 20 changed files with 13 additions and 7,805 deletions.
8 changes: 5 additions & 3 deletions fs/9p/vfs_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ static void v9fs_req_cleanup(struct address_space *mapping, void *priv)
*/
static bool v9fs_is_cache_enabled(struct inode *inode)
{
struct fscache_cookie *cookie = v9fs_inode_cookie(V9FS_I(inode));

return fscache_cookie_enabled(cookie) && !hlist_empty(&cookie->backing_objects);
return fscache_cookie_enabled(v9fs_inode_cookie(V9FS_I(inode)));
}

/**
Expand All @@ -87,9 +85,13 @@ static bool v9fs_is_cache_enabled(struct inode *inode)
*/
static int v9fs_begin_cache_operation(struct netfs_read_request *rreq)
{
#ifdef CONFIG_9P_FSCACHE
struct fscache_cookie *cookie = v9fs_inode_cookie(V9FS_I(rreq->inode));

return fscache_begin_read_operation(rreq, cookie);
#else
return -ENOBUFS;
#endif
}

static const struct netfs_read_request_ops v9fs_req_ops = {
Expand Down
1 change: 0 additions & 1 deletion fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ obj-$(CONFIG_DLM) += dlm/

# Do not add any filesystems before this line
obj-$(CONFIG_NETFS_SUPPORT) += netfs/
obj-$(CONFIG_FSCACHE) += fscache/
obj-$(CONFIG_REISERFS_FS) += reiserfs/
obj-$(CONFIG_EXT4_FS) += ext4/
# We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the
Expand Down
8 changes: 5 additions & 3 deletions fs/afs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,18 @@ static void afs_init_rreq(struct netfs_read_request *rreq, struct file *file)

static bool afs_is_cache_enabled(struct inode *inode)
{
struct fscache_cookie *cookie = afs_vnode_cache(AFS_FS_I(inode));

return fscache_cookie_enabled(cookie) && !hlist_empty(&cookie->backing_objects);
return fscache_cookie_enabled(afs_vnode_cache(AFS_FS_I(inode)));
}

static int afs_begin_cache_operation(struct netfs_read_request *rreq)
{
#ifdef CONFIG_AFS_FSCACHE
struct afs_vnode *vnode = AFS_FS_I(rreq->inode);

return fscache_begin_read_operation(rreq, afs_vnode_cache(vnode));
#else
return -ENOBUFS;
#endif
}

static int afs_check_write_begin(struct file *file, loff_t pos, unsigned len,
Expand Down
39 changes: 0 additions & 39 deletions fs/fscache/Kconfig
Original file line number Diff line number Diff line change
@@ -1,43 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only

config FSCACHE
tristate "General filesystem local caching manager"
select NETFS_SUPPORT
help
This option enables a generic filesystem caching manager that can be
used by various network and other filesystems to cache data locally.
Different sorts of caches can be plugged in, depending on the
resources available.

See Documentation/filesystems/caching/fscache.rst for more information.

config FSCACHE_STATS
bool "Gather statistical information on local caching"
depends on FSCACHE && PROC_FS
select NETFS_STATS
help
This option causes statistical information to be gathered on local
caching and exported through file:

/proc/fs/fscache/stats

The gathering of statistics adds a certain amount of overhead to
execution as there are a quite a few stats gathered, and on a
multi-CPU system these may be on cachelines that keep bouncing
between CPUs. On the other hand, the stats are very useful for
debugging purposes. Saying 'Y' here is recommended.

See Documentation/filesystems/caching/fscache.rst for more information.

config FSCACHE_DEBUG
bool "Debug FS-Cache"
depends on FSCACHE
help
This permits debugging to be dynamically enabled in the local caching
management module. If this is set, the debugging output may be
enabled by setting bits in /sys/modules/fscache/parameter/debug.

See Documentation/filesystems/caching/fscache.rst for more information.

config FSCACHE_OLD_API
bool
20 changes: 0 additions & 20 deletions fs/fscache/Makefile

This file was deleted.

Loading

0 comments on commit 2cee6fb

Please sign in to comment.