From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 5219A6B062E for ; Fri, 18 May 2018 12:49:58 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id i1-v6so5353260pld.11 for ; Fri, 18 May 2018 09:49:58 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id f2-v6si8557770pli.569.2018.05.18.09.49.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 09:49:57 -0700 (PDT) From: Christoph Hellwig Subject: [PATCH 27/34] xfs: don't clear imap_valid for a non-uptodate buffers Date: Fri, 18 May 2018 18:48:23 +0200 Message-Id: <20180518164830.1552-28-hch@lst.de> In-Reply-To: <20180518164830.1552-1-hch@lst.de> References: <20180518164830.1552-1-hch@lst.de> Sender: owner-linux-mm@kvack.org List-ID: To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org 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 --- 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 b1dee2171194..82fd08c29f7f 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -859,15 +859,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