offset_dir_llseek(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ offset_dir_llseek(9) πŸŽ€

okay bestie, this one's from the Kernel API Manual, and it's literally about nudging the read position on a directory file descriptor. no cap, that's the whole vibe πŸ¦‹

🌸 NAME 🌸

offset_dir_llseek β€” Advance the read position of a directory descriptor ✨

πŸ’… SYNOPSIS πŸ’…

here's the signature, copy it exactly because we do not freestyle function signatures in this house:

       loff_t offset_dir_llseek (struct file *file , loff_t offset , int whence
       );

πŸ’– ARGUMENTS πŸ’–

  • file β€” an open directory whose position is to be updated. like, it's already open, bestie 🫢
  • offset β€” a byte offset. yes, bytes. iconic.
  • whence β€” enumerator describing the starting position for this update. it tells the seek where to start from ✨

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea: SEEK_END, SEEK_DATA, and SEEK_HOLE are not supported for directories. not me finding out the hard way 😭 β€” those three? nope, not for dirs.

If it works, it returns the updated read position. if it doesn't, it returns a negative errno, and the read position remains unchanged β€” untouched, unbothered, exactly where it was πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./fs/libfs.c β€” plus the whole lil' squad: simple_offset_init(9), simple_offset_add(9), simple_offset_remove(9), simple_offset_rename(9), simple_offset_rename_exchange(9), simple_offset_destroy(9), offset_readdir(9), simple_rename_timestamp(9), simple_setattr(9), simple_write_end(9), simple_read_from_buffer(9), simple_write_to_buffer(9), memory_read_from_buffer(9), generic_encode_ino32_fh(9), generic_fh_to_dentry(9), generic_fh_to_parent(9), simple_fsync_noflush(9), simple_fsync(9), generic_check_addressable(9), simple_get_link(9), generic_ci_d_compare(9), generic_ci_d_hash(9), generic_ci_match(9), generic_set_sb_d_ops(9), inode_maybe_inc_iversion(9), inode_query_iversion(9), simple_inode_init_ts(9), path_from_stashed(9), simple_start_creating(9).


mwah πŸ’– this page's source/version is ./fs, dated October 2026 β€” and the title is offset_dir_llseek(9). bye bestie, go seek responsibly ✨🫢

πŸ“¦ where this page comes from