xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/8] xfs: Introduce writeback context for writepages
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 10 Feb 2016 03:31:26 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1455094043-9694-4-git-send-email-david@xxxxxxxxxxxxx>
References: <1455094043-9694-1-git-send-email-david@xxxxxxxxxxxxx> <1455094043-9694-4-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
> +     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?

Otherwise looks fine,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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