diff options
author | David Howells <dhowells@redhat.com> | 2023-11-22 20:18:17 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-28 12:45:25 +0300 |
commit | e0ace6ca98bef0d8d354040f13ffc0a498813ee9 (patch) | |
tree | bf426f6aa6e3c0fa9f4b186eb79857675b7148ae /fs/netfs/fscache_io.c | |
parent | 80645bd4aa33a5c325f11b8dc6b38b38410ad5c0 (diff) | |
download | linux-e0ace6ca98bef0d8d354040f13ffc0a498813ee9.tar.xz |
netfs, cachefiles: Pass upper bound length to allow expansion
Make netfslib pass the maximum length to the ->prepare_write() op to tell
the cache how much it can expand the length of a write to. This allows a
write to the server at the end of a file to be limited to a few bytes
whilst writing an entire block to the cache (something required by direct
I/O).
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Diffstat (limited to 'fs/netfs/fscache_io.c')
-rw-r--r-- | fs/netfs/fscache_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/fscache_io.c b/fs/netfs/fscache_io.c index 79171a687930..ad572f7ee897 100644 --- a/fs/netfs/fscache_io.c +++ b/fs/netfs/fscache_io.c @@ -237,7 +237,7 @@ void __fscache_write_to_cache(struct fscache_cookie *cookie, fscache_access_io_write) < 0) goto abandon_free; - ret = cres->ops->prepare_write(cres, &start, &len, i_size, false); + ret = cres->ops->prepare_write(cres, &start, &len, len, i_size, false); if (ret < 0) goto abandon_end; |