Re: [PATCH 1/7] repair: parallelise phase 7

Christoph Hellwig
2016-02-08T08:55:57Z

> + irec = findfirst_inode_rec(agno);
> +
> + while (irec != NULL) {
> + for (j = 0; j < XFS_INODES_PER_CHUNK; j++) {
> + ASSERT(is_inode_confirmed(irec, j));
> +
> + if (is_inode_free(irec, j))
> + continue;
> +
> + ASSERT(no_modify || is_inode_reached(irec, j));
> +
> + nrefs = num_inode_references(irec, j);
> + ASSERT(no_modify || nrefs > 0);
> +
> + if (get_inode_disk_nlinks(irec, j) != nrefs)
> + update_inode_nlinks(wq->mp,
> + XFS_AGINO_TO_INO(wq->mp, agno,
> + irec->ino_startnum + j),
> + nrefs);
> + }
> + irec = next_ino_rec(irec);

Wouldn't this look be slightly cleaner as:

for (irec = findfirst_inode_rec(agno);
irec;
irec = next_ino_rec(irec)) {

?

Otherwise looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>