[PATCH 1/7] repair: parallelise phase 7
Dave Chinner
david at fromorbit.com
Mon Feb 8 18:12:34 CST 2016
On Mon, Feb 08, 2016 at 12:55:55AM -0800, Christoph Hellwig wrote:
> > + 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)) {
Yup, done.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list