Patch 1 is trivial, to use the SECTOR_SIZE macro instead of open-coding. Patch 2 is the one that matters: iomap_is_partially_uptodate was doing invalid memory accesses past the end of the iomap_page->uptodate bitmap. Patch3 is a small optimization (?) based on what the non-iomap code does, i.e. don't bother checking each block if the "partial" range covers the whole page These survived an xfstests -g auto run on 4k and 1k block size filesystems on x86_64. Careful review for off by ones is appreciated in any case. ;) Thanks, -Eric