[PATCH 1/7] repair: parallelise phase 7
Christoph Hellwig
hch at infradead.org
Mon Feb 8 02:55:55 CST 2016
> + 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 at lst.de>
More information about the xfs
mailing list