linux/fs/netfs
David Howells 06fa229ceb
netfs: Abstract out a rolling folio buffer implementation
A rolling buffer is a series of folios held in a list of folio_queues.  New
folios and folio_queue structs may be inserted at the head simultaneously
with spent ones being removed from the tail without the need for locking.

The rolling buffer includes an iov_iter and it has to be careful managing
this as the list of folio_queues is extended such that an oops doesn't
incurred because the iterator was pointing to the end of a folio_queue
segment that got appended to and then removed.

We need to use the mechanism twice, once for read and once for write, and,
in future patches, we will use a second rolling buffer to handle bounce
buffering for content encryption.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-6-dhowells@redhat.com
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-12-20 22:34:02 +01:00
..
buffered_read.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
buffered_write.c netfs: Remove unnecessary references to pages 2024-10-07 13:45:15 +02:00
direct_read.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
direct_write.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
fscache_cache.c netfs: Revert "netfs: Switch debug logging to pr_debug()" 2024-07-24 10:15:37 +02:00
fscache_cookie.c fs/netfs/fscache_cookie: add missing "n_accesses" check 2024-08-12 22:03:26 +02:00
fscache_internal.h netfs, fscache: Combine fscache with netfs 2023-12-24 15:08:46 +00:00
fscache_io.c fscache: Remove duplicate included header 2024-11-21 09:35:25 +01:00
fscache_main.c fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF 2024-09-01 10:30:25 +02:00
fscache_proc.c netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" 2024-01-04 13:15:32 +00:00
fscache_stats.c netfs: Fix interaction between write-streaming and cachefiles culling 2024-01-05 15:42:25 +00:00
fscache_volume.c netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING 2024-11-11 14:39:38 +01:00
internal.h netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
iterator.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
Kconfig netfs: clean up after renaming FSCACHE_DEBUG config 2024-08-12 22:03:26 +02:00
locking.c netfs: Downgrade i_rwsem for a buffered write 2024-10-17 15:33:42 +02:00
main.c vfs-6.12.netfs 2024-09-16 12:13:31 +02:00
Makefile netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
misc.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
objects.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
read_collect.c netfs: Add a tracepoint to log the lifespan of folio_queue structs 2024-12-20 22:34:02 +01:00
read_pgpriv2.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
read_retry.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
rolling_buffer.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
stats.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
write_collect.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00
write_issue.c netfs: Abstract out a rolling folio buffer implementation 2024-12-20 22:34:02 +01:00