> +static inline u64 iomap_length_trim(const struct iomap_iter *iter, loff_t pos, > + u64 len) > +{ > + u64 end = iter->iomap.offset + iter->iomap.length; > + > + if (iter->srcmap.type != IOMAP_HOLE) > + end = min(end, iter->srcmap.offset + iter->srcmap.length); > + return min(len, end - pos); Does this helper warrant a kerneldoc comment similar to iomap_length? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>