fscache (perhaps more so with the recent rewrite that Dave Howells did) may be most well suited to cifs.ko (SMB3.1.1 mounts) among the various file systems since it would allow offline caching of files and directories leveraging: 1) handle leases and directory leases for "strict caching" models or 2) directory change notification for "loose caching" models (Although file version numbers are not provided, the combination of creation time, 64 bit DiskFileId, and last write time with 100ns time granularity is probably sufficient to use in conjunction with this) In addition the protocol already supports four flags to control whether client side offline caching can/should be done: SMB2_SHAREFLAG_MANUAL_CACHING SMB2_SHAREFLAG_AUTO_CACHING SMB2_SHAREFLAG_VDO_CACHING SMB2_SHAREFLAG_NO_CACHING So fscache could be very, very useful for cifs.ko, especially for metadata heavy workloads that are largely from one client ... but fscache doesn't have tight integration with many cifs features (like handle leases e.g.) yet. It would make sense to better tie cifs.ko in with fscache (especially as it has shown to be useful on other operating systems over SMB3/SMB3.1.1). On Mon, Aug 10, 2020 at 8:25 PM Xiaoli Feng <xifeng@xxxxxxxxxx> wrote: > > Hello everyone, > > Recently I'd like to test fs-cache for cifs. But CONFIG_CIFS_FSCACHE is not set defaultly. > Are there any concern to enable it? Test it to enbale fs-cache. It seems work. The file > /proc/fs/fscache/stats is update when do some cp operations. > > Thanks. > > -- > Best regards! > XiaoLi Feng 冯小丽 > -- Thanks, Steve