All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/5] xfs: Introduce writeback context for writepages
Date: Wed, 10 Feb 2016 08:51:34 +1100	[thread overview]
Message-ID: <20160209215134.GF14668@dastard> (raw)
In-Reply-To: <20160209142224.GA25829@bfoster.bfoster>

On Tue, Feb 09, 2016 at 09:22:26AM -0500, Brian Foster wrote:
> On Mon, Feb 08, 2016 at 04:44:15PM +1100, Dave Chinner wrote:
> > +	/*
> > +	 * We have to fail the iohead here because we buffers locked in the
> > +	 * ioend chain. If we don't do this, we'll deadlock invalidating the
> > +	 * page as that tries to lock the buffers on the page. Also, because we
> > +	 * have set pages under writeback, we have to run IO completion to mark
> > +	 * the error state of the IO appropriately, so we can't cancel the ioend
> > +	 * directly here. That means we have to mark this page as under
> > +	 * writeback if we included any buffers from it in the ioend chain.
> > +	 */
> > +	if (count)
> > +		xfs_start_page_writeback(page, 0, count);
> > +	xfs_writepage_submit(wpc, wbc, err);
> 
> We make the xfs_writepage_submit() error case call here because...
...
> >  STATIC int
> > +xfs_vm_writepage(
> > +	struct page		*page,
> > +	struct writeback_control *wbc)
> > +{
> > +	struct xfs_writepage_ctx wpc = {
> > +		.io_type = XFS_IO_OVERWRITE,
> > +	};
> > +	int			ret;
> > +
> > +	ret = xfs_do_writepage(page, wbc, &wpc);
> > +	if (ret)
> > +		return ret;
> > +	return xfs_writepage_submit(&wpc, wbc, ret);
> 
> 
> ... the callers only call it when ret == 0. Can we eliminate the error
> call down in xfs_do_writepage() and just invoke this consistently from
> the writepage(s) callers?

Probably - I think this is left over from an early concoction that
exploded badly when it was stirred too vigorously...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-02-09 21:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08  5:44 [PATCH 0/5 v3] xfs: get rid of xfs_cluster_write() Dave Chinner
2016-02-08  5:44 ` [PATCH 1/5] xfs: remove nonblocking mode from xfs_vm_writepage Dave Chinner
2016-02-08  5:44 ` [PATCH 2/5] xfs: Introduce writeback context for writepages Dave Chinner
2016-02-09 13:39   ` Christoph Hellwig
2016-02-09 21:48     ` Dave Chinner
2016-02-09 23:16       ` Dave Chinner
2016-02-09 14:22   ` Brian Foster
2016-02-09 21:51     ` Dave Chinner [this message]
2016-02-08  5:44 ` [PATCH 3/5] xfs: xfs_cluster_write is redundant Dave Chinner
2016-02-09 13:40   ` Christoph Hellwig
2016-02-08  5:44 ` [PATCH 4/5] xfs: factor mapping out of xfs_do_writepage Dave Chinner
2016-02-09 13:40   ` Christoph Hellwig
2016-02-08  5:44 ` [PATCH 5/5] xfs: don't chain ioends during writepage submission Dave Chinner
2016-02-09 13:49   ` Christoph Hellwig
2016-02-09 21:52     ` Dave Chinner
2016-02-09 14:23   ` Brian Foster
2016-02-09 21:59     ` Dave Chinner
2016-02-10 13:18       ` Brian Foster
2016-02-10 21:09         ` Dave Chinner
2016-02-11 12:24           ` Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160209215134.GF14668@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.