• Miklos Szeredi's avatar
    fuse: allow using readdir cache · 5d7bc7e8
    Miklos Szeredi authored
    
    
    The cache is only used if it's completed, not while it's still being
    filled; this constraint could be lifted later, if it turns out to be
    useful.
    
    Introduce state in struct fuse_file that indicates the position within the
    cache.  After a seek, reset the position to the beginning of the cache and
    search the cache for the current position.  If the current position is not
    found in the cache, then fall back to uncached readdir.
    
    It can also happen that page(s) disappear from the cache, in which case we
    must also fall back to uncached readdir.
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    5d7bc7e8
fuse_i.h 24.6 KB