Commit 2cee6fbb authored by David Howells's avatar David Howells
Browse files

fscache: Remove the contents of the fscache driver, pending rewrite



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: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
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
parent 850cba06
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -76,9 +76,7 @@ static void v9fs_req_cleanup(struct address_space *mapping, void *priv)
 */
 */
static bool v9fs_is_cache_enabled(struct inode *inode)
static bool v9fs_is_cache_enabled(struct inode *inode)
{
{
	struct fscache_cookie *cookie = v9fs_inode_cookie(V9FS_I(inode));
	return fscache_cookie_enabled(v9fs_inode_cookie(V9FS_I(inode)));

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


/**
/**
@@ -87,9 +85,13 @@ static bool v9fs_is_cache_enabled(struct inode *inode)
 */
 */
static int v9fs_begin_cache_operation(struct netfs_read_request *rreq)
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));
	struct fscache_cookie *cookie = v9fs_inode_cookie(V9FS_I(rreq->inode));


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


static const struct netfs_read_request_ops v9fs_req_ops = {
static const struct netfs_read_request_ops v9fs_req_ops = {
+0 −1
Original line number Original line Diff line number Diff line
@@ -67,7 +67,6 @@ obj-$(CONFIG_DLM) += dlm/
 
 
# Do not add any filesystems before this line
# Do not add any filesystems before this line
obj-$(CONFIG_NETFS_SUPPORT)	+= netfs/
obj-$(CONFIG_NETFS_SUPPORT)	+= netfs/
obj-$(CONFIG_FSCACHE)		+= fscache/
obj-$(CONFIG_REISERFS_FS)	+= reiserfs/
obj-$(CONFIG_REISERFS_FS)	+= reiserfs/
obj-$(CONFIG_EXT4_FS)		+= ext4/
obj-$(CONFIG_EXT4_FS)		+= ext4/
# We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the
# We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the
+5 −3
Original line number Original line Diff line number Diff line
@@ -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)
static bool afs_is_cache_enabled(struct inode *inode)
{
{
	struct fscache_cookie *cookie = afs_vnode_cache(AFS_FS_I(inode));
	return fscache_cookie_enabled(afs_vnode_cache(AFS_FS_I(inode)));

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


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


	return fscache_begin_read_operation(rreq, afs_vnode_cache(vnode));
	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,
static int afs_check_write_begin(struct file *file, loff_t pos, unsigned len,
+0 −39
Original line number Original line Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
# 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
config FSCACHE_OLD_API
	bool
	bool

fs/fscache/Makefile

deleted100644 → 0
+0 −20
Original line number Original line Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for general filesystem caching code
#

fscache-y := \
	cache.o \
	cookie.o \
	fsdef.o \
	io.o \
	main.o \
	netfs.o \
	object.o \
	operation.o \
	page.o

fscache-$(CONFIG_PROC_FS) += proc.o
fscache-$(CONFIG_FSCACHE_STATS) += stats.o

obj-$(CONFIG_FSCACHE) := fscache.o
Loading