diff mbox

[11/18] xfs: don't clear imap_valid for a non-uptodate buffers

Message ID 20180530100013.31358-12-hch@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig May 30, 2018, 10 a.m. UTC
Finding a buffer that isn't uptodate doesn't invalidate the mapping for
any given block.  The last_sector check will already take care of starting
another ioend as soon as we find any non-update buffer, and if the current
mapping doesn't include the next uptodate buffer the xfs_imap_valid check
will take care of it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_aops.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Darrick J. Wong May 30, 2018, 5:34 p.m. UTC | #1
On Wed, May 30, 2018 at 12:00:06PM +0200, Christoph Hellwig wrote:
> Finding a buffer that isn't uptodate doesn't invalidate the mapping for
> any given block.  The last_sector check will already take care of starting
> another ioend as soon as we find any non-update buffer, and if the current
> mapping doesn't include the next uptodate buffer the xfs_imap_valid check
> will take care of it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

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

--D

> ---
>  fs/xfs/xfs_aops.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index cef2bc3cf98b..7dc13b0aae60 100644
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -849,15 +849,12 @@ xfs_writepage_map(
>  			break;
>  
>  		/*
> -		 * Block does not contain valid data, skip it, mark the current
> -		 * map as invalid because we have a discontiguity. This ensures
> -		 * we put subsequent writeable buffers into a new ioend.
> +		 * Block does not contain valid data, skip it.
>  		 */
>  		if (!buffer_uptodate(bh)) {
>  			if (PageUptodate(page))
>  				ASSERT(buffer_mapped(bh));
>  			uptodate = false;
> -			wpc->imap_valid = false;
>  			continue;
>  		}
>  
> -- 
> 2.17.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Brian Foster May 31, 2018, 1:46 p.m. UTC | #2
On Wed, May 30, 2018 at 12:00:06PM +0200, Christoph Hellwig wrote:
> Finding a buffer that isn't uptodate doesn't invalidate the mapping for
> any given block.  The last_sector check will already take care of starting
> another ioend as soon as we find any non-update buffer, and if the current
> mapping doesn't include the next uptodate buffer the xfs_imap_valid check
> will take care of it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_aops.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index cef2bc3cf98b..7dc13b0aae60 100644
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -849,15 +849,12 @@ xfs_writepage_map(
>  			break;
>  
>  		/*
> -		 * Block does not contain valid data, skip it, mark the current
> -		 * map as invalid because we have a discontiguity. This ensures
> -		 * we put subsequent writeable buffers into a new ioend.
> +		 * Block does not contain valid data, skip it.
>  		 */
>  		if (!buffer_uptodate(bh)) {
>  			if (PageUptodate(page))
>  				ASSERT(buffer_mapped(bh));
>  			uptodate = false;
> -			wpc->imap_valid = false;
>  			continue;
>  		}
>  
> -- 
> 2.17.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index cef2bc3cf98b..7dc13b0aae60 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -849,15 +849,12 @@  xfs_writepage_map(
 			break;
 
 		/*
-		 * Block does not contain valid data, skip it, mark the current
-		 * map as invalid because we have a discontiguity. This ensures
-		 * we put subsequent writeable buffers into a new ioend.
+		 * Block does not contain valid data, skip it.
 		 */
 		if (!buffer_uptodate(bh)) {
 			if (PageUptodate(page))
 				ASSERT(buffer_mapped(bh));
 			uptodate = false;
-			wpc->imap_valid = false;
 			continue;
 		}