Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfs, fscache: Move fs/fscache/* into fs/netfs/

There's a problem with dependencies between netfslib and fscache as each
wants to access some functions of the other. Deal with this by moving
fs/fscache/* into fs/netfs/ and renaming those files to begin with
"fscache-".

For the moment, the moved files are changed as little as possible and an
fscache module is still built. A subsequent patch will integrate them.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Christian Brauner <christian@brauner.io>
cc: linux-fsdevel@vger.kernel.org
cc: linux-cachefs@redhat.com

+73 -69
+13 -8
MAINTAINERS
··· 8133 8133 F: fs/iomap/ 8134 8134 F: include/linux/iomap.h 8135 8135 8136 + FILESYSTEMS [NETFS LIBRARY] 8137 + M: David Howells <dhowells@redhat.com> 8138 + L: linux-cachefs@redhat.com (moderated for non-subscribers) 8139 + L: linux-fsdevel@vger.kernel.org 8140 + S: Supported 8141 + F: Documentation/filesystems/caching/ 8142 + F: Documentation/filesystems/netfs_library.rst 8143 + F: fs/netfs/ 8144 + F: include/linux/fscache*.h 8145 + F: include/linux/netfs.h 8146 + F: include/trace/events/fscache.h 8147 + F: include/trace/events/netfs.h 8148 + 8136 8149 FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER 8137 8150 M: Riku Voipio <riku.voipio@iki.fi> 8138 8151 L: linux-hwmon@vger.kernel.org ··· 8579 8566 F: Documentation/power/freezing-of-tasks.rst 8580 8567 F: include/linux/freezer.h 8581 8568 F: kernel/freezer.c 8582 - 8583 - FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS 8584 - M: David Howells <dhowells@redhat.com> 8585 - L: linux-cachefs@redhat.com (moderated for non-subscribers) 8586 - S: Supported 8587 - F: Documentation/filesystems/caching/ 8588 - F: fs/fscache/ 8589 - F: include/linux/fscache*.h 8590 8569 8591 8570 FSCRYPT: FILE SYSTEM LEVEL ENCRYPTION SUPPORT 8592 8571 M: Eric Biggers <ebiggers@kernel.org>
-1
fs/Kconfig
··· 140 140 menu "Caches" 141 141 142 142 source "fs/netfs/Kconfig" 143 - source "fs/fscache/Kconfig" 144 143 source "fs/cachefiles/Kconfig" 145 144 146 145 endmenu
-1
fs/Makefile
··· 60 60 61 61 # Do not add any filesystems before this line 62 62 obj-$(CONFIG_NETFS_SUPPORT) += netfs/ 63 - obj-$(CONFIG_FSCACHE) += fscache/ 64 63 obj-$(CONFIG_REISERFS_FS) += reiserfs/ 65 64 obj-$(CONFIG_EXT4_FS) += ext4/ 66 65 # We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the
-40
fs/fscache/Kconfig
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - 3 - config FSCACHE 4 - tristate "General filesystem local caching manager" 5 - select NETFS_SUPPORT 6 - help 7 - This option enables a generic filesystem caching manager that can be 8 - used by various network and other filesystems to cache data locally. 9 - Different sorts of caches can be plugged in, depending on the 10 - resources available. 11 - 12 - See Documentation/filesystems/caching/fscache.rst for more information. 13 - 14 - config FSCACHE_STATS 15 - bool "Gather statistical information on local caching" 16 - depends on FSCACHE && PROC_FS 17 - select NETFS_STATS 18 - help 19 - This option causes statistical information to be gathered on local 20 - caching and exported through file: 21 - 22 - /proc/fs/fscache/stats 23 - 24 - The gathering of statistics adds a certain amount of overhead to 25 - execution as there are a quite a few stats gathered, and on a 26 - multi-CPU system these may be on cachelines that keep bouncing 27 - between CPUs. On the other hand, the stats are very useful for 28 - debugging purposes. Saying 'Y' here is recommended. 29 - 30 - See Documentation/filesystems/caching/fscache.rst for more information. 31 - 32 - config FSCACHE_DEBUG 33 - bool "Debug FS-Cache" 34 - depends on FSCACHE 35 - help 36 - This permits debugging to be dynamically enabled in the local caching 37 - management module. If this is set, the debugging output may be 38 - enabled by setting bits in /sys/modules/fscache/parameter/debug. 39 - 40 - See Documentation/filesystems/caching/fscache.rst for more information.
-16
fs/fscache/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0 2 - # 3 - # Makefile for general filesystem caching code 4 - # 5 - 6 - fscache-y := \ 7 - cache.o \ 8 - cookie.o \ 9 - io.o \ 10 - main.o \ 11 - volume.o 12 - 13 - fscache-$(CONFIG_PROC_FS) += proc.o 14 - fscache-$(CONFIG_FSCACHE_STATS) += stats.o 15 - 16 - obj-$(CONFIG_FSCACHE) := fscache.o
fs/fscache/cache.c fs/netfs/fscache_cache.c
fs/fscache/cookie.c fs/netfs/fscache_cookie.c
fs/fscache/internal.h fs/netfs/fscache_internal.h
fs/fscache/io.c fs/netfs/fscache_io.c
fs/fscache/main.c fs/netfs/fscache_main.c
fs/fscache/proc.c fs/netfs/fscache_proc.c
fs/fscache/stats.c fs/netfs/fscache_stats.c
fs/fscache/volume.c fs/netfs/fscache_volume.c
+39
fs/netfs/Kconfig
··· 21 21 multi-CPU system these may be on cachelines that keep bouncing 22 22 between CPUs. On the other hand, the stats are very useful for 23 23 debugging purposes. Saying 'Y' here is recommended. 24 + 25 + config FSCACHE 26 + tristate "General filesystem local caching manager" 27 + select NETFS_SUPPORT 28 + help 29 + This option enables a generic filesystem caching manager that can be 30 + used by various network and other filesystems to cache data locally. 31 + Different sorts of caches can be plugged in, depending on the 32 + resources available. 33 + 34 + See Documentation/filesystems/caching/fscache.rst for more information. 35 + 36 + config FSCACHE_STATS 37 + bool "Gather statistical information on local caching" 38 + depends on FSCACHE && PROC_FS 39 + select NETFS_STATS 40 + help 41 + This option causes statistical information to be gathered on local 42 + caching and exported through file: 43 + 44 + /proc/fs/fscache/stats 45 + 46 + The gathering of statistics adds a certain amount of overhead to 47 + execution as there are a quite a few stats gathered, and on a 48 + multi-CPU system these may be on cachelines that keep bouncing 49 + between CPUs. On the other hand, the stats are very useful for 50 + debugging purposes. Saying 'Y' here is recommended. 51 + 52 + See Documentation/filesystems/caching/fscache.rst for more information. 53 + 54 + config FSCACHE_DEBUG 55 + bool "Debug FS-Cache" 56 + depends on FSCACHE 57 + help 58 + This permits debugging to be dynamically enabled in the local caching 59 + management module. If this is set, the debugging output may be 60 + enabled by setting bits in /sys/modules/fscache/parameter/debug. 61 + 62 + See Documentation/filesystems/caching/fscache.rst for more information.
+13 -1
fs/netfs/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 + fscache-y := \ 4 + fscache_cache.o \ 5 + fscache_cookie.o \ 6 + fscache_io.o \ 7 + fscache_main.o \ 8 + fscache_volume.o 9 + 10 + fscache-$(CONFIG_PROC_FS) += fscache_proc.o 11 + fscache-$(CONFIG_FSCACHE_STATS) += fscache_stats.o 12 + 13 + obj-$(CONFIG_FSCACHE) := fscache.o 14 + 3 15 netfs-y := \ 4 16 buffered_read.o \ 5 17 io.o \ ··· 21 9 22 10 netfs-$(CONFIG_NETFS_STATS) += stats.o 23 11 24 - obj-$(CONFIG_NETFS_SUPPORT) := netfs.o 12 + obj-$(CONFIG_NETFS_SUPPORT) += netfs.o
+5
fs/netfs/internal.h
··· 5 5 * Written by David Howells (dhowells@redhat.com) 6 6 */ 7 7 8 + #include <linux/slab.h> 9 + #include <linux/seq_file.h> 8 10 #include <linux/netfs.h> 9 11 #include <linux/fscache.h> 10 12 #include <trace/events/netfs.h> 13 + #include "fscache_internal.h" 11 14 12 15 #ifdef pr_fmt 13 16 #undef pr_fmt ··· 110 107 /* 111 108 * debug tracing 112 109 */ 110 + #if 0 113 111 #define dbgprintk(FMT, ...) \ 114 112 printk("[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__) 115 113 ··· 146 142 #define _enter(FMT, ...) no_printk("==> %s("FMT")", __func__, ##__VA_ARGS__) 147 143 #define _leave(FMT, ...) no_printk("<== %s()"FMT"", __func__, ##__VA_ARGS__) 148 144 #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__) 145 + #endif 149 146 #endif
+3 -2
fs/netfs/main.c
··· 8 8 #include <linux/module.h> 9 9 #include <linux/export.h> 10 10 #include "internal.h" 11 - #define CREATE_TRACE_POINTS 12 - #include <trace/events/netfs.h> 11 + //#define CREATE_TRACE_POINTS 12 + //#include <trace/events/netfs.h> 13 13 14 14 MODULE_DESCRIPTION("Network fs support"); 15 15 MODULE_AUTHOR("Red Hat, Inc."); ··· 18 18 unsigned netfs_debug; 19 19 module_param_named(debug, netfs_debug, uint, S_IWUSR | S_IRUGO); 20 20 MODULE_PARM_DESC(netfs_debug, "Netfs support debugging mask"); 21 +