[Cluster-devel] [PATCH 19/30] iomap: switch iomap_bmap to use iomap_iter
Christoph Hellwig
hch at lst.de
Tue Aug 10 07:13:41 UTC 2021
On Mon, Aug 09, 2021 at 11:39:51PM -0700, Darrick J. Wong wrote:
> Can't this at least be rephrased as:
>
> const uint bno_shift = (mapping->host->i_blkbits - SECTOR_SHIFT);
>
> while ((ret = iomap_iter(&iter, ops)) > 0) {
> if (iter.iomap.type == IOMAP_MAPPED)
> bno = iomap_sector(iomap, iter.pos) << bno_shift;
> /* leave iter.processed unset to stop iteration */
> }
>
> to make the loop exit more explicit?
Sure.
More information about the Cluster-devel
mailing list