On Mon, Jan 27, 2025 at 09:26:15PM -0800, Christoph Hellwig wrote: > > +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? > Can't hurt I suppose. I'll add one. > Otherwise looks good: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > Thanks. Brian