aboutsummaryrefslogtreecommitdiff
path: root/include/linux/netfs.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-06-06 07:48:55 +0100
committerChristian Brauner <brauner@kernel.org>2024-09-12 12:20:40 +0200
commit983cdcf8fe141b0ce16bc71959a5dc55bcb0764d (patch)
treecccc55b248bdb2dbf5cff34750bc57ff88339ed3 /include/linux/netfs.h
parentbfaa33b8ba196f9506a45e5a36e968f087c8cd16 (diff)
netfs: Simplify the writeback code
Use the new folio_queue structures to simplify the writeback code. The problem with referring to the i_pages xarray directly is that we may have gaps in the sequence of folios we're writing from that we need to skip when we're removing the writeback mark from the folios we're writing back from. At the moment the code tries to deal with this by carefully tracking the gaps in each writeback stream (eg. write to server and write to cache) and divining when there's a gap that spans folios (something that's not helped by folios not being a consistent size). Instead, the folio_queue buffer contains pointers only the folios we're dealing with, has them in ascending order and indicates a gap by placing non-consequitive folios next to each other. This makes it possible to track where we need to clean up to by just keeping track of where we've processed to on each stream and taking the minimum. Note that the I/O iterator is always rounded up to the end of the folio, even if that is beyond the EOF position, so that the cache can do DIO from the page. The excess space is cleared, though mmapped writes clobber it. Signed-off-by: David Howells <dhowells@redhat.com> cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20240814203850.2240469-18-dhowells@redhat.com/ # v2 Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/netfs.h')
-rw-r--r--include/linux/netfs.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/netfs.h b/include/linux/netfs.h
index f7b444f4f251..bd0e3d147822 100644
--- a/include/linux/netfs.h
+++ b/include/linux/netfs.h
@@ -257,7 +257,6 @@ struct netfs_io_request {
unsigned long long i_size; /* Size of the file */
unsigned long long start; /* Start position */
atomic64_t issued_to; /* Write issuer folio cursor */
- unsigned long long contiguity; /* Tracking for gaps in the writeback sequence */
unsigned long long collected_to; /* Point we've collected to */
unsigned long long cleaned_to; /* Position we've cleaned folios to */
pgoff_t no_unlock_folio; /* Don't unlock this folio after read */