xfs
[Top] [All Lists]

Re: [PATCH 3/8] xfs: Introduce writeback context for writepages

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/8] xfs: Introduce writeback context for writepages
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 11 Feb 2016 11:25:44 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160210113126.GB15221@xxxxxxxxxxxxx>
References: <1455094043-9694-1-git-send-email-david@xxxxxxxxxxxxx> <1455094043-9694-4-git-send-email-david@xxxxxxxxxxxxx> <20160210113126.GB15221@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Feb 10, 2016 at 03:31:26AM -0800, Christoph Hellwig wrote:
> > +   struct xfs_writepage_ctx wpc = {
> > +           .io_type = XFS_IO_OVERWRITE,
> > +   };
> > +   int                     ret;
> > +
> > +   ret = xfs_do_writepage(page, wbc, &wpc);
> > +   return xfs_writepage_submit(&wpc, wbc, ret);
> > +}
> > +
> > +STATIC int
> >  xfs_vm_writepages(
> >     struct address_space    *mapping,
> >     struct writeback_control *wbc)
> >  {
> > +   struct xfs_writepage_ctx wpc = {
> > +           .io_type = XFS_IO_OVERWRITE,
> > +   };
> 
> Shouldn't we start out with an invalid (0) state, and just move
> the actual states up to start from 1?

This is just a translation of the existing code - the imap_valid
flag being initialised to zero ensures the io_type is correctly
initialised if it differs from XFS_IO_OVERWRITE. I guess there's no
harm in changing it.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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