Re: [PATCH v7 5/8] iomap: Introduce iomap_iter2 for two files

From: Christoph Hellwig
Date: Mon Aug 23 2021 - 08:58:29 EST

On Mon, Aug 16, 2021 at 02:03:56PM +0800, Shiyang Ruan wrote:
> Some operations, such as comparing a range of data in two files under
> fsdax mode, requires nested iomap_begin()/iomap_end() on two files.
> Thus, we introduce iomap_iter2() to accept two iteraters to operate
> action on two files.

We really should not need both. We should be able to be in two
nested loops, just operating on the part that both cover (for which
a helper might be useful).