Skip to content

Commit

Permalink
netfs, fscache: Combine fscache with netfs
Browse files Browse the repository at this point in the history
Now that the fscache code is moved to be colocated with the netfslib code
so that they combined into one module, do the combining.

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
cc: linux-nfs@vger.kernel.org,
cc: linux-erofs@lists.ozlabs.org
  • Loading branch information
David Howells committed Dec 24, 2023
1 parent 47757ea commit 915cd30
Show file tree
Hide file tree
Showing 18 changed files with 237 additions and 311 deletions.
3 changes: 2 additions & 1 deletion arch/arm/configs/mxs_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ CONFIG_PWM_MXS=y
CONFIG_NVMEM_MXS_OCOTP=y
CONFIG_EXT4_FS=y
# CONFIG_DNOTIFY is not set
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=m
CONFIG_VFAT_FS=y
Expand Down
3 changes: 2 additions & 1 deletion arch/csky/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ CONFIG_GENERIC_PHY=y
CONFIG_EXT4_FS=y
CONFIG_FANOTIFY=y
CONFIG_QUOTA=y
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=m
CONFIG_MSDOS_FS=y
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/configs/ip27_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=m
CONFIG_PROC_KCORE=y
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/configs/lemote2f_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ CONFIG_BTRFS_FS=m
CONFIG_QUOTA=y
CONFIG_QFMT_V2=m
CONFIG_AUTOFS_FS=m
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_CACHEFILES=m
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/configs/loongson3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ CONFIG_QFMT_V2=m
CONFIG_AUTOFS_FS=y
CONFIG_FUSE_FS=m
CONFIG_VIRTIO_FS=m
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_MSDOS_FS=m
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/configs/pic32mzda_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_AUTOFS_FS=m
CONFIG_FUSE_FS=m
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/configs/debug_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,9 @@ CONFIG_FUSE_FS=y
CONFIG_CUSE=m
CONFIG_VIRTIO_FS=m
CONFIG_OVERLAY_FS=m
CONFIG_NETFS_SUPPORT=m
CONFIG_NETFS_STATS=y
CONFIG_FSCACHE=m
CONFIG_FSCACHE=y
CONFIG_CACHEFILES=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,9 @@ CONFIG_FUSE_FS=y
CONFIG_CUSE=m
CONFIG_VIRTIO_FS=m
CONFIG_OVERLAY_FS=m
CONFIG_NETFS_SUPPORT=m
CONFIG_NETFS_STATS=y
CONFIG_FSCACHE=m
CONFIG_FSCACHE=y
CONFIG_CACHEFILES=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
Expand Down
3 changes: 2 additions & 1 deletion arch/sh/configs/sdk7786_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ CONFIG_BTRFS_FS=y
CONFIG_AUTOFS_FS=m
CONFIG_FUSE_FS=y
CONFIG_CUSE=m
CONFIG_FSCACHE=m
CONFIG_NETFS_SUPPORT=m
CONFIG_FSCACHE=y
CONFIG_CACHEFILES=m
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
Expand Down
2 changes: 1 addition & 1 deletion fs/cachefiles/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

config CACHEFILES
tristate "Filesystem caching on files"
depends on FSCACHE && BLOCK
depends on NETFS_SUPPORT && FSCACHE && BLOCK
help
This permits use of a mounted filesystem as a cache for other
filesystems - primarily networking filesystems - thus allowing fast
Expand Down
7 changes: 5 additions & 2 deletions fs/erofs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ config EROFS_FS_ZIP_DEFLATE

config EROFS_FS_ONDEMAND
bool "EROFS fscache-based on-demand read support"
depends on CACHEFILES_ONDEMAND && (EROFS_FS=m && FSCACHE || EROFS_FS=y && FSCACHE=y)
default n
depends on EROFS_FS
select NETFS_SUPPORT
select FSCACHE
select CACHEFILES
select CACHEFILES_ONDEMAND
help
This permits EROFS to use fscache-backed data blobs with on-demand
read support.
Expand Down
4 changes: 2 additions & 2 deletions fs/netfs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ config NETFS_STATS
debugging purposes. Saying 'Y' here is recommended.

config FSCACHE
tristate "General filesystem local caching manager"
select NETFS_SUPPORT
bool "General filesystem local caching manager"
depends on 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.
Expand Down
24 changes: 12 additions & 12 deletions fs/netfs/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# SPDX-License-Identifier: GPL-2.0

fscache-y := \
fscache_cache.o \
fscache_cookie.o \
fscache_io.o \
fscache_main.o \
fscache_volume.o

fscache-$(CONFIG_PROC_FS) += fscache_proc.o
fscache-$(CONFIG_FSCACHE_STATS) += fscache_stats.o

obj-$(CONFIG_FSCACHE) := fscache.o

netfs-y := \
buffered_read.o \
io.o \
Expand All @@ -21,4 +9,16 @@ netfs-y := \

netfs-$(CONFIG_NETFS_STATS) += stats.o

netfs-$(CONFIG_FSCACHE) += \
fscache_cache.o \
fscache_cookie.o \
fscache_io.o \
fscache_main.o \
fscache_volume.o

ifeq ($(CONFIG_PROC_FS),y)
netfs-$(CONFIG_FSCACHE) += fscache_proc.o
endif
netfs-$(CONFIG_FSCACHE_STATS) += fscache_stats.o

obj-$(CONFIG_NETFS_SUPPORT) += netfs.o
Loading

0 comments on commit 915cd30

Please sign in to comment.