nfs3_decode_dirent(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nfs3_decode_dirent(9) ✨

okay so this is a page straight out of the Kernel API Manual, and honestly? it's a little banger. it's about pulling one (1) single NFSv3 directory entry out of the local page cache. one. single. entry. queen behavior πŸ’…


🌸 NAME 🌸

nfs3_decode_dirent β€” decodes a single NFSv3 directory entry that's chillin' in the local page cache πŸ—‚οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

int nfs3_decode_dirent (struct xdr_stream *xdr , struct nfs_entry *entry
, bool plus );

πŸŽ€ ARGUMENTS πŸŽ€

  • xdr β€” the XDR stream where the entry is living its best life. that's where it resides, bestie πŸ’œ
  • entry β€” the buffer you fill in with the entry data. it's giving "empty cup, please pour" πŸ“
  • plus β€” a boolean that says whether this should be a readdirplus entry or not. yes/no energy πŸ”₯

πŸ‘‘ DESCRIPTION πŸ‘‘

so like. it returns zero if everything went good, and if not? you get a negative errno value back. no cap, that's the whole success metric 😭

big important vibe check: this function is not invoked during READDIR reply decoding. not even a little. instead, it gets called whenever an application invokes the getdents(2) system call on a directory that's already in our cache. main character energy fr fr 🫢

3.3.16 entry3

struct entry3 {
        fileid3         fileid;
        filename3       name;
        cookie3         cookie;
        fhandle3        filehandle;
        post_op_attr3   attributes;
        entry3          *nextentry;
};

3.3.17 entryplus3

struct entryplus3 {
        fileid3         fileid;
        filename3       name;
        cookie3         cookie;
        post_op_attr    name_attributes;
        post_op_fh3     name_handle;
        entryplus3      *nextentry;
};

🌈 SEE ALSO 🌈

  • Kernel file ./fs/nfs/nfs3xdr.c β€” go read it, iykyk πŸ‘€

lowkey if you're poking at this, you're probably deep in the NFS mines. slay. drink some water πŸ’–

🧚 and that's the whole page! this cutie came from ./fs/nfs, dated October 2026 β€” so go forth and decode those dirents, bestie. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from