Lines Matching refs:rdc
44 spin_lock(&fi->rdc.lock); in fuse_add_dirent_to_cache()
49 if (fi->rdc.cached || pos != fi->rdc.pos) { in fuse_add_dirent_to_cache()
50 spin_unlock(&fi->rdc.lock); in fuse_add_dirent_to_cache()
53 version = fi->rdc.version; in fuse_add_dirent_to_cache()
54 size = fi->rdc.size; in fuse_add_dirent_to_cache()
62 spin_unlock(&fi->rdc.lock); in fuse_add_dirent_to_cache()
73 spin_lock(&fi->rdc.lock); in fuse_add_dirent_to_cache()
75 if (fi->rdc.version != version || fi->rdc.size != size || in fuse_add_dirent_to_cache()
76 WARN_ON(fi->rdc.pos != pos)) in fuse_add_dirent_to_cache()
84 fi->rdc.size = (index << PAGE_SHIFT) + offset + reclen; in fuse_add_dirent_to_cache()
85 fi->rdc.pos = dirent->off; in fuse_add_dirent_to_cache()
87 spin_unlock(&fi->rdc.lock); in fuse_add_dirent_to_cache()
97 spin_lock(&fi->rdc.lock); in fuse_readdir_cache_end()
99 if (fi->rdc.pos != pos) { in fuse_readdir_cache_end()
100 spin_unlock(&fi->rdc.lock); in fuse_readdir_cache_end()
104 fi->rdc.cached = true; in fuse_readdir_cache_end()
105 end = ALIGN(fi->rdc.size, PAGE_SIZE); in fuse_readdir_cache_end()
106 spin_unlock(&fi->rdc.lock); in fuse_readdir_cache_end()
431 fi->rdc.cached = false; in fuse_rdc_reset()
432 fi->rdc.version++; in fuse_rdc_reset()
433 fi->rdc.size = 0; in fuse_rdc_reset()
434 fi->rdc.pos = 0; in fuse_rdc_reset()
469 spin_lock(&fi->rdc.lock); in fuse_readdir_cached()
471 if (!fi->rdc.cached) { in fuse_readdir_cached()
473 if (!ctx->pos && !fi->rdc.size) { in fuse_readdir_cached()
474 fi->rdc.mtime = inode->i_mtime; in fuse_readdir_cached()
475 fi->rdc.iversion = inode_query_iversion(inode); in fuse_readdir_cached()
477 spin_unlock(&fi->rdc.lock); in fuse_readdir_cached()
486 if (inode_peek_iversion(inode) != fi->rdc.iversion || in fuse_readdir_cached()
487 !timespec64_equal(&fi->rdc.mtime, &inode->i_mtime)) { in fuse_readdir_cached()
497 if (ff->readdir.version != fi->rdc.version) { in fuse_readdir_cached()
506 ff->readdir.version = fi->rdc.version; in fuse_readdir_cached()
508 WARN_ON(fi->rdc.size < ff->readdir.cache_off); in fuse_readdir_cached()
512 if (index == (fi->rdc.size >> PAGE_SHIFT)) in fuse_readdir_cached()
513 size = fi->rdc.size & ~PAGE_MASK; in fuse_readdir_cached()
516 spin_unlock(&fi->rdc.lock); in fuse_readdir_cached()
524 spin_lock(&fi->rdc.lock); in fuse_readdir_cached()
529 if (fi->rdc.version == ff->readdir.version) in fuse_readdir_cached()
535 if (ff->readdir.version != fi->rdc.version) { in fuse_readdir_cached()
536 spin_unlock(&fi->rdc.lock); in fuse_readdir_cached()
541 spin_unlock(&fi->rdc.lock); in fuse_readdir_cached()