summaryrefslogtreecommitdiffstats
path: root/fs/fscache/fsdef.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-04-04 14:41:28 +0200
committerDavid Howells <dhowells@redhat.com>2018-04-06 15:05:14 +0200
commitee1235a9a06813429c201bf186397a6feeea07bf (patch)
tree444566605bfafce0b155a76e061a73c264329424 /fs/fscache/fsdef.c
parentfscache: Attach the index key and aux data to the cookie (diff)
downloadlinux-ee1235a9a06813429c201bf186397a6feeea07bf.tar.xz
linux-ee1235a9a06813429c201bf186397a6feeea07bf.zip
fscache: Pass object size in rather than calling back for it
Pass the object size in to fscache_acquire_cookie() and fscache_write_page() rather than the netfs providing a callback by which it can be received. This makes it easier to update the size of the object when a new page is written that extends the object. The current object size is also passed by fscache to the check_aux function, obviating the need to store it in the aux data. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Anna Schumaker <anna.schumaker@netapp.com> Tested-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'fs/fscache/fsdef.c')
-rw-r--r--fs/fscache/fsdef.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c
index 1122e97d56e8..aa46e48d8c75 100644
--- a/fs/fscache/fsdef.c
+++ b/fs/fscache/fsdef.c
@@ -16,7 +16,8 @@
static
enum fscache_checkaux fscache_fsdef_netfs_check_aux(void *cookie_netfs_data,
const void *data,
- uint16_t datalen);
+ uint16_t datalen,
+ loff_t object_size);
/*
* The root index is owned by FS-Cache itself.
@@ -76,7 +77,8 @@ struct fscache_cookie_def fscache_fsdef_netfs_def = {
static enum fscache_checkaux fscache_fsdef_netfs_check_aux(
void *cookie_netfs_data,
const void *data,
- uint16_t datalen)
+ uint16_t datalen,
+ loff_t object_size)
{
struct fscache_netfs *netfs = cookie_netfs_data;
uint32_t version;