nfsd4_deleg_...ttr_conflict(9)
π nfsd4_deleg_getattr_conflict β the kernel API manual, bestie edition π¦
okay so you're reading a Kernel API Manual page, and the function we're obsessing over is nfsd4_deleg_getattr_conflict. no cap, this one is a whole situation. let's get into it β¨
π NAME π
nfsd4_deleg_getattr_conflict β literally just "Recall if GETATTR causes conflict." that's the whole vibe. short, sweet, iconic.
πΈ SYNOPSIS πΈ
__be32 nfsd4_deleg_getattr_conflict (struct svc_rqst *rqstp , struct
dentry *dentry , struct nfs4_delegation **pdp );
like, look at that signature. three params, one return type __be32, and she is not here to play. π«Ά
β¨ ARGUMENTS β¨
rqstpβ the RPC transaction context. think of it as the group chat where this whole request is happening π¬dentryβ the dentry of the inode we're checking for a conflict. yes, that inode. we're doing a vibe check on it πpdpβ the returned WRITE delegation, like, if one was found. so if she's found, she gets returned through here π
π DESCRIPTION π
okay so here's the tea β β this function gets called when there's a conflict between a write delegation and a change/size GETATTR coming from another client. like, two clients, one inode, and suddenly everybody's got opinions. π
the server has two choices, and honestly both are valid:
- use the
CB_GETATTRto get the current values of the attributes from the client that holds the delegation, or - recall the delegation before replying to the GETATTR.
and if you want the receipts, see RFC 8881 section 18.7.4. periodt. π
now for the return value, listen up because this part actually matters:
- it returns 0 if there is no conflict β slay, nothing to do π
- otherwise, an
nfs_statcode is returned.
β οΈ and here's the important bit bestie: if pdp is set to a non-NULL value, then the caller must put the reference. do not forget. i'm serious. this is a memory-leak speedrun otherwise π
π₯ SEE ALSO π₯
the kernel file ./fs/nfsd/nfs4state.c and honestly a whole friend group of functions that also live in this neighborhood:
nfs4_delegation_exists(9)hash_delegation_locked(9)revoke_delegation(9)nfs4_replay_free_cache(9)nfsd4_revoke_states(9)nfsd4_revoke_export_states(9)nfsd_slot_shrinker_count(9)nfsd_slot_shrinker_scan(9)nfsd4_put_client(9)nfsd_wait_for_delegreturn(9)nfsd_breaker_owns_lease(9)nfsd4_deleg_lm_open_conflict(9)nfsd4_process_open2(9)nfsd4_force_end_grace(9)nfs4_preprocess_stateid_op(9)nfs4_preprocess_seqid_op(9)nfsd4_release_lockowner(9)nfsd4_vet_deleg_time(9)nfsd_get_dir_deleg(9)nfsd_update_cmtime_attr(9)
like, that's a squad. they all ate and left no crumbs. π
π sign-off π
this little masterpiece of a page lives in the source directory ./fs/nfsd, dated October 2026, and the manual itself is nfsd4_deleg_...ttr_conflict(9) β yes the title got cut off with ... in the actual header, that's just how it is, we don't question the formatting, we respect it π§
go forth and put that reference, bestie π
π¦ 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