xfs
[Top] [All Lists]

Re: [PATCH 5/5] xfs: don't chain ioends during writepage submission

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/5] xfs: don't chain ioends during writepage submission
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 10 Feb 2016 08:52:40 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160209134930.GD13357@xxxxxxxxxxxxx>
References: <1454910258-7578-1-git-send-email-david@xxxxxxxxxxxxx> <1454910258-7578-6-git-send-email-david@xxxxxxxxxxxxx> <20160209134930.GD13357@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 09, 2016 at 05:49:30AM -0800, Christoph Hellwig wrote:
> > +STATIC struct xfs_ioend *
> >  xfs_add_to_ioend(
> >     struct inode            *inode,
> >     struct buffer_head      *bh,
> >     xfs_off_t               offset,
> >     struct xfs_writepage_ctx *wpc)
> >  {
> > +   struct xfs_ioend        *ioend_to_submit = NULL;
> 
> Maybe just
> 
>       struct xfs_ioend        *prev = NULL;
> 
> to be a little less verbose?

*nod*

> > +   if (wpc->ioend)
> > +           xfs_submit_ioend(wbc, wpc->ioend, status);
> >     return status;
> >  }
> 
> With this change xfs_writepage_submit is rather pointless, I'd
> rather open code it in the callers.

Yup.

> 
> > +                   ioend = xfs_add_to_ioend(inode, bh, offset, wpc);
> > +                   if (ioend) {
> > +                           ioend->io_list = NULL;
> > +                           if (!ioend_to_submit)
> > +                                   ioend_to_submit = ioend;
> > +                           else
> > +                                   ioend_tail->io_list = ioend;
> > +                           ioend_tail = ioend;
> > +                   }
> 
> Just using a list_head for this is a lot easier to read and less
> error prone at the cost of a single additional pointer in the ioend.

OK. I'll see what I can do here.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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