Re: [PATCH] NFS: Pass i_size to fscache_unuse_cookie() when a file is released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux