• Home
  • Raw
  • Download

Lines Matching refs:nfsi

163 	struct nfs_inode *nfsi = NFS_I(inode);  in nfs_attribute_timeout()  local
165 …return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->att… in nfs_attribute_timeout()
200 struct nfs_inode *nfsi = NFS_I(inode); in nfs_set_cache_invalid() local
213 nfsi->cache_validity |= flags; in nfs_set_cache_invalid()
223 struct nfs_inode *nfsi = NFS_I(inode); in nfs_zap_caches_locked() local
228 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); in nfs_zap_caches_locked()
229 nfsi->attrtimeo_timestamp = jiffies; in nfs_zap_caches_locked()
243 nfs_zap_label_cache_locked(nfsi); in nfs_zap_caches_locked()
450 struct nfs_inode *nfsi = NFS_I(inode); in nfs_fhget() local
460 nfsi->cache_validity = 0; in nfs_fhget()
500 memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf)); in nfs_fhget()
501 nfsi->write_io = 0; in nfs_fhget()
502 nfsi->read_io = 0; in nfs_fhget()
504 nfsi->read_cache_jiffies = fattr->time_start; in nfs_fhget()
505 nfsi->attr_gencount = fattr->gencount; in nfs_fhget()
547 if (nfsi->cache_validity != 0) in nfs_fhget()
548 nfsi->cache_validity |= NFS_INO_REVAL_FORCED; in nfs_fhget()
552 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); in nfs_fhget()
553 nfsi->attrtimeo_timestamp = now; in nfs_fhget()
554 nfsi->access_cache = RB_ROOT; in nfs_fhget()
932 struct nfs_inode *nfsi; in nfs_close_context() local
943 nfsi = NFS_I(inode); in nfs_close_context()
946 if (nfsi->cache_validity & NFS_INO_INVALID_DATA) in nfs_close_context()
948 if (!list_empty(&nfsi->open_files)) in nfs_close_context()
1034 struct nfs_inode *nfsi = NFS_I(inode); in nfs_inode_attach_open_context() local
1037 if (list_empty(&nfsi->open_files) && in nfs_inode_attach_open_context()
1038 (nfsi->cache_validity & NFS_INO_DATA_INVAL_DEFER)) in nfs_inode_attach_open_context()
1039 nfsi->cache_validity |= NFS_INO_INVALID_DATA | in nfs_inode_attach_open_context()
1041 list_add_tail_rcu(&ctx->list, &nfsi->open_files); in nfs_inode_attach_open_context()
1059 struct nfs_inode *nfsi = NFS_I(inode); in nfs_find_open_context() local
1063 list_for_each_entry_rcu(pos, &nfsi->open_files, list) { in nfs_find_open_context()
1121 struct nfs_inode *nfsi = NFS_I(inode); in __nfs_revalidate_inode() local
1175 if (nfsi->cache_validity & NFS_INO_INVALID_ACL) in __nfs_revalidate_inode()
1216 struct nfs_inode *nfsi = NFS_I(inode); in nfs_invalidate_mapping() local
1231 memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf)); in nfs_invalidate_mapping()
1251 struct nfs_inode *nfsi = NFS_I(inode); in nfs_revalidate_mapping_rcu() local
1252 unsigned long *bitlock = &nfsi->flags; in nfs_revalidate_mapping_rcu()
1263 (nfsi->cache_validity & NFS_INO_INVALID_DATA)) in nfs_revalidate_mapping_rcu()
1278 struct nfs_inode *nfsi = NFS_I(inode); in nfs_revalidate_mapping() local
1279 unsigned long *bitlock = &nfsi->flags; in nfs_revalidate_mapping()
1314 if (nfsi->cache_validity & NFS_INO_INVALID_DATA) in nfs_revalidate_mapping()
1322 nfsi->cache_validity &= ~(NFS_INO_INVALID_DATA| in nfs_revalidate_mapping()
1336 static bool nfs_file_has_writers(struct nfs_inode *nfsi) in nfs_file_has_writers() argument
1338 struct inode *inode = &nfsi->vfs_inode; in nfs_file_has_writers()
1342 if (list_empty(&nfsi->open_files)) in nfs_file_has_writers()
1347 static bool nfs_file_has_buffered_writers(struct nfs_inode *nfsi) in nfs_file_has_buffered_writers() argument
1349 return nfs_file_has_writers(nfsi) && nfs_file_io_is_buffered(nfsi); in nfs_file_has_buffered_writers()
1398 struct nfs_inode *nfsi = NFS_I(inode); in nfs_check_inode_attributes() local
1411 } else if (nfsi->fileid != fattr->fileid) { in nfs_check_inode_attributes()
1414 nfsi->fileid == fattr->mounted_on_fileid) in nfs_check_inode_attributes()
1422 if (!nfs_file_has_buffered_writers(nfsi)) { in nfs_check_inode_attributes()
1470 nfsi->read_cache_jiffies = fattr->time_start; in nfs_check_inode_attributes()
1619 const struct nfs_inode *nfsi = NFS_I(inode); in nfs_inode_attrs_need_update() local
1621 return ((long)fattr->gencount - (long)nfsi->attr_gencount) > 0 || in nfs_inode_attrs_need_update()
1622 ((long)nfsi->attr_gencount - (long)nfs_read_attr_generation_counter() > 0); in nfs_inode_attrs_need_update()
1796 struct nfs_inode *nfsi = NFS_I(inode); in nfs_update_inode() local
1801 bool have_writers = nfs_file_has_buffered_writers(nfsi); in nfs_update_inode()
1816 } else if (nfsi->fileid != fattr->fileid) { in nfs_update_inode()
1819 nfsi->fileid == fattr->mounted_on_fileid) in nfs_update_inode()
1824 inode->i_sb->s_id, (long long)nfsi->fileid, in nfs_update_inode()
1854 nfsi->read_cache_jiffies = fattr->time_start; in nfs_update_inode()
1856 save_cache_validity = nfsi->cache_validity; in nfs_update_inode()
1857 nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR in nfs_update_inode()
1866 nfsi->cache_validity |= save_cache_validity & NFS_INO_INVALID_ATTR; in nfs_update_inode()
1889 nfsi->cache_validity |= NFS_INO_DATA_INVAL_DEFER; in nfs_update_inode()
1894 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1904 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1913 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1940 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1951 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1967 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1981 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
1995 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
2009 nfsi->cache_validity |= save_cache_validity & in nfs_update_inode()
2029 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); in nfs_update_inode()
2030 nfsi->attrtimeo_timestamp = now; in nfs_update_inode()
2032 nfsi->attr_gencount = nfs_inc_attr_generation_counter(); in nfs_update_inode()
2035 if (!time_in_range_open(now, nfsi->attrtimeo_timestamp, in nfs_update_inode()
2036 nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) { in nfs_update_inode()
2037 nfsi->attrtimeo <<= 1; in nfs_update_inode()
2038 if (nfsi->attrtimeo > NFS_MAXATTRTIMEO(inode)) in nfs_update_inode()
2039 nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); in nfs_update_inode()
2041 nfsi->attrtimeo_timestamp = now; in nfs_update_inode()
2044 if ((long)fattr->gencount - (long)nfsi->attr_gencount > 0) in nfs_update_inode()
2045 nfsi->attr_gencount = fattr->gencount; in nfs_update_inode()
2067 struct nfs_inode *nfsi; in nfs_alloc_inode() local
2068 nfsi = kmem_cache_alloc(nfs_inode_cachep, GFP_KERNEL); in nfs_alloc_inode()
2069 if (!nfsi) in nfs_alloc_inode()
2071 nfsi->flags = 0UL; in nfs_alloc_inode()
2072 nfsi->cache_validity = 0UL; in nfs_alloc_inode()
2074 nfsi->nfs4_acl = NULL; in nfs_alloc_inode()
2076 return &nfsi->vfs_inode; in nfs_alloc_inode()
2086 static inline void nfs4_init_once(struct nfs_inode *nfsi) in nfs4_init_once() argument
2089 INIT_LIST_HEAD(&nfsi->open_states); in nfs4_init_once()
2090 nfsi->delegation = NULL; in nfs4_init_once()
2091 init_rwsem(&nfsi->rwsem); in nfs4_init_once()
2092 nfsi->layout = NULL; in nfs4_init_once()
2098 struct nfs_inode *nfsi = (struct nfs_inode *) foo; in init_once() local
2100 inode_init_once(&nfsi->vfs_inode); in init_once()
2101 INIT_LIST_HEAD(&nfsi->open_files); in init_once()
2102 INIT_LIST_HEAD(&nfsi->access_cache_entry_lru); in init_once()
2103 INIT_LIST_HEAD(&nfsi->access_cache_inode_lru); in init_once()
2104 INIT_LIST_HEAD(&nfsi->commit_info.list); in init_once()
2105 atomic_long_set(&nfsi->nrequests, 0); in init_once()
2106 atomic_long_set(&nfsi->commit_info.ncommit, 0); in init_once()
2107 atomic_set(&nfsi->commit_info.rpcs_out, 0); in init_once()
2108 init_rwsem(&nfsi->rmdir_sem); in init_once()
2109 mutex_init(&nfsi->commit_mutex); in init_once()
2110 nfs4_init_once(nfsi); in init_once()