STRUCT IOMAP_ITER(9)
β¨ struct iomap_iter β¨
okay so this is a page from the Kernel API Manual and it's literally about iterating through a range of a file, bestie. struct city, population: you. let's get into it π
πΈ NAME πΈ
struct iomap_iter β iterate through a range of a file
π¦ SYNOPSIS π¦
struct iomap_iter {
struct inode *inode;
loff_t pos;
u64 len;
loff_t iter_start_pos;
int status;
unsigned flags;
struct iomap iomap;
struct iomap srcmap;
struct folio_batch *fbatch;
void *private;
};
like, look at her. ten whole members. main character energy fr fr π
π Members π
inodeβ set at the start of the iteration and it should not change. hands off, no cap. π«Άposβ the current file position we're operating on. it gets updated by calls toiomap_iter, so treat it as read-only inside the body. it's giving "look but don't touch" β¨lenβ the remaining length of the file segment we're operating on. it updates at the exact same time aspos, they're matching, they're coordinated, we love a synchronized duo πiter_start_posβ the original start pos for the current iomap. used for incremental iter advance. the origin story, the beginning of the era π¦statusβ status of the most recent iteration. zero on success, or a negative errno on error. so basically zero = slay, negative errno = πflagsβ zero or more of theiomap_beginflags above. (yes, "above" β they live earlier in this manual, go look π)iomapβ map describing the I/O iteration π«srcmapβ source map for COW operations πfbatchβ okay so the page literally doesn't describe this one, and I'm not out here making stuff up, so: it's in the struct, it's astruct folio_batch *, that's what we know πprivateβ same situation bestie, it's avoid *and the manpage doesn't say a word about it. mysterious. lowkey iconic of it π
β SEE ALSO β
all the related lore, from the kernel file ./include/linux/iomap.h:
iomap_length_trim(9)iomap_length(9)iomap_iter_advance_full(9)iomap_iter_srcmap(9)iomap_iter_next(9)
go read them, iykyk π
ngl this one's short but she ate. every member accounted for, nothing skipped, we keep the details and the vibe π
okay that's the whole page!! sourced straight from ./include/linux, dated October 2026, and it's the struct iomap_iter(9) page of the Kernel API Manual β mwah, go iterate something, 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