fuse: use iversion for readdir cache verification

Use the internal iversion counter to make sure modifications of the
directory through this filesystem are not missed by the mtime check (due to
mtime granularity).

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Miklos Szeredi
2018-10-01 10:07:05 +02:00
parent 7118883b44
commit 261aaba72f
3 changed files with 21 additions and 8 deletions

View File

@@ -120,6 +120,9 @@ struct fuse_inode {
/* modification time of directory when cache was started */
struct timespec64 mtime;
/* iversion of directory when cache was started */
u64 iversion;
/* protects above fields */
spinlock_t lock;
} rdc;