[Cluster-devel] [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter
Christoph Hellwig
hch at lst.de
Mon Jul 26 08:19:42 UTC 2021
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)
> > + continue;
>
> There isn't a mapped extent, so return 0 here, right?
We can't just return 0, we always need the final iomap_iter() call
to clean up in case a ->iomap_end method is supplied. No for bmap
having and needing one is rather theoretical, but people will copy
and paste that once we start breaking the rules.
More information about the Cluster-devel
mailing list