Thanks Steve for the info. File a bug for cifs fscache. Bug 208883 - CIFS: kernel BUG at fs/cachefiles/rdwr.c:715! https://bugzilla.kernel.org/show_bug.cgi?id=208883 ----- Original Message ----- > From: "Steve French" <smfrench@xxxxxxxxx> > To: "Xiaoli Feng" <xifeng@xxxxxxxxxx> > Cc: "CIFS" <linux-cifs@xxxxxxxxxxxxxxx>, "David Howells" <dhowells@xxxxxxxxxx> > Sent: Tuesday, August 11, 2020 10:12:28 AM > Subject: Re: FS-Cache for cifs > > My tests in recent kernels with fscache and cifs.ko worked but didn't > provide much performance benefit (which would be expected since close > releases leases ) > > On Mon, Aug 10, 2020, 20:51 Steve French <smfrench@xxxxxxxxx> wrote: > > > 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 > > >