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>
This commit is contained in:
David Howells
2018-04-04 13:41:28 +01:00
parent 402cb8dda9
commit ee1235a9a0
21 changed files with 127 additions and 166 deletions

View File

@@ -265,7 +265,7 @@ static void afs_get_inode_cache(struct afs_vnode *vnode)
&afs_vnode_cache_index_def,
&key, sizeof(key),
&aux, sizeof(aux),
vnode, true);
vnode, vnode->status.size, true);
#endif
}