On Wed, 4 May 2022 at 14:22, Dave Wysochanski <dwysocha@xxxxxxxxxx> wrote: > > Pass updated i_size in fscache_unuse_cookie() when called > from nfs_fscache_release_file(), which ensures the size of > an fscache object gets written to the cache storage. Failing > to do so results in unnessary reads from the NFS server, even > when the data is cached, due to a cachefiles object coherency > check failing with a trace similar to the following: > cachefiles_coherency: o=0000000e BAD osiz B=afbb3 c=0 I can confirm that this fixes an oddity I had noticed with the "new" fscache. When running an fio read benchmark, if you remounted or dropped caches between reads, it seemed like it required two initial reads of the data (and writes to cache) before all subsequent reads would come from the fscache disk. Tested-by: Daire Byrne <daire@xxxxxxxx> Cheers, Daire