xfs
[Top] [All Lists]

Re: [PATCH 2/8] xfs: remove xfs_cancel_ioend

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/8] xfs: remove xfs_cancel_ioend
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 11 Feb 2016 11:21:37 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160210112800.GA15221@xxxxxxxxxxxxx>
References: <1455094043-9694-1-git-send-email-david@xxxxxxxxxxxxx> <1455094043-9694-3-git-send-email-david@xxxxxxxxxxxxx> <20160210112800.GA15221@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Feb 10, 2016 at 03:28:00AM -0800, Christoph Hellwig wrote:
> > +static int
> > +xfs_writepage_submit(
> > +   struct xfs_ioend        *ioend,
> > +   struct xfs_ioend        *iohead,
> > +   struct writeback_control *wbc,
> > +   int                     status)
> > +{
> > +   struct blk_plug         plug;
> > +
> > +   /* Reserve log space if we might write beyond the on-disk inode size. */
> > +   if (!status && ioend && ioend->io_type != XFS_IO_UNWRITTEN &&
> > +       xfs_ioend_is_append(ioend))
> > +           status = xfs_setfilesize_trans_alloc(ioend);
> > +
> > +   if (iohead) {
> > +           blk_start_plug(&plug);
> > +           xfs_submit_ioend(wbc, iohead, status);
> > +           blk_finish_plug(&plug);
> > +   }
> > +   return status;
> > +}
> 
> We return the xfs_setfilesize_trans_alloc failure status here,
> but none of the callers pick it up.  The way this is handled later
> changes a bit, but even at the end of the series only 1 of the
> three callers handles the error.

I'll propagate it through where it makes sense. If we alrady have an
error, then we aren't going to call xfs_setfilesize_trans_alloc()
anyway, so checking the return value only matters in the non-error
cases.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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