xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/7] repair: parallelise phase 7
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 8 Feb 2016 00:55:55 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1454627108-19036-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1454627108-19036-1-git-send-email-david@xxxxxxxxxxxxx> <1454627108-19036-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
> +     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@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>