On Thu, Dec 6, 2018 at 9:01 PM Nikolaus Rath <Nikolaus@xxxxxxxx> wrote: > > Hello, > > I am trying to improve the performance of readdir() requests. I have a > client application that issues a lot of readdir() requests, and a FUSE > filesystem that makes extensive use of kernel caching for inode entry > attributes because retrieving the attributes from the backend is > relatively expensive. > > Unfortunately, it seems to me that currently there is no way to avoid > having to retrieve the attributes from the backend for every entry that > is returned by readdir - on every call: > > If I am using readdirplus, I have to include the full attributes even if > the kernel already has them cached. > > If I disable readdirplus, I can return just the entry name and its inode > - but I believe because this doesn't result in a lookup count increase > of the inode, the kernel can't match this with the existing cached data > for the inode (is that correct?) and I'm getting a separate lookup() > request for each entry that I've returned. Was the entry timed out? If not, then there shouldn't've been a lookup. Thanks, Miklos