offset_dir_llseek(9)
π 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
- 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