nfs4_proc_get_locations(9)
π nfs4_proc_get_locations(9)
okay so bestie, you're in the Kernel API Manual now β welcome to the kernel side of the group chat π this one is all about finding out where a filesystem ran off to after it migrated. it's giving "where did my FSID go" energy and honestly? iconic.
β¨ NAME β¨
nfs4_proc_get_locations β discover locations for a migrated FSID πΈ
β¨ SYNOPSIS β¨
int nfs4_proc_get_locations (struct nfs_server *server , struct nfs_fh
*fhandle , struct nfs4_fs_locations *locations , struct page *page ,
const struct cred *cred );
β¨ ARGUMENTS β¨
serverβ pointer to thenfs_serverwe're processing, aka the main character πfhandleβ pointer to the kernel NFS client's file handle, lowkey the ID card for the file fr frlocationsβ the result of the query, this is where the answer lands πpageβ a buffer, plain and simple π«Άcredβ the credential to use for this operation, gotta have the right pass to get in π
β¨ DESCRIPTION β¨
so here's the tea β β this returns NFS4_OK on success, a negative NFS4ERR status code if the operation failed, or a negative errno if a local error occurred. three possible outcomes, all valid, all slay π
on success, locations gets filled in β but bestie, listen: if the server has no locations information, NFS_ATTR_FATTR_V4_LOCATIONS is not asserted. no cap, that attribute just doesn't show up π₯
π heads up: -NFS4ERR_LEASE_MOVED gets returned if the server still has leases from this client that require migration recovery. like, the server's still holding onto your old stuff and needs you to sort it out first. not me being dramatic, it's literally in the spec π
β¨ SEE ALSO β¨
Kernel file ./fs/nfs/nfs4proc.c, plus the whole friend group π¦:
nfs41_check_expired_locks(9)nfs41_check_open_stateid(9)nfs4_proc_get_rootfh(9)nfs4_proc_setclientid(9)nfs4_proc_setclientid_confirm(9)nfs4_proc_fsid_present(9)nfs4_test_session_trunk(9)nfs41_test_stateid(9)nfs41_free_stateid(9)
and that's the whole page, bestie, you ate that π this little gem lives under ./fs/nfs and the version vibes are dated October 2026 β go forth and migrate your FSIDs responsibly πβ¨π§
π¦ 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