Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-27 Thread Darrick J. Wong
On Tue, Jul 27, 2021 at 08:31:38AM +0200, Christoph Hellwig wrote: > On Mon, Jul 26, 2021 at 09:39:22AM -0700, Darrick J. Wong wrote: > > The documentation needs to be much more explicit about the fact that you > > cannot "break;" your way out of an iomap_iter loop. I think the comment > > should

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-26 Thread Christoph Hellwig
On Mon, Jul 26, 2021 at 09:39:22AM -0700, Darrick J. Wong wrote: > The documentation needs to be much more explicit about the fact that you > cannot "break;" your way out of an iomap_iter loop. I think the comment > should be rewritten along these lines: > > "Iterate over filesystem-provided spac

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-26 Thread Darrick J. Wong
On Mon, Jul 26, 2021 at 10:19:42AM +0200, Christoph Hellwig wrote: > On Mon, Jul 19, 2021 at 10:05:45AM -0700, Darrick J. Wong wrote: > > > bno = 0; > > > - ret = iomap_apply(inode, pos, blocksize, 0, ops, &bno, > > > - iomap_bmap_actor); > > > + while ((ret = iomap_iter(&iter,

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-26 Thread Christoph Hellwig
On Mon, Jul 19, 2021 at 10:05:45AM -0700, Darrick J. Wong wrote: > > bno = 0; > > - ret = iomap_apply(inode, pos, blocksize, 0, ops, &bno, > > - iomap_bmap_actor); > > + while ((ret = iomap_iter(&iter, ops)) > 0) { > > + if (iter.iomap.type != IOMAP_MAPPED) > >

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-19 Thread Darrick J. Wong
On Mon, Jul 19, 2021 at 12:35:09PM +0200, Christoph Hellwig wrote: > Rewrite the ->bmap implementation based on iomap_iter. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap/fiemap.c | 31 +-- > 1 file changed, 13 insertions(+), 18 deletions(-) > > diff --git a/f