diff options
author | David Howells <dhowells@redhat.com> | 2024-07-19 16:19:02 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-07-24 10:53:13 +0200 |
commit | 51d37982bbac3ea0ca21b2797a9cb0044272b3aa (patch) | |
tree | e0a65db483922734b3e31a16ce06d41909eb1862 /fs/cachefiles | |
parent | netfs: Fix writeback that needs to go to both server and cache (diff) | |
download | linux-51d37982bbac3ea0ca21b2797a9cb0044272b3aa.tar.xz linux-51d37982bbac3ea0ca21b2797a9cb0044272b3aa.zip |
cachefiles: Set the max subreq size for cache writes to MAX_RW_COUNT
Set the maximum size of a subrequest that writes to cachefiles to be
MAX_RW_COUNT so that we don't overrun the maximum write we can make to the
backing filesystem.
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/1599005.1721398742@warthog.procyon.org.uk
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>
Diffstat (limited to 'fs/cachefiles')
-rw-r--r-- | fs/cachefiles/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c index e667dbcd20e8..a91acd03ee12 100644 --- a/fs/cachefiles/io.c +++ b/fs/cachefiles/io.c @@ -630,7 +630,7 @@ static void cachefiles_prepare_write_subreq(struct netfs_io_subrequest *subreq) _enter("W=%x[%x] %llx", wreq->debug_id, subreq->debug_index, subreq->start); - subreq->max_len = ULONG_MAX; + subreq->max_len = MAX_RW_COUNT; subreq->max_nr_segs = BIO_MAX_VECS; if (!cachefiles_cres_file(cres)) { |