Re: [PATCH v2 2/7] iomap: factor out iomap length helper

Christoph Hellwig
2025-01-28T05:26:16Z

> +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@lst.de>