fuse: add readdir cache version
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:04 +0000 (10:07 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:04 +0000 (10:07 +0200)
commit3494927e090bf511e54eecaf33a8e56e5c0463db
tree0015407dc519f878d5dfc5233cfb1dc50e7ff7bd
parent5d7bc7e8680c7ca4c8a4f139ce2a54ccb8131ef0
fuse: add readdir cache version

Allow the cache to be invalidated when page(s) have gone missing.  In this
case increment the version of the cache and reset to an empty state.

Add a version number to the directory stream in struct fuse_file as well,
indicating the version of the cache it's supposed to be reading.  If the
cache version doesn't match the stream's version, then reset the stream to
the beginning of the cache.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/fuse_i.h
fs/fuse/inode.c
fs/fuse/readdir.c