]> git.baikalelectronics.ru Git - kernel.git/commit
fscache: Provide a function to resize a cookie
authorDavid Howells <dhowells@redhat.com>
Wed, 20 Oct 2021 13:06:34 +0000 (14:06 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 7 Jan 2022 13:40:33 +0000 (13:40 +0000)
commitee0f2d29ff90f3de4989eee3f4e04463667914db
tree656b9af20d052cbd2687e3b1bfbf40d284105fd5
parent8c85fc136da1526e0959af2f9ab3a1af1477618a
fscache: Provide a function to resize a cookie

Provide a function to change the size of the storage attached to a cookie,
to match the size of the file being cached when it's changed by truncate or
fallocate:

void fscache_resize_cookie(struct fscache_cookie *cookie,
   loff_t new_size);

This acts synchronously and is expected to run under the inode lock of the
caller.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/163819621839.215744.7895597119803515402.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/163906922387.143852.16394459879816147793.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/163967128998.1823006.10740669081985775576.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/164021527861.640689.3466382085497236267.stgit@warthog.procyon.org.uk/
fs/fscache/internal.h
fs/fscache/io.c
fs/fscache/stats.c
include/linux/fscache-cache.h
include/linux/fscache.h
include/trace/events/fscache.h