generic_file_llseek_size(9)
π generic_file_llseek_size(9)
okay so bestie, this one is a Kernel API Manual page, and it's literally the glow-up of generic_file_llseek β same energy, but with extra customization. Let's get into it β¨
πΈ SYNOPSIS πΈ
loff_t generic_file_llseek_size (struct file *file , loff_t offset , int
whence , loff_t maxsize , loff_t eof );
That's the whole vibe β one function, five arguments, zero drama. π
π«Ά ARGUMENTS π«Ά
fileβ the file structure you're seeking on. the main character of this whole operation πoffsetβ the file offset you wanna seek to. where we're headed, bestie πwhenceβ the type of seek. like, which direction are we going, honestly π§maxsizeβ the max size of this file in the file system. the ceiling. the limit. the boundary π§eofβ the offset used for theSEEK_ENDposition. yes, it's a custom one, that's the whole point β¨
π DESCRIPTION π
So here's the tea π β this is a variant of generic_file_llseek that lets you pass in a custom max file size and a custom EOF position. like for e.g. hashed directories. it's giving "I made it customizable because I care" π
Now, the synchronization section, and ngl this part is important so pay attention π
SEEK_SETandSEEK_ENDare unsynchronized β but atomic on 64bit platforms πSEEK_CURis synchronized against otherSEEK_CURs, but not against read/writes β- read/writes behave like
SEEK_SETagainst seeks π₯
okay bestie, note that "unsynchronized" is literally right there in the text β so don't come for me when I say it out loud. the 64bit atomicity is the one little safety net, periodt π«Ά
π SEE ALSO π
- Kernel file
./fs/read_write.cπ vfs_setpos_cookie(9)vfs_setpos(9)must_set_pos(9)generic_llseek_cookie(9)generic_file_llseek(9)fixed_size_llseek(9)no_seek_end_llseek(9)no_seek_end_llseek_size(9)noop_llseek(9)
like a whole friend group of llseek functions, and they all ate π₯
so that's the page, bestie π it lives in ./fs, the date on it is October 2026, and it's the Kernel API Manual version of generic_file_llseek_size(9) β iconic, no cap πβ¨
π¦ 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