From patchwork Wed May 23 14:43:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10421651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 50FB660327 for ; Wed, 23 May 2018 14:46:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 420B82897A for ; Wed, 23 May 2018 14:46:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37074289B5; Wed, 23 May 2018 14:46:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C2FD289B1 for ; Wed, 23 May 2018 14:46:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 519216B0284; Wed, 23 May 2018 10:45:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A1E36B0285; Wed, 23 May 2018 10:45:26 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F3426B0286; Wed, 23 May 2018 10:45:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id DD63F6B0284 for ; Wed, 23 May 2018 10:45:25 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id x2-v6so14371663plv.0 for ; Wed, 23 May 2018 07:45:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=4d92gz5FcfVDVVFBdsw4sS4Q2ll0I9g6+oG5w6eOyfg=; b=ipAWlz9b8BWSMtJU/TjaBD+OjQYB+gN6MNJhM7jg+sUvRuVmJpNb8iByWfUbhATtT6 7pwvqQ1vIlivJJQ6AtjvpCpYI3k1n1GahHBdIK/TMOoH2YOA/4S7izgXoC6oDF9l2msW h5PhtrASYXR99e3ZQYp75V9gwfnhTLI85mzy+P48nriU2hNCJDYDkVjTQirD2AXBHkuA h7flYyt/kcJ5GnnJIQ6yTdDaUhorvs3fn82hv6M5dmEDhl8rVT0PtolRHYIufB9LVZ+G 8shcWQL/T2SIfCZtyEpTm0YoKlV+6MMi7X7kTXfnP6UOqA97RM6RoMqc9CPtlJvFKoQc MPcw== X-Gm-Message-State: ALKqPwc+/dMXMHzZqnN1o6fnCXuveHh3vWmZ9DPOUXA3AkLs809duDjH 9RjEYD6OtESOhcQCwShe1/w6rBJx8sJPS6O8ir8cVG3MZ8mxJjzDocOfnnVgD2WhBOk5iBG3zQv Bl3rH9/FFzLxAVf4aih/B9oOxv7twwHf6ncAnJ9dNsJfz+FuBbCWQeG1e6hioe2Q= X-Received: by 2002:a65:438a:: with SMTP id m10-v6mr2611705pgp.315.1527086725594; Wed, 23 May 2018 07:45:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZptVU5oDrNsNo+gYQCkhkHIFCoW3ZuW9YzW7UEq6leljyzAFdS9g+1D8WMd57TvR+L0gYDw X-Received: by 2002:a65:438a:: with SMTP id m10-v6mr2611669pgp.315.1527086724916; Wed, 23 May 2018 07:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527086724; cv=none; d=google.com; s=arc-20160816; b=hRcnxzDX9dLTxbpI2VSyf0M8Qht2H1y+K3AOqJkIKN1ztMmvygw3/PQOuAntbRBv+d tb+kHo/WG0l8MSR4dCgYeeiD/NdxWMwbngT62mYxq6AIz+/46D6p9vUFsve6wh4XpuQh Po6chKYe4oHrCO2NoQYiuhdjwdxsCSlTgYkb1Zc8Ziolun0IJESOUpADiaCE2ULQ6VMm AhRKYlJp5+xn+en1jK0yBBLTq+O2226lymNU9qPZ31J+eivJYlK9pBnbgHeITH2Q5HnA GZldBdwtzmQH6ceOFDiIzSyxIr/f4XazCz2HFYArdvnce4jc9zFQlFBnJFEl3ZcKHT54 JBfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=4d92gz5FcfVDVVFBdsw4sS4Q2ll0I9g6+oG5w6eOyfg=; b=TJsZj5o/Bbl513BG+huvDDDjOV5aOPVxxMLFMHiBCDX998JhuZD7zaZKb7cXyL7/ko IW2XJqKII7XEkW9J/XHJwXibdrhbMkx2eOGFha4gYFVhPLvqoG4awfyEkgWizvh0ZM1A yv8hfD/LmT9VOAL8joBmUf+IUy6iaq8aVwF1sREOPHECQ1XYLCRjFBrAKUyxwfSk0QV3 PbVXTWgVFhvKTpEOMTda9CGItkAKqquY+qoDbJQDZf6yO3spj3hmMqXnZ8LQyBoixsje bIv2HDH7hMdugEfAeTZIoYmH/qyb3FMUVXuQE9W4hlpQObUcfr2jAWQJzJemuWe0qyiO kpLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=qnPdxY+w; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id d2-v6si18651585plh.387.2018.05.23.07.45.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 07:45:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=qnPdxY+w; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4d92gz5FcfVDVVFBdsw4sS4Q2ll0I9g6+oG5w6eOyfg=; b=qnPdxY+wY79G2xezIBhWU2BlC Yl7b3JkDXJ/gNfvN5e+NfiPyXrOf/+BIYkRqsIAr8UzMpMABT+xCS6GaSoVv/0MnbYLKLI31QpL06 bvWSmRlAM+nBmhN7WcT/p9RJ+bnHhQ3fU/cvm32VQK+OdgPyA4/ljjYIKwtU+n1yXvRro3tPa2hJS IGJtR61pT3mUeIzYYhQ6V1nZtsl7LzMwKPbwRHZ916YRidjWSYBlSU+hZw8ro0iXQdSVBx+fcyXns 93nD4iqbl9EeSNQc2d8fwv0Fbzu+p9oS7gU7mJV8NO+eZwUwttHIMvwlX18UQZjd45m362wBsvDQu N4rc/ToSA==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLV11-0001Ls-Tf; Wed, 23 May 2018 14:45:24 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 27/34] xfs: don't clear imap_valid for a non-uptodate buffers Date: Wed, 23 May 2018 16:43:50 +0200 Message-Id: <20180523144357.18985-28-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180523144357.18985-1-hch@lst.de> References: <20180523144357.18985-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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; }