Lines Matching full:refs
251 static inline void dump_refs(const struct dfs_info3_param *refs, int numrefs) in dump_refs() argument
257 const struct dfs_info3_param *ref = &refs[i]; in dump_refs()
383 static int copy_ref_data(const struct dfs_info3_param *refs, int numrefs, in copy_ref_data() argument
389 ce->ttl = max_t(int, refs[0].ttl, CACHE_MIN_TTL); in copy_ref_data()
391 ce->srvtype = refs[0].server_type; in copy_ref_data()
392 ce->hdr_flags = refs[0].flags; in copy_ref_data()
393 ce->ref_flags = refs[0].ref_flag; in copy_ref_data()
394 ce->path_consumed = refs[0].path_consumed; in copy_ref_data()
399 t = alloc_target(refs[i].node_name, refs[i].path_consumed); in copy_ref_data()
421 static struct cache_entry *alloc_cache_entry(struct dfs_info3_param *refs, int numrefs) in alloc_cache_entry() argument
430 ce->path = refs[0].path_name; in alloc_cache_entry()
431 refs[0].path_name = NULL; in alloc_cache_entry()
436 rc = copy_ref_data(refs, numrefs, ce, NULL); in alloc_cache_entry()
473 static struct cache_entry *add_cache_entry_locked(struct dfs_info3_param *refs, in add_cache_entry_locked() argument
488 rc = cache_entry_hash(refs[0].path_name, strlen(refs[0].path_name), &hash); in add_cache_entry_locked()
492 ce = alloc_cache_entry(refs, numrefs); in add_cache_entry_locked()
617 /* Update a cache entry with the new referral in @refs */
618 static int update_cache_entry_locked(struct cache_entry *ce, const struct dfs_info3_param *refs, in update_cache_entry_locked() argument
637 rc = copy_ref_data(refs, numrefs, ce, th); in update_cache_entry_locked()
645 struct dfs_info3_param **refs, int *numrefs) in get_dfs_referral() argument
650 *refs = NULL; in get_dfs_referral()
659 rc = ses->server->ops->get_dfs_refer(xid, ses, path, refs, numrefs, cache_cp, in get_dfs_referral()
662 struct dfs_info3_param *ref = *refs; in get_dfs_referral()
686 struct dfs_info3_param *refs = NULL; in cache_refresh_path() local
717 rc = get_dfs_referral(xid, ses, path, &refs, &numrefs); in cache_refresh_path()
723 dump_refs(refs, numrefs); in cache_refresh_path()
730 rc = update_cache_entry_locked(ce, refs, numrefs); in cache_refresh_path()
735 ce = add_cache_entry_locked(refs, numrefs); in cache_refresh_path()
745 free_dfs_info_array(refs, numrefs); in cache_refresh_path()
1199 struct dfs_info3_param *refs, in __refresh_tcon_referral() argument
1213 if (target_share_equal(tcon, refs[i].node_name)) { in __refresh_tcon_referral()
1224 rc = update_cache_entry_locked(ce, refs, numrefs); in __refresh_tcon_referral()
1226 ce = add_cache_entry_locked(refs, numrefs); in __refresh_tcon_referral()
1241 struct dfs_info3_param *refs = NULL; in refresh_tcon_referral() local
1276 rc = get_dfs_referral(xid, ses, path, &refs, &numrefs); in refresh_tcon_referral()
1278 rc = __refresh_tcon_referral(tcon, path, refs, in refresh_tcon_referral()
1285 free_dfs_info_array(refs, numrefs); in refresh_tcon_referral()