On Thu, May 5, 2022 at 4:27 AM Enzo Matsumiya <ematsumiya@xxxxxxx> wrote: > > Just another nitpick > > On 05/04, Ronnie Sahlberg wrote: > <snip> > >@@ -776,7 +791,8 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, > > struct cifs_fid *pfid; > > struct dentry *dentry; > > > >- if (tcon->nohandlecache) > >+ if (tcon == NULL || tcon->nohandlecache || > >+ is_smb1_server(tcon->ses->server)) > > return -ENOTSUPP; > > > > if (cifs_sb->root == NULL) > > This last hunk looks unrelated to the original topic. Could it be sent > as a separate patch please? This helps tracking when doing > backports/bisects. Thanks. I will do that. Steve, I will rework the patch and split it up a little. I will also do some small minor changes so that it will be very easy to expand readdir() to not just do this for hardcoded root of share but so that we can do this for any dir. So please leave it out from the for-next for now, or at least do not include it in any push requests until I have re-worked it. In testing, in my latest iteration, doing the second 'ls /mnt' results in zero network traffic as long as the lease is kept. Even IF we cache the directory like this, we still do a few commands to the server for entries that are softlinks/reparse-points but that might be possible to address too. > > > Cheers, > > Enzo >