mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
26aaeffcaf
Add an alternate API by which the cache can be accessed through a kiocb, doing async DIO, rather than using the current API that tells the cache where all the pages are. The new API is intended to be used in conjunction with the netfs helper library. A filesystem must pick one or the other and not mix them. Filesystems wanting to use the new API must #define FSCACHE_USE_NEW_IO_API before #including the header. This prevents them from continuing to use the old API at the same time as there are incompatibilities in how the PG_fscache page bit is used. Changes: v6: - Provide a routine to shape a write so that the start and length can be aligned for DIO[3]. v4: - Use the vfs_iocb_iter_read/write() helpers[1] - Move initial definition of fscache_begin_read_operation() here. - Remove a commented-out line[2] - Combine ki->term_func calls in cachefiles_read_complete()[2]. - Remove explicit NULL initialiser[2]. - Remove extern on func decl[2]. - Put in param names on func decl[2]. - Remove redundant else[2]. - Fill out the kdoc comment for fscache_begin_read_operation(). - Rename fs/fscache/page2.c to io.c to match later patches. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-and-tested-by: Jeff Layton <jlayton@kernel.org> Tested-by: Dave Wysochanski <dwysocha@redhat.com> Tested-By: Marc Dionne <marc.dionne@auristor.com> cc: Christoph Hellwig <hch@lst.de> cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210216102614.GA27555@lst.de/ [1] Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [2] Link: https://lore.kernel.org/r/161781047695.463527.7463536103593997492.stgit@warthog.procyon.org.uk/ [3] Link: https://lore.kernel.org/r/161118142558.1232039.17993829899588971439.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161037850.2537118.8819808229350326503.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340402057.1303470.8038373593844486698.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539545919.286939.14573472672781434757.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653801477.2770958.10543270629064934227.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789084517.6155.12799689829859169640.stgit@warthog.procyon.org.uk/ # v6
64 lines
2.3 KiB
Plaintext
64 lines
2.3 KiB
Plaintext
# 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
|
|
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_HISTOGRAM
|
|
bool "Gather latency information on local caching"
|
|
depends on FSCACHE && PROC_FS
|
|
help
|
|
This option causes latency information to be gathered on local
|
|
caching and exported through file:
|
|
|
|
/proc/fs/fscache/histogram
|
|
|
|
The generation of this histogram adds a certain amount of overhead to
|
|
execution as there are a number of points at which data is gathered,
|
|
and on a multi-CPU system these may be on cachelines that keep
|
|
bouncing between CPUs. On the other hand, the histogram may be
|
|
useful for debugging purposes. Saying 'N' 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_OBJECT_LIST
|
|
bool "Maintain global object list for debugging purposes"
|
|
depends on FSCACHE && PROC_FS
|
|
help
|
|
Maintain a global list of active fscache objects that can be
|
|
retrieved through /proc/fs/fscache/objects for debugging purposes
|