> + * inline helpers for bitmap operations on iop->state > + */ > +static inline void iop_set_range(struct iomap_page *iop, unsigned int start_blk, > + unsigned int nr_blks) > +{ > + bitmap_set(iop->state, start_blk, nr_blks); > +} > + > +static inline bool iop_test_block(struct iomap_page *iop, unsigned int block) > +{ > + return test_bit(block, iop->state); > +} > + > +static inline bool iop_bitmap_full(struct iomap_page *iop, > + unsigned int blks_per_folio) > +{ > + return bitmap_full(iop->state, blks_per_folio); > +} I don't really see much poin in these helpers, any particular reason for adding them? > +/* > + * iop related helpers for checking uptodate/dirty state of per-block > + * or range of blocks within a folio > + */ I'm also not sure this comment adds a whole lot of value. The rest looks good modulo the WARN_ONs already mentined by Brian.