linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 3/3] iomap: fix page_done callback for short writes
Date: Wed, 26 Jun 2019 13:09:46 -0700	[thread overview]
Message-ID: <20190626200946.GK5171@magnolia> (raw)
In-Reply-To: <20190626132335.14809-3-agruenba@redhat.com>

On Wed, Jun 26, 2019 at 03:23:35PM +0200, Andreas Gruenbacher wrote:
> When we truncate a short write to have it retried, pass the truncated
> length to the page_done callback instead of the full length.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>

LGTM,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/iomap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/iomap.c b/fs/iomap.c
> index 97569064faaa..9a9d016b2782 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -803,7 +803,7 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
>  	if (old_size < pos)
>  		pagecache_isize_extended(inode, old_size, pos);
>  	if (page_ops && page_ops->page_done)
> -		page_ops->page_done(inode, pos, copied, page, iomap);
> +		page_ops->page_done(inode, pos, ret, page, iomap);
>  	put_page(page);
>  
>  	if (ret < len)
> -- 
> 2.20.1
> 

  parent reply	other threads:[~2019-06-26 20:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 13:23 [PATCH v2 1/3] iomap: don't mark the inode dirty in iomap_write_end Andreas Gruenbacher
2019-06-26 13:23 ` [PATCH v2 2/3] fs: fold __generic_write_end back into generic_write_end Andreas Gruenbacher
2019-06-26 20:09   ` Darrick J. Wong
2019-06-26 13:23 ` [PATCH v2 3/3] iomap: fix page_done callback for short writes Andreas Gruenbacher
2019-06-26 13:37   ` Christoph Hellwig
2019-06-26 20:09   ` Darrick J. Wong [this message]
2019-06-26 20:09 ` [PATCH v2 1/3] iomap: don't mark the inode dirty in iomap_write_end Darrick J. Wong

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=20190626200946.GK5171@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).