Re: [PATCH 0/3] cifs: cache directory content for shroot

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

 



My initial test of this was to Windows 10, doing ls of the root directory.

During mount as expected I see the initial compounded smb3.1.1
create/query(file_all_info) work and get a directory lease (read
lease) on the root directory

Then doing the ls
I see the expected ls of the root directory query dir return
successfully, but it is a compounded open/query-dir (no lease
requested) not a query dir using the already open root file handle.
We should find a way to allow it to use the root file handle if
possible although perhaps less important when the caching code is
fully working as it will only be requested once.

The next ls though does an open/query but then does stat of all the
files (which is bad, lots of compounded open/query-info/close).  Then
the next ls will do open/query-dir

So the patch set is promising but currently isn't caching the root
directory contents in a way that is recognized by the subsequent ls
commands.   I will try to look at this more this weekend - but let me
know if updated version of the patchset - it will be very, very useful
when we can get this working - very exciting.

On Thu, Oct 1, 2020 at 3:50 PM Ronnie Sahlberg <lsahlber@xxxxxxxxxx> wrote:
>
> Steve, List
>
> See initial implementation of a mechanism to cache the directory entries for
> a shared cache handle (shroot).
> We cache all the entries during the initial readdir() scan, using the context
> from the vfs layer as the key to handle if there are multiple concurrent readir() scans
> of the same directory.
> Then if/when we have successfully cached the entire direcotry we will server any
> subsequent readdir() from out of cache, avoinding making any query direcotry calls to the server.
>
> As with all of shroot, the cache is kept until the direcotry lease is broken.
>
>
> The first two patches are small and just a preparation for the third patch. They go as separate
> patches to make review easier.
> The third patch adds the actual meat of the dirent caching .
>
>
> For now this might not be too exciting because the only cache the root handle.
> I hope in the future we will expand the directory caching to handle any/many direcotries.
>


-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux