mbox series

[0/3,V2] : cifs: cache directory content for shroot

Message ID 20201004233705.31436-1-lsahlber@redhat.com (mailing list archive)
Headers show
Series : cifs: cache directory content for shroot | expand

Message

Ronnie Sahlberg Oct. 4, 2020, 11:37 p.m. UTC
Steve, Aurelien, List

V2: addressing Aureliens comments
* Fix comment style
* Describe what ctx->pos == 2 means
* use is_smb1_server()


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.

Comments

Steve French Oct. 5, 2020, 11:55 p.m. UTC | #1
merged the first two (cleanup) patches into cifs-2.6.git for-next
pending additional testing.

Waiting on the larger, third patch until more review comments and a
chance to look more carefully and try it out.

On Sun, Oct 4, 2020 at 6:37 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Steve, Aurelien, List
>
> V2: addressing Aureliens comments
> * Fix comment style
> * Describe what ctx->pos == 2 means
> * use is_smb1_server()
>
>
> 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.
>