[PATCH 5/5] xfs: don't chain ioends during writepage submission
Dave Chinner
david at fromorbit.com
Tue Feb 9 15:52:40 CST 2016
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 at fromorbit.com
More information about the xfs
mailing list