NFS: Convert fscache invalidation and update aux_data and i_size
Convert nfs_fscache_invalidate to the new FS-Cache API. Also,
now when invalidating an fscache cookie, be sure to pass the latest
i_size as well as aux_data to fscache.
A few APIs no longer exist so remove them. We can call directly to
wait_on_page_fscache() because it checks whether a page is an fscache
page before waiting on it.
Since the current NFS fscache implementation is only enabled when a
file is open for read, handle writes with invalidation. If a write
extends the size of the file and fscache is enabled, we must invalidate
the object with the new size.
We must also invalidate fscache when doing a direct write to avoid
issues seen specifically with NFSv4.x when direct writes are followed
by non-direct (buffered) reads. Note that we cannot call
fscache_invalidate() while holding inode->i_lock.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
6 files changed