Re: [PATCH 18/28] xfs: refactor unlinked inode recovery

Darrick J. Wong
2020-05-06T16:53:23Z

On Wed, May 06, 2020 at 08:26:09AM -0700, Christoph Hellwig wrote:
> On Mon, May 04, 2020 at 06:12:29PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Move the code that processes unlinked inodes into a separate file in
> > preparation for centralizing the log recovery bits that have to walk
> > every AG. No functional changes.
>
> Is this really worth another tiny source file?

Later I plan to move into this file the code that cleans out stale COW
staging extents, since it should only be necessary to do that as part of
log recovery.

> At least the interface seems very right.
>
> > +out_error:
> > + xfs_warn(mp, "%s: failed to clear agi %d. Continuing.", __func__, agno);
> > + return;
> > +}
>
> No need for a return at the end of a void function.
>
> > + struct xfs_mount *mp;
> > + struct xfs_agi *agi;
> > + struct xfs_buf *agibp;
> > + xfs_agnumber_t agno;
> > + xfs_agino_t agino;
> > + int bucket;
> > + int error;
> > +
> > + mp = log->l_mp;
>
> Please initialize mp on the line where it is declared.

Ok, will fix.

--D