dfs_cache_find(9)
π
dfs_cache_find(9) β bestie's guide to the Kernel API Manual
okay so this one lives in the kernel API manual and it's literally called dfs_cache_find β the whole vibe is "find a DFS cache entry" β¨ she's a lookup girlie and she ate, no cap.
πΈ SYNOPSIS πΈ
int dfs_cache_find (const unsigned int xid , struct cifs_ses *ses ,
const struct nls_table *cp , int remap , const char *path ,
struct dfs_info3_param *ref , struct dfs_cache_tgt_list *tgt_list );
likeβ¦ seven whole parameters, she's high maintenance but she delivers π
π ARGUMENTS π
xidβ the syscall xid. it's giving β¨identifier energyβ¨sesβ the smb session you're issuing the request on π«Άcpβ codepage. yes bestie, a codepage.remapβ the path character remapping type π₯pathβ the path to look up in the DFS referral cache. this is the main character fr.refβ when non-NULL, store a single DFS referral result in it. whenNULL? she minds her business πtgt_listβ when non-NULL, store the complete DFS target list in it. again, non-NULLonly, iykyk π
π¦ DESCRIPTION π¦
so here's the tea π β if it doesn't find the cache entry, then it will get a DFS referral for path and create a new entry. fresh out the oven, brand new, iconic.
in case the cache entry exists but is expired π (we've all been there), it will get a DFS referral for path and then update the respective cache entry. glow-up, essentially.
these parameters are passed down to the get_dfs_refer call if it needs to be issued:
and then β the moment we've all been waiting for β return zero if the target was found, otherwise non-zero. that's it, that's the return value, periodt. β
ngl, the "these parameters are passed down to the get_dfs_refer call" line stands on its own in the original, so we're leaving it exactly where it is β no edits, no adding, we don't invent lore here π
ββοΈ
π SEE ALSO π
- Kernel file
./fs/smb/client/dfs_cache.c dfs_cache_canonical_path(9)dfs_cache_init(9)dfs_cache_destroy(9)dfs_cache_noreq_find(9)dfs_cache_noreq_update_tgthint(9)dfs_cache_get_tgt_referral(9)dfs_cache_get_tgt_share(9)dfs_cache_remount_fs(9)
the whole friend group π«Ά honestly obsessed.
mwah π this princess came from ./fs/smb/client, dated October 2026, and she's filed under dfs_cache_find(9) β catch her in the Kernel API Manual, k bye π§ββοΈβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms