Re: [PATCH 03/10] xfs: improve the xfs_dabuf_map calling conventions

Christoph Hellwig
2019-11-21T06:06:31Z

On Wed, Nov 20, 2019 at 09:44:58PM -0800, Darrick J. Wong wrote:
> On Wed, Nov 20, 2019 at 07:20:35PM +0100, Christoph Hellwig wrote:
> > On Wed, Nov 20, 2019 at 10:17:08AM -0800, Darrick J. Wong wrote:
> > > > - error = xfs_dabuf_map(dp, bno, mappedbno, whichfork,
> > > > - &mapp, &nmap);
> > > > + error = xfs_dabuf_map(dp, bno,
> > > > + mappedbno == -1 ? XFS_DABUF_MAP_HOLE_OK : 0,
> > > > + whichfork, &mapp, &nmap);
> > > > if (error) {
> > > > /* mapping a hole is not an error, but we don't continue */
> > > > - if (error == -1)
> > > > + if (error == -ENOENT)
> > >
> > > Shouldn't this turn into:
> > >
> > > if (error || !nmap)
> > > goto out_free;
> > >
> > > Otherwise looks ok to me.
> >
> > Yes, it should. Looks like that hunk got lost in the reshuffle.
>
> With that and the other change I mentioned, it seems to test ok. Do you
> want to respin the patch, or just let me keep my staged version?

I've just done the respin and was about to re-start testing. If you
have a sensible version I'll skip that and will let you proceed.